/* ── Cost Calculator widget — membership-pricing.html (EN + ES) ──── */

.calc-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Step headers */
.step-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 44px 0 20px;
}
.step-num {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 13px;
  color: var(--color-muted);
  white-space: nowrap;
}
.step-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-heading);
}

/* Insurance / option selector buttons */
.ins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.ins-btn {
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--color-heading);
  line-height: 1.3;
}
.ins-btn .ins-icon {
  font-size: 20px;
  display: block;
  margin-bottom: 6px;
}
.ins-btn:hover {
  border-color: #2d6a4f;
  background: #e8f5ee;
}
.ins-btn.active {
  border-color: #2d6a4f;
  background: #e8f5ee;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

/* Sliders */
.slider-group { margin: 18px 0; }
.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.slider-label span:first-child {
  font-size: 13.5px;
  color: var(--color-heading);
}
.slider-val {
  font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 13px;
  color: #2d6a4f;
  font-weight: 500;
}
.calc-wrap input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--color-surface-alt);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.calc-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #2d6a4f;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.1s;
}
.calc-wrap input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.calc-wrap input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #2d6a4f;
  border-radius: 50%;
  border: none;
}
.slider-hint {
  font-size: 11.5px;
  color: var(--color-muted);
  margin-top: 5px;
  line-height: 1.5;
}

/* Result card */
.calc-result-wrap {
  margin-top: 36px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.calc-result-wrap.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.result-card {
  background: var(--color-heading);
  color: #f7f5f0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.result-top {
  padding: 32px 32px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.result-eyebrow {
  font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247,245,240,0.4);
  margin-bottom: 12px;
}
.result-headline {
  font-family: var(--font-heading);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.result-headline .savings-amt { color: #5de8a0; }
.result-sub {
  font-size: 13px;
  color: rgba(247,245,240,0.5);
}

/* Comparison table inside dark card */
.comp-table { display: grid; grid-template-columns: 1fr 1fr; }
.comp-disclaimer {
  grid-column: 1 / -1;
  padding: 10px 20px 0;
  font-size: 11.5px;
  color: rgba(247,245,240,0.38);
  text-align: center;
  font-style: italic;
  letter-spacing: 0.02em;
}
.comp-col { padding: 24px 28px; }
.comp-col:nth-child(2) {
  border-right: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
}
.comp-col-head {
  font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247,245,240,0.4);
  margin-bottom: 16px;
}
.comp-col-head.premonition { color: #5de8a0; }
.line-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
  color: rgba(247,245,240,0.75);
  gap: 8px;
}
.line-item:last-child { border-bottom: none; }
.line-item .li-label { flex: 1; line-height: 1.4; }
.line-item .li-val {
  font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.line-item .li-val.zero { color: #5de8a0; }
.line-item .li-val.cost { color: rgba(247,245,240,0.55); }
.line-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0 0;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 15px;
}
.line-total .lt-label { font-weight: 600; }
.line-total .lt-val {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.line-total .lt-val.green { color: #5de8a0; }
.line-total .lt-val.red   { color: #f87171; }

/* Insight / explanation text below comp table */
.calc-insight {
  margin: 0;
  padding: 20px 28px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 13px;
  color: rgba(247,245,240,0.55);
  line-height: 1.6;
  font-style: italic;
  text-align: center;
}
.calc-insight strong {
  color: rgba(247,245,240,0.85);
  font-style: normal;
}

/* CTA area below result card */
.calc-cta-wrap {
  margin-top: 32px;
  text-align: center;
  padding: 0 0 8px;
}
.calc-cta-wrap .button { margin: 6px 8px; }
.calc-cta-note {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile */
@media (max-width: 600px) {
  .calc-wrap { padding: 0 16px; }
  .comp-table { grid-template-columns: 1fr; }
  .comp-col:first-child {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .ins-grid { grid-template-columns: 1fr 1fr; }
  .result-top { padding: 24px 20px 18px; }
  .comp-col { padding: 18px 20px; }
  .step-title { font-size: 18px; }
}
