/* ============================================================
   YHW Health Savings Calculator — Stylesheet
   Design: Dark Editorial Fintech — consistent with site-wide theme
   Responsive: Desktop (2-col) → Tablet (2-col narrow) → Mobile (1-col)
   ============================================================ */

/* ---- Page-level dark background (makes calculator page consistent with rest of site) ---- */
body.page-id-134,
body.page-template-default.page-slug-calculator {
  background-color: #0d1117 !important;
}

/* Target the Hello Elementor page wrapper on the calculator page */
body.page-id-134 .site-main,
body.page-id-134 .page-content,
body.page-id-134 article,
body.page-id-134 .entry-content,
body.page-id-134 .elementor-section-wrap,
body.page-id-134 .elementor,
body.page-id-134 .e-con,
body.page-id-134 .e-con-inner {
  background-color: #0d1117 !important;
}

/* Page title override — hide the default WP page title on calculator page */
body.page-id-134 .entry-title,
body.page-id-134 .page-title {
  display: none;
}

/* Ensure full-width dark wrapper */
.yhw-calc-page-wrap {
  background: #0d1117;
  min-height: 60vh;
  padding: 48px 0 80px;
}

/* ============================================================
   CALCULATOR WIDGET
   ============================================================ */
.yhw-calc-wrap {
  font-family: 'DM Sans', sans-serif;
  background: #0d1117;
  color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  border: 1px solid #21262d;
}

/* STEPS */
.yhw-step { display: none; }
.yhw-step.active { display: block; }

/* ---- HEADER ---- */
.yhw-calc-header {
  padding: 48px 48px 32px;
  border-bottom: 1px solid #21262d;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
}
.yhw-calc-badge {
  display: inline-block;
  background: #f0a500;
  color: #0d1117;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.yhw-calc-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px;
  line-height: 1.2;
}
.yhw-calc-subtitle {
  color: #ffffff;
  font-size: 15px;
  margin: 0;
  max-width: 600px;
}

/* ---- LAYOUT ---- */
.yhw-calc-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  min-height: 500px;
}

/* ---- INPUTS PANEL ---- */
.yhw-calc-inputs {
  padding: 40px 36px;
  background: #161b22;
  border-right: 1px solid #21262d;
}
.yhw-input-group {
  margin-bottom: 32px;
}
.yhw-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.yhw-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.yhw-slider-min, .yhw-slider-max {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #ffffff;
  min-width: 36px;
  white-space: nowrap;
}
.yhw-slider-max { text-align: right; }

/* Custom range slider */
input[type="range"].yhw-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: #30363d;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"].yhw-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f0a500;
  cursor: pointer;
  border: 2px solid #0d1117;
  box-shadow: 0 0 0 3px rgba(240,165,0,0.2);
  transition: box-shadow 0.2s;
}
input[type="range"].yhw-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(240,165,0,0.3);
}
input[type="range"].yhw-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f0a500;
  cursor: pointer;
  border: 2px solid #0d1117;
}

.yhw-slider-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 700;
  color: #f0a500;
  margin: 8px 0 4px;
  line-height: 1;
}
.yhw-slider-val span {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-left: 4px;
}
.yhw-input-note {
  font-size: 12px;
  color: #ffffff;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* ---- RESULTS PANEL ---- */
.yhw-calc-results {
  padding: 40px 36px;
  background: #0d1117;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.yhw-results-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.yhw-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.yhw-result-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.2s;
}
.yhw-result-card:hover { border-color: #30363d; }
.yhw-result-card.green { border-left: 3px solid #3fb950; }
.yhw-result-card.red   { border-left: 3px solid #f85149; }
.yhw-result-card.amber { border-left: 3px solid #f0a500; }
.yhw-result-card.grey  { border-left: 3px solid #30363d; }

.yhw-result-card-label {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.yhw-result-card-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.yhw-result-card.green .yhw-result-card-val { color: #3fb950; }
.yhw-result-card.red   .yhw-result-card-val { color: #f85149; }
.yhw-result-card.amber .yhw-result-card-val { color: #f0a500; }
.yhw-result-card.grey  .yhw-result-card-val { color: #ffffff; }

.yhw-result-card-sub {
  font-size: 11px;
  color: #ffffff;
  line-height: 1.4;
}

/* ---- CHARTS ---- */
.yhw-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.yhw-chart-box {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 20px;
  /* Chart.js needs a fixed height on the parent container */
  position: relative;
  height: 220px;
}
.yhw-chart-title {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  /* Account for title height in the chart container */
  position: relative;
  z-index: 1;
}
.yhw-chart-box canvas {
  /* Chart.js will fill the remaining height of the container */
  max-height: 180px;
}

/* ---- DATA SOURCES ---- */
.yhw-data-sources {
  font-size: 11px;
  color: #ffffff;
  line-height: 1.6;
  padding: 12px 0;
  border-top: 1px solid #21262d;
  margin-bottom: 20px;
}

/* ---- CTA BUTTON ---- */
.yhw-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f0a500;
  color: #0d1117;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.yhw-btn-primary:hover {
  background: #e09600;
  transform: translateY(-1px);
}
.yhw-btn-primary:active { transform: translateY(0); }
.yhw-btn-full { width: 100%; }
.yhw-btn-large { padding: 16px 36px; font-size: 16px; }

.yhw-btn-back {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 8px;
  display: block;
  text-decoration: underline;
  font-family: 'DM Sans', sans-serif;
}
.yhw-btn-back:hover { color: #ffffff; }

.yhw-btn-ghost {
  background: none;
  border: 1px solid #30363d;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.yhw-btn-ghost:hover { border-color: #ffffff; color: #ffffff; }

.yhw-cta-note {
  font-size: 12px;
  color: #ffffff;
  margin-top: 8px;
  text-align: center;
}

/* ============================================================
   STEP 2 — LEAD FORM
   ============================================================ */
.yhw-lead-step {
  padding: 48px;
  max-width: 680px;
  margin: 0 auto;
}
.yhw-lead-step h3 {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px;
}
.yhw-lead-step p {
  color: #ffffff;
  font-size: 14px;
  margin: 0 0 28px;
}

/* Summary box */
.yhw-lead-summary {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.yhw-lead-summary-item { text-align: center; }
.yhw-lead-summary-label {
  font-size: 11px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.yhw-lead-summary-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
}
.yhw-lead-summary-val.green { color: #3fb950; }
.yhw-lead-summary-val.red   { color: #f85149; }
.yhw-lead-summary-val.amber { color: #f0a500; }

/* Form fields */
.yhw-lead-form { margin-top: 0; }
.yhw-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.yhw-form-group { margin-bottom: 16px; }
.yhw-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}
.yhw-form-input {
  width: 100%;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.yhw-form-input:focus { border-color: rgba(240,165,0,0.5); }
.yhw-form-note {
  font-size: 11px;
  color: #ffffff;
  margin: 4px 0 0;
}

/* Consent checkboxes */
.yhw-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.yhw-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #f0a500;
}
.yhw-consent span {
  font-size: 12px;
  color: #ffffff;
  line-height: 1.5;
}

.yhw-form-error {
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.3);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #f85149;
  margin-bottom: 12px;
}

/* ============================================================
   STEP 3 — SUCCESS / DOWNLOAD
   ============================================================ */
.yhw-success-step {
  padding: 64px 48px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.yhw-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(63,185,80,0.15);
  border: 2px solid #3fb950;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 28px;
  color: #3fb950;
}
.yhw-success-step h3 {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px;
}
.yhw-success-step p {
  color: #ffffff;
  font-size: 14px;
  margin: 0 0 28px;
  line-height: 1.6;
}
.yhw-disclaimer {
  background: rgba(240,165,0,0.06);
  border: 1px solid rgba(240,165,0,0.2);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 11px;
  color: #ffffff;
  line-height: 1.6;
  text-align: left;
  margin: 24px 0;
}
.yhw-disclaimer strong { color: #f0a500; }

/* ============================================================
   OBJECTIONS SECTION (below calculator)
   ============================================================ */
.yhw-objections {
  background: #0d1117;
  padding: 64px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.yhw-objections-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 32px;
  padding: 0 48px;
}
.yhw-objection-list {
  padding: 0 48px;
}
.yhw-objection-item {
  border-bottom: 1px solid #21262d;
  padding: 24px 0;
}
.yhw-objection-item:last-child { border-bottom: none; }
.yhw-objection-q {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #f0a500;
  margin: 0 0 10px;
}
.yhw-objection-a {
  font-size: 14px;
  color: #ffffff;
  line-height: 1.75;
  margin: 0;
  max-width: 800px;
}
.yhw-objection-a strong { color: #ffffff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .yhw-calc-layout {
    grid-template-columns: 320px 1fr;
  }
}

@media (max-width: 900px) {
  .yhw-calc-layout {
    grid-template-columns: 1fr;
  }
  .yhw-calc-inputs {
    border-right: none;
    border-bottom: 1px solid #21262d;
  }
  .yhw-result-grid {
    grid-template-columns: 1fr 1fr;
  }
  .yhw-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .yhw-calc-header { padding: 28px 20px 20px; }
  .yhw-calc-inputs { padding: 24px 20px; }
  .yhw-calc-results { padding: 24px 20px; }
  .yhw-result-grid { grid-template-columns: 1fr; }
  .yhw-lead-step { padding: 28px 20px; }
  .yhw-lead-summary { grid-template-columns: 1fr; gap: 12px; }
  .yhw-form-row { grid-template-columns: 1fr; }
  .yhw-success-step { padding: 40px 20px; }
  .yhw-objections-title { padding: 0 20px; }
  .yhw-objection-list { padding: 0 20px; }
  .yhw-result-card-val { font-size: 22px; }
}

/* ============================================================
   YHW Calculator CSS Additions v2.0
   New elements: PHI breakdown, advantage block, slider display IDs
   ============================================================ */

/* Slider display values (new ID format: yhw-*-display) */
.yhw-slider-val {
  font-size: 22px;
  font-weight: 700;
  color: #f0a500;
  text-align: center;
  margin-top: 6px;
  letter-spacing: -0.02em;
}

/* PHI Breakdown section */
.yhw-phi-breakdown {
  background: #161b22;
  border: 1px solid #f85149;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.yhw-phi-breakdown-title {
  font-size: 12px;
  font-weight: 700;
  color: #f85149;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.yhw-phi-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #21262d;
  font-size: 13px;
}

.yhw-phi-breakdown-row:last-of-type {
  border-bottom: none;
}

.yhw-phi-breakdown-label {
  color: #ffffff;
}

.yhw-phi-breakdown-val {
  font-weight: 700;
  color: #f85149;
}

.yhw-phi-breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #30363d;
  font-size: 15px;
  font-weight: 700;
  color: #f85149;
}

.yhw-phi-breakdown-note {
  font-size: 11px;
  color: #ffffff;
  margin-top: 10px;
  line-height: 1.5;
}

/* Advantage block */
.yhw-advantage-block {
  background: linear-gradient(135deg, #1a2332 0%, #161b22 100%);
  border: 1px solid #f0a500;
  border-radius: 8px;
  padding: 20px;
  margin: 16px 0;
  text-align: center;
}

.yhw-advantage-label {
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.yhw-advantage-val {
  font-size: 36px;
  font-weight: 800;
  color: #f0a500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.yhw-advantage-formula {
  font-size: 12px;
  color: #ffffff;
  line-height: 1.5;
}

/* ---- Advantage block: split display ---- */
.yhw-advantage-sub {
  font-size: 0.85rem;
  color: #ffffff;
  margin-top: 0.25rem;
}
.yhw-advantage-divider {
  border-top: 1px solid #2d333b;
  margin: 0.9rem 0;
}
.yhw-advantage-label.yhw-advantage-label-secondary {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 0.2rem;
  margin-top: 0;
}
.yhw-advantage-phi-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e3c06f;
  margin-bottom: 0.2rem;
}

/* Result grid — 2 columns for YHW cards */
.yhw-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .yhw-result-grid {
    grid-template-columns: 1fr;
  }
}


/* ── Contribution Breakdown (inside advantage block) ── */
.yhw-contrib-breakdown {
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 10px;
}
.yhw-cb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}
.yhw-cb-balance-row {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 6px;
  padding-top: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}
.yhw-cb-val {
  font-weight: 600;
  color: #fff;
}
.yhw-cb-spent {
  color: #ff8a8a;
}
.yhw-cb-green {
  color: #4be868;
  font-size: 1.05rem;
}


/* ============================================================
   WHITE TEXT OVERRIDES — force all inline-styled grey text to white
   These override any inline style attributes on grey elements
============================================================ */
#yhw-v3-gap-note,
#yhw-cancel-fee-notice,
.yhw-data-sources,
.yhw-data-sources * {
    color: #ffffff !important;
}

/* Chart.js renders on canvas — axis/legend colors are set in JS config
   Override any remaining grey via the chart containers */
.yhw-chart-title {
    color: #ffffff !important;
}
