/* Final Expense Estimator — matches quote wizard (Choice Mutual–style) */

.fe-estimator-page {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: #1f2937;
  background: #cfe6f7;
}

/* Hook above title — no card/box (step 1 welcome; steps 2+ may show context panel) */
.fe-estimator-intro-head {
  max-width: 40rem;
  margin: 0 auto 1rem;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.fe-estimator-intro-head.fe-intro-has-context {
  max-width: 40rem;
  margin-bottom: 0.75rem;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 0.65rem;
  box-shadow: 0 4px 16px rgba(13, 71, 161, 0.06);
}

.fe-intro-hook {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 4.2vw, 2rem);
  line-height: 1.25;
  text-align: center;
  color: #0d47a1;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.fe-intro-hook-sub {
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.35;
  text-align: center;
  color: #334155;
  font-weight: 600;
  margin: 0;
}

.fe-intro-context h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: #0d47a1;
  font-size: clamp(1.35rem, 3.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.fe-intro-context p {
  margin-bottom: 0.65rem;
  color: #334155;
}

.fe-intro-context p:last-child {
  margin-bottom: 0;
}

#fe-estimator-app {
  width: 100%;
}

/* Gold pill progress — reveal steps as visitor advances (like quote summary bar) */
.fe-estimator-page .mvi-quote-wizard-title {
  display: none !important;
}

.fe-estimator-progress {
  margin-bottom: 1.35rem;
}

.fe-estimator-step-bar {
  justify-content: stretch;
}

.fe-estimator-step-bar .mvi-quote-summary-seg {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.35rem;
  text-align: center;
}

.fe-estimator-step-bar .mvi-quote-summary-seg span {
  display: block;
  font-size: clamp(0.62rem, 1.35vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
  color: rgba(26, 54, 93, 0.88);
}

.fe-estimator-step-bar .mvi-quote-summary-seg:not(.is-filled) span {
  visibility: hidden;
}

.fe-estimator-step-bar .mvi-quote-summary-seg.is-current span {
  color: #1a365d;
  font-weight: 800;
}

.fe-estimator-step-bar::before {
  transition: width 0.35s ease;
}

@media (max-width: 420px) {
  .fe-estimator-step-bar {
    min-height: 2.85rem;
  }

  .fe-estimator-step-bar .mvi-quote-summary-seg span {
    font-size: 0.5rem;
    letter-spacing: 0.02em;
  }
}

/* Step card — slightly narrower than default quote wizard */
#fe-estimator-app .fe-step-panel.mvi-quote-step-card {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1.35rem 1rem;
}

#fe-estimator-app .fe-step-panel.mvi-quote-step-card[data-step="3"],
#fe-estimator-app .fe-step-panel.mvi-quote-step-card[data-step="4"],
#fe-estimator-app .fe-step-panel.mvi-quote-step-card[data-step="5"] {
  max-width: 38rem;
}

#fe-estimator-app .fe-step-panel {
  display: none;
}

#fe-estimator-app .fe-step-panel.is-active {
  display: block;
}

/* Nav below white card — back left, Continuar right (like quote.html) */
#fe-estimator-app .fe-wizard-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.75rem;
  padding: 0 0.25rem;
}

#fe-estimator-app .fe-wizard-nav #fe-wizard-next {
  margin-left: auto;
}

.fe-step-lead {
  font-size: clamp(0.95rem, 2.1vw, 1.05rem);
  line-height: 1.55;
  color: #475569;
  margin-bottom: 1rem;
}

#fe-estimator-app .mvi-quote-question {
  font-size: clamp(1.3rem, 3.4vw, 1.65rem) !important;
  margin-bottom: 1rem !important;
}

.fe-step-note {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: #64748b;
  margin: 1rem auto 0;
  line-height: 1.45;
  max-width: 28rem;
}

/* Custom state picker — white menu (native <select> stays gray on macOS) */
.fe-state-picker {
  position: relative;
  max-width: 20rem;
  width: 100%;
}

.fe-state-picker .mvi-dob-picker-btn {
  width: 100%;
  text-align: left;
  border: 2px solid #0d47a1;
  border-radius: 0.25rem;
  background-color: #fff !important;
  color: #1f2937;
  font-weight: 600;
}

.fe-state-picker .mvi-dob-picker-menu {
  max-height: 16rem;
  background: #fff;
  border: 2px solid #0d47a1;
}

.fe-quote-question-sm {
  font-size: clamp(1.25rem, 3.2vw, 1.55rem) !important;
  margin-bottom: 1rem !important;
}

.fe-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  justify-content: center;
  font-size: clamp(0.95rem, 2.1vw, 1.05rem);
  color: #334155;
}

.fe-summary-chips a {
  color: #0d47a1;
  font-weight: 600;
}

.fe-wizard-start-over button,
#fe-btn-start-over {
  font-weight: 600;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  color: #0d47a1;
  background: none;
  border: none;
  padding: 0.35rem 0;
  cursor: pointer;
  text-decoration: none;
}

.fe-wizard-start-over button:hover,
#fe-btn-start-over:hover {
  text-decoration: underline;
}

.fe-quote-cta-wrap {
  text-align: center;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.fe-quote-cta-btn {
  display: block;
  width: 100%;
  padding: 0.95rem 1.25rem;
  background: #e67e22;
  border: none;
  border-radius: 0.35rem;
  color: #fff !important;
  font-weight: 700;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  line-height: 1.3;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(230, 126, 34, 0.35);
  transition: background 0.2s ease;
}

.fe-quote-cta-btn:hover,
.fe-quote-cta-btn:focus {
  background: #cf6d17;
  color: #fff !important;
}

.fe-quote-cta-sub {
  margin: 0.5rem 0 0;
  font-size: clamp(0.82rem, 1.9vw, 0.92rem);
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

/* Tier row */
.fe-tier-row {
  padding: 1rem 1.1rem;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  max-width: 100%;
}

.fe-tier-row .form-select {
  max-width: 14rem;
  border: 2px solid #0d47a1;
  background-color: #fff !important;
  font-weight: 600;
}

.fe-tier-examples {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.fe-tier-examples-intro {
  font-size: 0.95rem;
  color: #475569;
  margin: 0 0 0.5rem;
  line-height: 1.45;
}

.fe-tier-examples-list {
  margin: 0 0 0.5rem;
  padding-left: 1.15rem;
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.45;
}

.fe-tier-examples-list li {
  margin-bottom: 0.35rem;
}

.fe-tier-most {
  font-weight: 600;
  color: #0d47a1;
}

.fe-tier-examples-note {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.fe-help-text {
  font-size: clamp(0.95rem, 2.1vw, 1.05rem) !important;
  line-height: 1.5;
}

/* Expense line table */
.fe-line-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.95rem, 2.1vw, 1.05rem);
  margin-top: 0.5rem;
}

.fe-line-table tr {
  border-bottom: 1px solid #e2e8f0;
}

.fe-line-table td {
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
}

.fe-line-table td:first-child {
  font-weight: 600;
  color: #334155;
  width: 58%;
  padding-right: 0.75rem;
}

.fe-line-table td:last-child {
  width: 42%;
  text-align: right;
}

.fe-line-table .form-select {
  width: 100%;
  max-width: 11.5rem;
  margin-left: auto;
  display: block;
  border: 2px solid #0d47a1;
  background-color: #fff !important;
  font-size: clamp(0.9rem, 2vw, 1rem);
  font-weight: 600;
}

.fe-line-table .fe-fixed-amount {
  display: block;
  margin-left: auto;
  font-weight: 700;
  color: #0d47a1;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
}

.fe-subtotal-row {
  background: #f8fbff;
  font-weight: 700;
}

.fe-subtotal-row td:last-child {
  color: #0d47a1;
  font-size: clamp(1.1rem, 2.4vw, 1.2rem);
}

.fe-family-input {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: flex-end;
}

.fe-family-input input {
  max-width: 8rem;
  text-align: right;
  border: 2px solid #0d47a1;
  font-weight: 600;
}

.fe-family-input span {
  font-weight: 700;
  color: #0d47a1;
}

#fe-estimator-app .form-control {
  border: 2px solid #0d47a1;
  background-color: #fff !important;
}

/* Totals (step 5) */
.fe-total-banner {
  background: linear-gradient(180deg, #0d47a1 0%, #1565c0 100%);
  color: #fff;
  padding: 0.9rem 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  font-weight: 700;
  margin: 0 0 1rem;
  border-radius: 0.5rem;
  text-align: center;
}

.fe-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: clamp(1rem, 2.3vw, 1.1rem);
  font-weight: 600;
  color: #334155;
}

.fe-total-line .fe-amount {
  background: #f8fbff;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 1rem;
  min-width: 7.5rem;
  text-align: right;
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  color: #0d47a1;
  font-weight: 700;
  border-radius: 0.35rem;
}

.fe-total-line.fe-grand {
  border-bottom: none;
  margin-top: 0.25rem;
  font-size: clamp(1.1rem, 2.5vw, 1.2rem);
  color: #1a365d;
}

.fe-total-line.fe-grand .fe-amount {
  background: #fff6e0;
  border-color: #fec963;
  font-size: clamp(1.25rem, 3vw, 1.45rem);
}

.fe-disclaimer {
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 1.25rem;
  line-height: 1.5;
  text-align: center;
}

/* Info popovers */
.fe-info-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.fe-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #0d47a1;
  font-size: 1.05rem;
  cursor: pointer;
  border-radius: 50%;
}

.fe-info-btn:hover,
.fe-info-btn:focus {
  color: #1565c0;
  outline: 2px solid rgba(13, 71, 161, 0.35);
  outline-offset: 1px;
}

.fe-info-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 16rem;
  max-width: 24rem;
  padding: 0.75rem 0.85rem;
  background: #2d3748;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  text-align: left;
}

.fe-info-popover[hidden] {
  display: none !important;
}

.fe-info-popover-text {
  margin: 0;
}

.fe-info-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fe-info-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.2rem 0;
}

.fe-info-breakdown-amt {
  white-space: nowrap;
  font-weight: 600;
}

/* Trust strip below wizard */
.fe-estimator-page .fe-estimator-trust-strip {
  margin-top: 1.75rem;
}

