/* ranking_table.css — scratch-only additions for the sortable data table.
   Reuses production tokens (--theme-primary, --glass-border, --font-*) from
   css_ranking_v2.css, and the .tactical-table row look, so it reads as 1:1. */

.rt-wrap {
  width: 100%;
  max-width: 1300px;
  margin: 8px auto 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
  overflow-x: auto;
}

.rt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px; /* same row gap as .tactical-table */
}

/* ── HEADER ── */
.rt-table thead .rt-head th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 179, 0, 0.55);
  text-align: left;
  padding: 12px 18px;
  background: rgba(4, 8, 18, 0.95);
  border-top: 1px solid rgba(255, 179, 0, 0.08);
  border-bottom: 1px solid rgba(255, 179, 0, 0.18);
  backdrop-filter: blur(10px);
  white-space: nowrap;
  user-select: none;
}

.rt-table th.rt-num { text-align: right; }
.rt-table th.rt-th-pos { text-align: center; color: rgba(255, 255, 255, 0.3); }

.rt-table th.rt-sortable { cursor: pointer; transition: color 0.2s ease, background 0.2s ease; }
.rt-table th.rt-sortable:hover { color: var(--theme-primary); background: rgba(255, 179, 0, 0.06); }
.rt-table th.rt-active { color: var(--theme-primary); }

/* font-independent arrows (production loads a filtered Material Symbols set that omits arrow_up/down) */
.rt-arrow {
  font-size: 11px;
  vertical-align: middle;
  opacity: 0;
  margin-left: 3px;
  transition: opacity 0.2s ease;
}
.rt-table th.rt-active .rt-arrow { opacity: 0.9; }
.rt-table th.rt-active.rt-asc .rt-arrow::after  { content: "\2191"; } /* ↑ */
.rt-table th.rt-active.rt-desc .rt-arrow::after { content: "\2193"; } /* ↓ */

/* ── BODY CELLS (mirror .tactical-table dark slabs) ── */
.rt-table tbody td {
  padding: 14px 18px;
  background: rgba(4, 8, 18, 0.7);
  border-top: 1px solid rgba(255, 179, 0, 0.05);
  border-bottom: 1px solid rgba(255, 179, 0, 0.05);
  vertical-align: middle;
  transition: background 0.25s ease, border-color 0.25s ease;
  font-family: var(--font-stat);
}
.rt-table tbody td.rt-num { text-align: right; font-variant-numeric: tabular-nums; }

.rt-table tbody tr { animation: revealUp var(--animation-speed) var(--ease-out-expo) forwards; animation-delay: calc(var(--index, 0) * 0.03s); opacity: 0; transition: all 0.2s ease; }

.rt-table tbody tr:hover td { background: rgba(255, 179, 0, 0.08); border-top-color: rgba(255, 179, 0, 0.4); border-bottom-color: rgba(255, 179, 0, 0.4); }
.rt-table tbody tr:hover td:first-child { border-left: 4px solid rgba(255, 179, 0, 0.6); border-radius: 4px 0 0 4px; }
.rt-table tbody tr:hover td:last-child  { border-right: 2px solid rgba(255, 179, 0, 0.6); border-radius: 0 4px 4px 0; }

/* position column */
.rt-pos { width: 70px; text-align: center; font-weight: 700; color: rgba(255, 255, 255, 0.28); font-size: 1.05rem; }
.rt-table tbody tr:hover .rt-pos { color: var(--theme-primary); }

/* player cell: avatar + clickable name → steam profile */
.rt-player { min-width: 220px; }
.rt-player-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; }
.rt-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--glass-border);
  object-fit: cover; flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.rt-player-link:hover .rt-avatar { border-color: var(--theme-primary); box-shadow: 0 0 14px rgba(255, 179, 0, 0.35); }
.rt-name { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; color: #fff; transition: color 0.2s ease; }
.rt-player-link:hover .rt-name { color: var(--theme-primary); }
.rt-steamid { display: block; font-size: 0.6rem; letter-spacing: 1px; color: rgba(255, 255, 255, 0.3); font-family: var(--font-stat); }

/* numeric value styling (gold like .stat-value but table-sized) */
.rt-val { color: var(--theme-primary); font-size: 1.15rem; font-weight: 600; }
.rt-val-muted { color: rgba(255, 255, 255, 0.7); font-size: 1.15rem; font-weight: 500; }

/* level pill (the `rank` column = in-game level) */
.rt-lvl {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 28px; padding: 0 8px;
  border-radius: 6px;
  font-family: var(--font-display); font-weight: 800; font-size: 0.95rem;
  color: #fff; letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}
.rt-lvl[data-tier="1"] { background: linear-gradient(135deg, #2b2b2e, #1c1c1e); border-color: #535356; }
.rt-lvl[data-tier="2"] { background: linear-gradient(135deg, #422a24, #2b1b17); border-color: #ca4e22; }
.rt-lvl[data-tier="3"] { background: linear-gradient(135deg, #2e2d6e, #1d1c55); border-color: #5c6bc0; }
.rt-lvl[data-tier="4"] { background: linear-gradient(135deg, #6e442b, #482c1c); border-color: #ba5b20; }
.rt-lvl[data-tier="5"] { background: linear-gradient(135deg, #732a37, #4b1b24); border-color: #bc233c; }
.rt-lvl[data-tier="6"] { background: linear-gradient(135deg, #656467, #424143); border-color: #8d8c8f; }
.rt-lvl[data-tier="7"] { background: linear-gradient(135deg, #6e3318, #55250e); border-color: #ff7043; }
.rt-lvl[data-tier="8"] { background: linear-gradient(135deg, #5f3256, #3e2038); border-color: #ffd54f; box-shadow: 0 0 12px rgba(255, 213, 79, 0.4); }

.rt-empty { text-align: center; padding: 90px 20px; opacity: 0.35; letter-spacing: 4px; font-family: var(--font-display); }

/* mobile: hide secondary stat columns, keep # / name / value / lvl */
@media (max-width: 760px) {
  .rt-table th.rt-hide-sm, .rt-table tbody td.rt-hide-sm { display: none; }
  .rt-player { min-width: 150px; }
  .rt-avatar { width: 34px; height: 34px; }
}

/* ── LOCKED sectors (landing) — big yellow lock on the image, dimmed+blurred card,
   status text (WKRÓTCE) stays legible. ── */
.sector-tile.locked { cursor: not-allowed; }
.sector-tile.locked:hover { transform: none; }          /* no clickable lift */
.sector-tile.locked .sector-icon-wrap { position: relative; }
.sector-tile.locked .sector-icon {
  filter: blur(2px) brightness(0.6) grayscale(0.3);
  transition: none;
}
.sector-tile.locked:hover .sector-icon { filter: blur(2px) brightness(0.6) grayscale(0.3); }
.sector-lock {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  color: var(--theme-primary, #ffb300);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.85), 0 2px 8px rgba(0, 0, 0, 0.7);
  z-index: 3;
  pointer-events: none;
}
.sector-tile.locked .sector-name   { opacity: 0.65; }
.sector-tile.locked .sector-status { color: var(--theme-primary, #ffb300); opacity: 0.95; font-weight: 700; }

/* locked ranking tabs (CS2/CS:S/CS1.6/Discord/TS3) */
.v2-tab-btn.locked {
  opacity: 0.4;
  filter: grayscale(0.7);
  cursor: not-allowed;
  pointer-events: none;
}
