/* Full Circle Construction — Roof Cost Calculator styles
   Namespaced under .fcc-roof-calc / .fcc-rc- to avoid clashing with theme CSS. */

.fcc-roof-calc {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(16, 32, 57, 0.12);
  padding: 50px 60px;
  max-width: 780px;
  margin: 0 auto;
}

.fcc-rc-progress {
  width: 100%;
  height: 6px;
  background: #ECECEC;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 35px;
}

.fcc-rc-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--theme-color, #EA1826);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.fcc-rc-step-title {
  color: var(--theme-color-1, #102039);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 25px;
}

.fcc-rc-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 10px;
}

.fcc-rc-cards-compact {
  grid-template-columns: 1fr;
}

.fcc-rc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 2px solid #ECECEC;
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.fcc-rc-card:hover {
  border-color: var(--theme-color, #EA1826);
}

.fcc-rc-card.is-selected {
  border-color: var(--theme-color, #EA1826);
  background: rgba(234, 24, 38, 0.05);
}

.fcc-rc-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fcc-rc-card-label {
  color: var(--theme-color-1, #102039);
  font-weight: 600;
  font-size: 16px;
}

.fcc-rc-card-hint {
  color: #6a7385;
  font-size: 13px;
  margin-top: 4px;
}

.fcc-rc-field-label {
  display: block;
  color: var(--theme-color-1, #102039);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

.fcc-rc-field-label.mt {
  margin-top: 22px;
}

.fcc-rc-input {
  width: 100%;
  height: 48px;
  border: 2px solid #ECECEC;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--theme-color-1, #102039);
}

.fcc-rc-input:focus {
  outline: none;
  border-color: var(--theme-color, #EA1826);
}

.fcc-rc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  gap: 12px;
}

.fcc-rc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 30px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.fcc-rc-btn-next,
.fcc-rc-btn-primary {
  background: var(--theme-color, #EA1826);
  color: #fff;
  margin-left: auto;
}

.fcc-rc-btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.fcc-rc-btn-next:not(:disabled):hover,
.fcc-rc-btn-primary:hover {
  opacity: 0.9;
  color: #fff;
}

.fcc-rc-btn-back,
.fcc-rc-btn-outline {
  background: transparent;
  color: var(--theme-color-1, #102039);
  border: 2px solid #ECECEC;
}

.fcc-rc-btn-back:hover,
.fcc-rc-btn-outline:hover {
  border-color: var(--theme-color, #EA1826);
  color: var(--theme-color, #EA1826);
}

.fcc-rc-back-alone {
  margin-bottom: 20px;
}

.fcc-rc-result {
  text-align: center;
}

.fcc-rc-result-range {
  font-size: 42px;
  font-weight: 700;
  color: var(--theme-color, #EA1826);
  margin-bottom: 10px;
}

.fcc-rc-result-note {
  color: var(--theme-color-1, #102039);
  font-size: 15px;
  margin-bottom: 18px;
}

.fcc-rc-disclaimer {
  color: #6a7385;
  font-size: 13px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 30px;
}

.fcc-rc-result-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.fcc-rc-restart {
  background: none;
  border: none;
  color: #6a7385;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.fcc-rc-restart:hover {
  color: var(--theme-color, #EA1826);
}

@media only screen and (max-width: 767px) {
  .fcc-roof-calc {
    padding: 30px 22px;
  }

  .fcc-rc-cards {
    grid-template-columns: 1fr;
  }

  .fcc-rc-result-range {
    font-size: 32px;
  }
}

/* ---------------- Modal ---------------- */

.fcc-rc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 32, 57, 0.7);
  z-index: 99998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.fcc-rc-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.fcc-rc-modal {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: auto;
}

.fcc-rc-modal .fcc-roof-calc {
  max-width: none;
}

.fcc-rc-modal-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 6px 20px rgba(16, 32, 57, 0.25);
  color: var(--theme-color-1, #102039);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.fcc-rc-modal-close:hover {
  color: var(--theme-color, #EA1826);
}

@media only screen and (max-width: 767px) {
  .fcc-rc-modal-close {
    top: -14px;
    right: 6px;
  }
}
