/* insight/ — kalkulator laju spawn & denah jangkauan (Spawner S2).
   Warna selalu lewat token tema; bentuk SVG diberi kelas rmap__*. */

.spawner-insight__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.spawner-insight__sub[hidden] { display: none; }

.spawner-insight__note {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}

.spawner-insight__lines {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.spawner-insight__line--warn { color: var(--status-warn); }

/* ── Angka utama ── */
.spawner-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 480px) {
  .spawner-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.spawner-stat {
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  min-width: 0;
}

.spawner-stat__value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.spawner-stat__label {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Garis waktu ── */
.spawner-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.spawner-timeline__step {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 74px;
  padding: 7px 9px;
  border-left: 3px solid var(--accent-teal);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
}

.spawner-timeline__step--cap { border-left-color: var(--status-warn); }
.spawner-timeline__time { color: var(--text-muted); }
.spawner-timeline__gain { color: var(--accent-teal-bright); font-weight: 600; }
.spawner-timeline__total { color: var(--text-secondary); }

/* ── Sakelar & legenda ── */
.spawner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.spawner-chip {
  flex-shrink: 0;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}

.spawner-chip[aria-pressed="true"] {
  border-color: var(--accent-teal);
  background: var(--bg-surface-3);
  color: var(--text-primary);
}

.spawner-chip:focus-visible {
  outline: 2px solid var(--accent-teal-bright);
  outline-offset: 2px;
}

.spawner-chip--sphere[aria-pressed="true"] { border-color: var(--text-secondary); }
.spawner-chip--cap[aria-pressed="true"] { border-color: var(--status-warn); }

.spawner-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.spawner-legend__swatch {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.spawner-legend__swatch--area { background: var(--accent-teal); opacity: 0.55; }
.spawner-legend__swatch--spawner { background: var(--accent-copper); }

/* ── Denah SVG ── */
.spawner-rmap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  padding: 8px;
}

.rmap {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
}

.rmap line, .rmap rect, .rmap circle {
  vector-effect: non-scaling-stroke;
}

.rmap__grid line { stroke: var(--border-subtle); stroke-width: 1; }
.rmap__area rect { fill: var(--accent-teal); fill-opacity: 0.45; stroke: var(--accent-teal); stroke-width: 0.5; }
.rmap__spawner { fill: var(--accent-copper); }
.rmap__mob { fill: var(--accent-copper-bright); fill-opacity: 0.25; stroke: var(--accent-copper-bright); stroke-width: 1.5; }
.rmap__need { stroke: var(--accent-copper-bright); stroke-width: 2; stroke-dasharray: 3 2; }
.rmap__cap { fill: none; stroke: var(--status-warn); stroke-width: 1.5; stroke-dasharray: 6 4; }
.rmap__sphere { fill: none; stroke: var(--text-secondary); stroke-width: 1.5; stroke-dasharray: 2 3; }
.rmap__label { fill: var(--text-muted); font-family: var(--font-mono); }

.spawner-scenarios {
  margin: 12px 0 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
}

.spawner-scenarios__summary {
  padding: 9px 11px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.spawner-scenarios__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.spawner-scenarios__table caption {
  padding: 0 10px 7px;
  text-align: left;
  color: var(--text-muted);
}

.spawner-scenarios__table th,
.spawner-scenarios__table td {
  padding: 7px 10px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
}

.spawner-scenarios__table thead th { color: var(--text-muted); font-weight: 600; }
.spawner-scenarios__table tbody tr.is-selected { background: var(--bg-surface-3); }
.spawner-scenarios__table tbody tr.is-selected th { color: var(--accent-teal-bright); }
