/* ═══════════════════════════════════════════════════════════════
   Time-to-Max Progression Engine — Styles v2.0
   2026 Meta: Multi-track parallel modeling with GP 2.0
   ═══════════════════════════════════════════════════════════════ */

/* ── Calculator Container ── */
.ttm-calc {
  background: linear-gradient(180deg, var(--bg-secondary, #1B1D23) 0%, var(--bg-card, #23262F) 100%);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 20px;
  padding: 2.5rem;
  margin: 3rem 0;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.ttm-calc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #22C55E, #F4C542, #3B82F6, #8B5CF6);
}
.ttm-calc__title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ttm-calc__title svg { width: 28px; height: 28px; fill: #22C55E; }
.ttm-calc__desc {
  font-size: 0.93rem;
  margin-bottom: 2rem;
  color: var(--text-muted, #9CA3AF);
  max-width: 700px;
  line-height: 1.6;
}

/* ── Section Divider ── */
.ttm-section-label {
  font-size: 0.8rem;
  color: var(--text-muted, #9CA3AF);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  margin: 1.8rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ttm-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color, rgba(255,255,255,0.06));
}

/* ── Input Grid ── */
.ttm-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 700px) {
  .ttm-input-grid { grid-template-columns: 1fr; }
}

.ttm-input-card {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-color, rgba(255,255,255,0.06));
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  transition: border-color 0.2s;
}
.ttm-input-card:hover {
  border-color: rgba(255,255,255,0.12);
}

.ttm-input-card label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted, #9CA3AF);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── TH Sliders ── */
.ttm-th-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ttm-th-row img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  border-radius: 6px;
  flex-shrink: 0;
}
.ttm-th-value {
  font-size: 1.8rem;
  font-weight: 800;
  min-width: 52px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ttm-th-value--current { color: #F4C542; text-shadow: 0 0 15px rgba(244,197,66,0.3); }
.ttm-th-value--target { color: #3B82F6; text-shadow: 0 0 15px rgba(59,130,246,0.3); }

.ttm-slider-wrap {
  flex: 1;
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
}
.ttm-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: transparent;
  position: absolute;
  top: 0; left: 0;
  z-index: 10;
  margin: 0;
}
.ttm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #1B1D23;
  transition: transform 0.1s;
}
.ttm-slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
.ttm-slider--current::-webkit-slider-thumb { background: #F4C542; box-shadow: 0 0 12px rgba(244,197,66,0.5); }
.ttm-slider--target::-webkit-slider-thumb { background: #3B82F6; box-shadow: 0 0 12px rgba(59,130,246,0.5); }

.ttm-slider-progress {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 3px;
  pointer-events: none;
  z-index: 5;
  width: 0%;
}
.ttm-slider-progress--current { background: linear-gradient(90deg, #F4C542, #f59e0b); }
.ttm-slider-progress--target { background: linear-gradient(90deg, #3B82F6, #6366F1); }

/* ── Toggle Buttons ── */
.ttm-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
@media (max-width: 480px) {
  .ttm-toggle-row { grid-template-columns: 1fr; }
}
.ttm-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted, #9CA3AF);
  font-weight: 600;
  font-size: 0.88rem;
  user-select: none;
}
.ttm-toggle img {
  width: 30px; height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.ttm-toggle:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
}
.ttm-toggle.active {
  border-color: #F4C542;
  color: #F4C542;
  background: rgba(244,197,66,0.08);
  box-shadow: inset 0 0 15px rgba(244,197,66,0.08);
}
.ttm-toggle.active.blue-accent {
  border-color: #3B82F6;
  color: #3B82F6;
  background: rgba(59,130,246,0.08);
  box-shadow: inset 0 0 15px rgba(59,130,246,0.08);
}

/* ── Potion Select ── */
.ttm-select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 8px;
  color: var(--text-color, #eaeaea);
  font-family: inherit;
  font-size: 0.88rem;
}
.ttm-select option { background: #1a1a1a; color: #eaeaea; }

/* ── Builder Potion Slider ── */
.ttm-range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ttm-range-row input[type="range"] {
  flex: 1;
  accent-color: #F4C542;
  height: 6px;
  cursor: pointer;
}
.ttm-range-val {
  font-size: 1rem;
  font-weight: 700;
  color: #F4C542;
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Dashboard Results ── */
.ttm-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 800px) {
  .ttm-dashboard { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .ttm-dashboard { grid-template-columns: 1fr; }
}

.ttm-dash-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color, rgba(255,255,255,0.06));
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.ttm-dash-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.12);
}
.ttm-dash-card--primary {
  border-color: rgba(244,197,66,0.3);
  background: rgba(244,197,66,0.05);
}
.ttm-dash-card--primary:hover { border-color: rgba(244,197,66,0.5); }

.ttm-dash-label {
  font-size: 0.72rem;
  color: var(--text-muted, #9CA3AF);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  margin-bottom: 6px;
}
.ttm-dash-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.ttm-dash-value--gold { color: #F4C542; text-shadow: 0 0 15px rgba(244,197,66,0.25); }
.ttm-dash-value--green { color: #22C55E; text-shadow: 0 0 15px rgba(34,197,94,0.25); }
.ttm-dash-value--blue { color: #3B82F6; text-shadow: 0 0 15px rgba(59,130,246,0.25); }
.ttm-dash-value--purple { color: #8B5CF6; text-shadow: 0 0 15px rgba(139,92,246,0.25); }
.ttm-dash-value--orange { color: #F59E0B; text-shadow: 0 0 15px rgba(245,158,11,0.25); }
.ttm-dash-value--red { color: #EF4444; text-shadow: 0 0 15px rgba(239,68,68,0.25); }

.ttm-dash-sub {
  font-size: 0.78rem;
  color: var(--text-muted, #9CA3AF);
  margin-top: 4px;
}

/* ── Bottleneck Alert ── */
.ttm-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin: 1rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
}
.ttm-alert--lab {
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.25);
  color: #c4b5fd;
}
.ttm-alert--hero {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd;
}
.ttm-alert--builders {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  color: #86efac;
}
.ttm-alert strong { color: #fff; }
.ttm-alert__icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }

/* ── Track Breakdown ── */
.ttm-tracks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 700px) {
  .ttm-tracks { grid-template-columns: 1fr; }
}

.ttm-track-card {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color, rgba(255,255,255,0.06));
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
}
.ttm-track-card--full { grid-column: 1 / -1; }

.ttm-track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ttm-track-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ttm-track-name .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.ttm-track-time {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.ttm-track-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.ttm-track-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}
.ttm-track-bar--gold { background: linear-gradient(90deg, #F4C542, #F59E0B); }
.ttm-track-bar--purple { background: linear-gradient(90deg, #8B5CF6, #7C3AED); }
.ttm-track-bar--blue { background: linear-gradient(90deg, #3B82F6, #6366F1); }
.ttm-track-bar--green { background: linear-gradient(90deg, #22C55E, #10B981); }

/* ── Magic Item Optimizer ── */
.ttm-optimizer {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color, rgba(255,255,255,0.06));
  border-radius: 14px;
  padding: 1.4rem;
  margin: 1.5rem 0;
}
.ttm-optimizer__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ttm-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}
.ttm-opt-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color, rgba(255,255,255,0.06));
  border-radius: 10px;
  padding: 1rem;
}
.ttm-opt-card h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted, #9CA3AF);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ttm-opt-card .value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}
.ttm-opt-card .rec {
  font-size: 0.8rem;
  color: var(--text-muted, #9CA3AF);
  margin-top: 4px;
  line-height: 1.4;
}
.ttm-opt-card .rec strong { color: #F4C542; }

/* ── B.O.B. Section ── */
.ttm-bob {
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(139,92,246,0.04));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 14px;
  padding: 1.4rem;
  margin: 1.5rem 0;
}
.ttm-bob__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ttm-bob__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .ttm-bob__grid { grid-template-columns: 1fr; }
}
.ttm-bob__stat {
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}
.ttm-bob__stat label {
  font-size: 0.72rem;
  color: var(--text-muted, #9CA3AF);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}
.ttm-bob__stat .val {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}
.ttm-bob__stat .val.blue { color: #60A5FA; }
.ttm-bob__stat .val.gold { color: #F4C542; }
.ttm-bob__note {
  font-size: 0.8rem;
  color: var(--text-muted, #9CA3AF);
  margin-top: 10px;
  line-height: 1.5;
}

/* ── Per-TH Breakdown Table ── */
.ttm-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color, rgba(255,255,255,0.06));
  border-radius: 12px;
}
.ttm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.ttm-table th {
  background: rgba(0,0,0,0.3);
  padding: 10px 12px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #9CA3AF);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
  white-space: nowrap;
}
.ttm-table td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-color, #eaeaea);
  white-space: nowrap;
}
.ttm-table tr:last-child td { border-bottom: none; }
.ttm-table tr:hover td { background: rgba(255,255,255,0.03); }
.ttm-table td:first-child { font-weight: 700; color: #F4C542; }
.ttm-table .bottleneck { color: #F87171; font-weight: 700; }
.ttm-table .th-label { font-weight: 700; }

/* ── GP Breakdown ── */
.ttm-gp-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}
@media (max-width: 600px) {
  .ttm-gp-breakdown { grid-template-columns: 1fr; }
}
.ttm-gp-phase {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color, rgba(255,255,255,0.06));
  border-radius: 8px;
  padding: 0.8rem;
  text-align: center;
}
.ttm-gp-phase .phase-days {
  font-size: 1.2rem;
  font-weight: 800;
  color: #F4C542;
}
.ttm-gp-phase .phase-detail {
  font-size: 0.78rem;
  color: var(--text-muted, #9CA3AF);
  margin-top: 2px;
}

/* ── Hammer vs Potion Cross-over ── */
.ttm-crossover {
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ttm-crossover__label {
  font-size: 0.82rem;
  color: #86efac;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ttm-crossover__value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #22C55E;
}

/* ── FAQ updates ── */
.tool-faq .faq-question {
  font-size: 0.92rem;
  line-height: 1.4;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .ttm-calc {
    padding: 1.5rem;
  }
  .ttm-calc__title {
    font-size: 1.3rem;
  }
  .ttm-dash-value {
    font-size: 1.4rem;
  }
}
@media (max-width: 480px) {
  .ttm-calc {
    padding: 1rem;
    margin: 2rem 0;
  }
  .ttm-calc__title {
    font-size: 1.1rem;
  }
  .ttm-dash-value {
    font-size: 1.2rem;
  }
  .ttm-th-value {
    font-size: 1.3rem;
    min-width: 36px;
  }
  .ttm-th-row img {
    width: 32px;
    height: 32px;
  }
  .ttm-input-card {
    padding: 0.8rem 1rem;
  }
}
