/* ===========================================================
   Evergreen Life Advisors — detailed-quote.css
   Styles for the detailed quote page only
   =========================================================== */

.detailed-page {
  background: var(--cream);
  padding-bottom: 80px;
}

/* ---------- HERO ---------- */
.detailed-hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-warm) 100%);
  padding: clamp(50px, 7vw, 90px) 0 clamp(40px, 6vw, 70px);
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
  transition: color .2s ease;
}
.back-link:hover {
  color: var(--green);
}

.detailed-hero h1 {
  margin: 14px 0 16px;
  max-width: 720px;
}

.detailed-hero .lede-sm {
  max-width: 680px;
  margin: 0 0 28px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 8px;
}
.hero-point {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 500;
}

.detailed-alt-hint {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.detailed-alt-hint a {
  color: var(--green);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-soft);
  transition: all .2s ease;
}
.detailed-alt-hint a:hover {
  color: var(--gold-deep);
  border-color: var(--gold-deep);
}

/* ---------- FORM ---------- */
.detailed-form-section {
  padding-top: clamp(40px, 6vw, 70px);
}

.detailed-form {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  margin: 0;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.form-section legend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  margin: 0 0 8px;
  width: 100%;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  font-weight: 500;
  color: var(--green-deep);
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 0.96rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 24px;
  padding-left: 50px;
}
.section-desc strong {
  color: var(--green-deep);
  font-weight: 600;
}

.health-section {
  border-top: 4px solid var(--gold);
}

.consent-section {
  background: linear-gradient(180deg, var(--white) 0%, #FDFAF2 100%);
  border-color: var(--gold-soft);
}

/* Field styling shared with main form */
.detailed-form .field {
  margin-bottom: 18px;
}
.detailed-form .field:last-child {
  margin-bottom: 0;
}

.detailed-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}
.detailed-form .field-row .field {
  margin-bottom: 18px;
}

.detailed-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green-deep);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.label-block {
  margin-bottom: 12px !important;
}

.optional-tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-soft);
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

.detailed-form input[type="text"],
.detailed-form input[type="email"],
.detailed-form input[type="tel"],
.detailed-form input[type="number"],
.detailed-form select,
.detailed-form textarea {
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: all .2s ease;
  width: 100%;
  display: block;
}

.detailed-form textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.detailed-form input:hover,
.detailed-form select:hover,
.detailed-form textarea:hover {
  border-color: rgba(31, 77, 54, 0.3);
}

.detailed-form input:focus,
.detailed-form select:focus,
.detailed-form textarea:focus {
  border-color: var(--green);
  background: var(--white);
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 77, 54, 0.08);
}

.detailed-form input.invalid,
.detailed-form select.invalid,
.detailed-form textarea.invalid {
  border-color: #C24A4A;
  background: #FDF6F6;
}

/* Phone input with +1 country code prefix */
.phone-input-wrap {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  overflow: hidden;
  transition: all .2s ease;
}
.phone-input-wrap:hover {
  border-color: rgba(31, 77, 54, 0.3);
}
.phone-input-wrap:focus-within {
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(31, 77, 54, 0.08);
}
.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--cream-warm);
  border-right: 1px solid var(--line);
  color: var(--green-deep);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  user-select: none;
  flex-shrink: 0;
}
.detailed-form .phone-input-wrap input[type="tel"] {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  outline: none;
}
.detailed-form .phone-input-wrap input[type="tel"]:focus {
  background: transparent !important;
  box-shadow: none !important;
}
.phone-input-wrap:has(input.invalid) {
  border-color: #C24A4A;
  background: #FDF6F6;
}
.phone-input-wrap:has(input.invalid) .phone-prefix {
  background: #F8E8E8;
  color: #C24A4A;
  border-right-color: #E5BFBF;
}

.detailed-form select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' stroke='%231F4D36' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 44px;
}

/* Height row (feet + inches paired) */
.height-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Checkbox pills for conditions/lifestyle */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.check-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s ease;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}
.check-pill:hover {
  border-color: rgba(31, 77, 54, 0.3);
  background: var(--white);
}
.check-pill input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}
.check-pill:has(input:checked) {
  background: var(--white);
  border-color: var(--green);
  color: var(--green-deep);
  font-weight: 500 !important;
}
.check-pill span {
  flex: 1;
  line-height: 1.4;
}

.error {
  display: block;
  font-size: 0.8rem;
  color: #C24A4A;
  min-height: 1em;
  margin-top: 4px;
}

/* Consent block within detailed form (reuse main form styles) */
.detailed-form .consent-field {
  margin-bottom: 18px;
}
.detailed-form .consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  transition: all .2s ease;
}
.detailed-form .consent-label:hover {
  border-color: rgba(31, 77, 54, 0.3);
}
.detailed-form .consent-label:has(input:checked) {
  border-color: var(--green);
  background: var(--cream);
}
.detailed-form .consent-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.detailed-form .consent-checkbox {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: 1.5px solid var(--green);
  border-radius: 5px;
  background: var(--white);
  position: relative;
  transition: all .15s ease;
  margin-top: 2px;
}
.detailed-form .consent-checkbox::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 6px; height: 11px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .15s ease;
}
.detailed-form .consent-label input:checked ~ .consent-checkbox {
  background: var(--green);
  border-color: var(--green);
}
.detailed-form .consent-label input:checked ~ .consent-checkbox::after {
  transform: rotate(45deg) scale(1);
}
.detailed-form .consent-label input:focus-visible ~ .consent-checkbox {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.detailed-form .consent-text {
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
}
.detailed-form .consent-text strong {
  color: var(--green-deep);
  font-weight: 600;
}
.detailed-form .consent-text a {
  color: var(--green);
  text-decoration: underline;
  font-weight: 500;
}
.detailed-form .consent-text a:hover {
  color: var(--gold-deep);
}

.detailed-form .btn-primary {
  margin-top: 16px;
}

.detailed-form .form-disclaimer {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 18px 0 0;
}

.detailed-form .form-success {
  text-align: center;
  padding: 40px 20px 20px;
}
.detailed-form .form-success svg {
  margin: 0 auto 14px;
}
.detailed-form .form-success strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--green-deep);
  margin-bottom: 8px;
}
.detailed-form .form-success p {
  color: var(--ink-soft);
  margin: 0;
}
.detailed-form .form-success .success-booking-cta {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.detailed-form .form-success .success-booking-link {
  display: inline-block;
  margin-top: 8px;
  padding: 11px 22px;
  background: var(--gold);
  color: var(--green-deep);
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s ease;
}
.detailed-form .form-success .success-booking-link:hover {
  background: var(--gold-deep);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200, 162, 90, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .detailed-form .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .detailed-form .field-row .field {
    margin-bottom: 18px;
  }
  .height-row {
    grid-template-columns: 1fr 1fr;
  }
  .hero-points {
    gap: 16px;
    flex-direction: column;
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  .section-desc {
    padding-left: 0;
  }
}
