/* ═══════════════════════════════════════════════════════════════
   AI Mind Map — Calculator Page Styles
   Oatmeal & Ink light theme
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 2rem;
  text-align: center;
}
.hero__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.hero__subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ── Calculator Grid ──────────────────────────────────────── */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .calculator-grid { grid-template-columns: 1fr; }
}

/* ── Card (shared for inputs + results) ───────────────────── */
.card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* ── Inputs Card ──────────────────────────────────────────── */
.calc-inputs__title,
.calc-results__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.8rem;
}

.slider-group {
  margin-bottom: 1.8rem;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.slider-header label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Slider value badge */
.slider-value {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--accent-primary);
  font-family: 'Geist Mono', monospace;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ── Custom Range Slider ──────────────────────────────────── */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-secondary);
  outline: none;
  transition: background 0.25s ease;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(232, 97, 26, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 14px rgba(232, 97, 26, 0.35);
}
.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(232, 97, 26, 0.25);
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Model Select ─────────────────────────────────────────── */
.model-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Geist', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s ease;
  cursor: pointer;
}
.model-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.model-select option {
  background: #FFFFFF;
  color: var(--text-primary);
}

/* ── Results Card ─────────────────────────────────────────── */
.chart-container {
  height: 200px;
  margin-bottom: 1.5rem;
}

.results-numbers {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}
.result-row--bad {
  background: rgba(196, 77, 15, 0.06);
}
.result-row--good {
  background: rgba(26, 127, 55, 0.06);
}
.result-row--saved {
  background: var(--accent-subtle);
  font-weight: 600;
}
.result-label {
  color: var(--text-secondary);
}
.result-value {
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
}
.result-row--bad .result-value {
  color: var(--accent-hover);
}
.result-row--good .result-value {
  color: var(--code-green);
}
.result-row--saved .result-value {
  color: var(--accent-primary);
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
}

/* ── Cost Grid ────────────────────────────────────────────── */
.cost-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.cost-item {
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}
.cost-item--highlight {
  border-color: var(--code-green);
  background: rgba(26, 127, 55, 0.06);
  grid-column: span 2;
}
@media (max-width: 480px) {
  .cost-item--highlight { grid-column: span 1; }
}
.cost-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.cost-value {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
}
.cost-value--bad   { color: var(--accent-hover); }
.cost-value--good  { color: var(--text-secondary); }
.cost-value--green { color: var(--code-green); }
.cost-value--hero  { color: var(--accent-primary); font-size: 1.6rem; }

/* ── Pie Chart ────────────────────────────────────────────── */
.pie-container {
  width: 180px;
  height: 180px;
  margin: 2rem auto 0;
}

/* ── Stat Cards ───────────────────────────────────────────── */
.stat-card {
  text-align: center;
  padding: 2rem;
}
.stat-card__icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}
.stat-card__value {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}
.stat-card__label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}
.stat-card__detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
}

/* ── Token Comparison Bars ────────────────────────────────── */
.token-bar-group {
  margin: 1rem 0;
}
.token-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.token-bar__label {
  flex: 0 0 100px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: right;
}
.token-bar__track {
  flex: 1;
  height: 14px;
  background: var(--bg-secondary);
  border-radius: 7px;
  overflow: hidden;
}
.token-bar__fill--before {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 7px;
  transition: width 0.6s ease;
}
.token-bar__fill--after {
  height: 100%;
  background: #00b894;
  border-radius: 7px;
  transition: width 0.6s ease;
}

/* ── Code Block (formula section) ─────────────────────────── */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  overflow-x: auto;
}
.code-block pre {
  margin: 0;
  font-family: 'Geist Mono', monospace;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
}
