/*
 * Casino Niagara Poker — Shared Stylesheet
 * Loaded by all four pages: index.html, badbeat.html, calendar.html, tournamentstats.html
 * Page-specific styles remain in each file's <style> block.
 */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
  --navy:        #0d1b2a;
  --navy2:       #162032;
  --navy3:       #1e2d40;
  --gold:        #d4af37;
  --gold2:       #f0d060;
  --gold3:       #c8982c;
  --red:         #c0392b;
  --green:       #27ae60;
  --green2:      #6fcf97;
  --amber:       #e67e22;
  --blue:        #2980b9;
  --text:        #e8e0cf;
  --muted:       #8a9bb0;
  --card-bg:     rgba(22, 32, 50, 0.88);
  --border:      rgba(212, 175, 55, 0.22);
  --radius:      14px;

  /* Tournament type colours */
  --wed:         #2563a8;
  --wed-bg:      rgba(37, 99, 168, 0.18);
  --sun:         #b07d2c;
  --sun-bg:      rgba(176, 125, 44, 0.18);
  --sun550:      #2e7d52;
  --sun550-bg:   rgba(46, 125, 82, 0.18);
  --main:        #8b2020;
  --main-bg:     rgba(139, 32, 32, 0.22);
  --wed275:      #5b78a8;
  --wed275-bg:   rgba(91, 120, 168, 0.18);
  --fri240:      #8a6fb0;
  --fri240-bg:   rgba(138, 111, 176, 0.18);
  --mon175:      #4a9e7a;
  --mon175-bg:   rgba(74, 158, 122, 0.18);
  --tue225:      #c27a3a;
  --tue225-bg:   rgba(194, 122, 58, 0.18);
  --fri_bounty:  #b05070;
  --fri_bounty-bg: rgba(176, 80, 112, 0.18);
}

/* ── Body ── */
body {
  background: var(--navy);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Felt-texture background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.012) 2px, rgba(255,255,255,0.012) 4px),
    radial-gradient(ellipse at 20% 20%, #1a2d45 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, #1a2535 0%, transparent 60%),
    var(--navy);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 16px 60px;
}

/* ── Card utility ── */
/* Keep .card utility, but also protect key card-like components in case
   class="card" is accidentally omitted in generated HTML. */
.card,
.hero-stats,
.live-table-card,
.game-group,
.tourney-card,
.waitlist-card,
.lev2l-card,
.amenity-card,
.bbj-card,
.cal-wrapper,
.detail-card,
.results-table-wrap,
.countdown-box,
.cd-running-card,
.cd-countdown-card,
.live-tournament-card,
.hero-card,
.stat-card,
.chart-card,
.history-section,
.results-wrap,
.lb-wrap,
.award-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Sticky nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 27, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s, box-shadow 0.25s;
}
.site-nav.scrolled {
  background: rgba(13, 27, 42, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}
.site-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 560px) {
  .site-nav__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 320px) {
  .site-nav__inner {
    grid-template-columns: 1fr;
  }
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}
.nav-link--active {
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.6);
  color: var(--gold2);
  box-shadow: inset 0 0 8px rgba(212, 175, 55, 0.1);
}

/* ── Header ── */
header { text-align: center; margin-bottom: 40px; }

.casino-label {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

header h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.35);
}

.disclaimer { font-size: 13px; color: var(--muted); margin-top: 8px; margin-bottom: 0; }

/* ── Divider ── */
.divider { display: flex; align-items: center; gap: 14px; margin: 14px auto 0; max-width: 320px; }
.divider::before,
.divider::after { content: ''; flex: 1; height: 1px; }
.divider::before { background: linear-gradient(to right, transparent, var(--gold3)); }
.divider::after  { background: linear-gradient(to left,  transparent, var(--gold3)); }
.divider span    { color: var(--gold3); font-size: 16px; }

/* ── Section title ── */
.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

/* ── Flag images ── */
.flag-img { width: 20px; height: 15px; border-radius: 2px; vertical-align: middle; position: relative; top: -1px; object-fit: cover; }

/* ── Results table (shared by calendar.html and tournamentstats.html) ── */
.results-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.results-table thead tr { background: rgba(212,175,55,0.1); border-bottom: 1px solid var(--border); }
.results-table thead th {
  padding: 12px 16px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  text-align: right;
}
/* Support both naming conventions used across pages */
.results-table thead th.th-l,
.results-table thead th.th-left { text-align: left; }
/* Sortable columns */
.results-table thead th[data-col] { cursor: pointer; user-select: none; transition: background 0.15s; position: relative; }
.results-table thead th[data-col]:hover { background: rgba(212,175,55,0.08); }
.results-table thead th[data-col].sort-asc::after  { content: ' ▲'; font-size: 9px; color: var(--gold2); }
.results-table thead th[data-col].sort-desc::after { content: ' ▼'; font-size: 9px; color: var(--gold2); }
.results-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s; }
.results-table tbody tr:last-child { border-bottom: none; }
.results-table tbody tr:hover { background: rgba(255,255,255,0.035); }
.results-table td { padding: 11px 16px; white-space: nowrap; text-align: right; }
.results-table td.td-l { text-align: left; }
.rt-date    { color: var(--muted); font-size: 12px; }
.rt-type    { display: inline-flex; align-items: center; gap: 7px; }
.rt-dot     { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rt-entries { color: var(--text);   font-weight: 600; font-variant-numeric: tabular-nums; }
.rt-pool    { color: var(--gold);   font-weight: 600; font-variant-numeric: tabular-nums; }
.rt-first   { color: var(--green2); font-weight: 600; font-variant-numeric: tabular-nums; }
.rt-winner  { color: var(--text); }
.rt-unknown { color: var(--muted); font-style: italic; }
.rt-link         { color: var(--gold3); text-decoration: none; transition: color 0.15s; }
.rt-link:hover   { color: var(--gold2); text-decoration: underline; }
.rt-winner-link  { color: var(--text); text-decoration: none; border-bottom: 1px dotted rgba(212,175,55,0.35); transition: color 0.15s, border-color 0.15s; }
.rt-winner-link:hover { color: var(--gold2); border-color: var(--gold2); }
.results-source       { font-size: 11px; color: var(--muted); text-align: right; margin-top: 10px; font-style: italic; }
.results-source a      { color: var(--gold3); text-decoration: none; }
.results-source a:hover { text-decoration: underline; }
/* Sort indicators for leaderboard table */
#lb-table thead th.sort-asc::after  { content: ' ▲'; font-size: 9px; color: var(--gold2); }
#lb-table thead th.sort-desc::after { content: ' ▼'; font-size: 9px; color: var(--gold2); }

/* ── Mobile scroll indicator for tables ──
   Adds a fading gradient on the right edge of scrollable table wrappers
   on narrow screens to hint that the table scrolls horizontally.
   REVERT NOTE: remove this block + .scroll-hint class to undo. */
.results-table-wrap,
.results-wrap,
.lb-wrap {
  position: relative;
}
.results-table-wrap::after,
.results-wrap::after,
.lb-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(13, 27, 42, 0.85));
  opacity: 0;
  transition: opacity 0.3s;
}
@media (max-width: 700px) {
  .results-table-wrap::after,
  .results-wrap::after,
  .lb-wrap::after {
    opacity: 1;
  }
  /* Hide the gradient once the user has scrolled to the end */
  .results-table-wrap.scrolled-end::after,
  .results-wrap.scrolled-end::after,
  .lb-wrap.scrolled-end::after {
    opacity: 0;
  }
}

/* ── Footer ── */
footer { text-align: center; font-size: 12px; color: var(--muted); }
footer a { color: var(--gold3); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer p + p { margin-top: 6px; }
.copyright { text-align: center; font-size: 11px; color: var(--muted); margin-top: 32px; padding: 16px 0; border-top: 1px solid var(--border); letter-spacing: 0.5px; }
