/* ── Stats Panel ──────────────────────────────────────────────────────
   Collapsed: 2×3 grid of core combat stats, same height as the ability
   bar (--hud-h, shared plate style lives in abilities.css). The chevron
   expands the panel; .bottom-hud is bottom-aligned so it grows upward. */

.stats-panel {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--hud-h);
  box-sizing: border-box;
  padding: 10px 26px 10px 14px; /* right padding clears the expand chevron */
  min-width: 186px;
  pointer-events: none;
}

.stats-panel.expanded {
  height: auto;
  min-height: var(--hud-h);
}

/* ── Grid ─────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  width: 100%;
}

/* Extra stats only show while expanded */
.stats-panel:not(.expanded) .stat-row.extra {
  display: none;
}

/* ── Expand/collapse chevron ──────────────────────────────────────── */

.stats-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 17px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 8px;
  line-height: 1;
  color: rgba(240, 192, 64, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.12s, border-color 0.12s;
}

.stats-toggle:hover {
  background: rgba(240, 192, 64, 0.18);
  border-color: rgba(240, 192, 64, 0.5);
}

/* ── Stat Row ─────────────────────────────────────────────────────── */

.stat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stat-row.hidden {
  visibility: hidden;
}

/* ── Icon ─────────────────────────────────────────────────────────── */

.stat-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.8;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.8));
}

/* ── Value text ───────────────────────────────────────────────────── */

.stat-value {
  font-size: 12px;
  font-weight: 600;
  color: #e8e8e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
