/* hub.css — Player hub page styles */

/* ── Page ID ──────────────────────────────────────── */
.pid {
  font-size: 0.5em;
  color: var(--text-muted);
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.08em;
  font-weight: 400;
}

/* ── Grid layout ──────────────────────────────────── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
@media (max-width: 500px) {
  .hub-grid { grid-template-columns: 1fr; }
}

/* ── Card ─────────────────────────────────────────── */
.hub-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.hub-card:hover { border-color: var(--border2); }

.hub-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
}

/* ── Table ─────────────────────────────────────────── */
.hub-table {
  width: 100%;
  border-collapse: collapse;
}
.hub-table th {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg3);
  padding: 7px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.hub-table th:last-child { text-align: right; }

.hub-table td {
  padding: 8px 14px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.83rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.hub-table tr:last-child td { border-bottom: none; }

/* First column — label */
.hub-table td:first-child {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  width: 40%;
}
/* Last column — value */
.hub-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--text-bright);
}

/* Row hover */
.hub-table tbody tr {
  transition: background 0.12s;
}
.hub-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

/* Total row */
.total-row td {
  border-top: 1px solid var(--border2);
  color: var(--text-bright) !important;
  font-weight: 700 !important;
}

/* Colour helpers */
.gold   { color: var(--gold)   !important; }
.red    { color: var(--red)    !important; }
.muted  { color: var(--text-muted) !important; }
.purple { color: #9b59b6       !important; }

/* Stat dot */
.stat-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Stat bars ─────────────────────────────────────── */
.hub-bar-wrap {
  height: 5px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
  width: 100%;
}
.hub-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.hub-bar--energy { background: #3498db; }
.hub-bar--graft  { background: var(--red); }
.hub-bar--happy  { background: #f1c40f; }
.hub-bar--life   { background: #2ecc71; }

.bar-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* The bar td needs special treatment */
.hub-table td:has(.hub-bar-wrap) {
  text-align: left !important;
  color: var(--text-dim) !important;
}

/* ── Alerts ────────────────────────────────────────── */
.hub-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  border-top: 1px solid;
}
.hub-alert--jail {
  background: rgba(212,43,51,0.06);
  border-color: rgba(212,43,51,0.2);
  color: #e05a62;
}
.hub-alert--hosp {
  background: rgba(52,152,219,0.06);
  border-color: rgba(52,152,219,0.2);
  color: #5dade2;
}

/* ── Empty state ───────────────────────────────────── */
.hub-empty {
  padding: 16px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}
.hub-empty a {
  color: var(--red);
  font-weight: 600;
  font-style: normal;
}

/* ── Light mode overrides ──────────────────────────── */
[data-theme="light"] .hub-card-title {
  background: var(--bg3);
  color: var(--text-muted);
}
[data-theme="light"] .hub-table th {
  background: var(--bg3);
}
[data-theme="light"] .hub-table tbody tr:hover {
  background: rgba(0,0,0,0.03);
}
