/* results.tbnq.org.au stylesheet
   Path: /var/www/results.tbnq.org.au/static/css/results.css

   Public-facing archive look. Lighter than the live scoring display
   because this is read-as-a-document not watched-on-a-TV. Same lime +
   maroon palette so it still feels part of the same family.
*/

* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f6f7fb;
    color: #14181f;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

a { color: #6b9e1c; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

/* Header */
.rt-header {
    background: linear-gradient(180deg, #1e2a78, #0f1640);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.rt-brand {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}
.rt-brand i { color: #b6ed3a; font-size: 28px; }
.rt-brand-line1 { font-size: 18px; letter-spacing: 1px; text-transform: uppercase; }
.rt-brand-line2 { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; opacity: 0.7; }
.rt-brand-stack { display: flex; flex-direction: column; line-height: 1.1; }
.rt-brand:hover { text-decoration: none; }
.rt-nav { display: flex; gap: 18px; }
.rt-nav a {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    opacity: 0.85;
}
.rt-nav a:hover { opacity: 1; text-decoration: none; }

/* Main */
.rt-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 28px 40px;
}

/* Hero */
.rt-hero {
    text-align: center;
    padding: 24px 0 18px;
}
.rt-hero h1 {
    margin: 0 0 6px;
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 0.5px;
}
.rt-hero p { color: #555; margin: 0; }

/* Empty state */
.rt-empty {
    text-align: center;
    padding: 80px 20px;
    color: #555;
}
.rt-empty i { font-size: 56px; color: #d3d6e0; margin-bottom: 14px; }
.rt-empty h2 { margin: 4px 0 6px; font-size: 22px; }

/* Event grid */
.rt-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 24px;
}
.rt-event-card {
    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 12px;
    padding: 18px;
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.rt-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15,22,64,0.12);
    border-color: #b6ed3a;
    text-decoration: none;
}
.rt-event-logo {
    width: 100%;
    aspect-ratio: 16/9;
    background: #f1f3fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.rt-event-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}
.rt-event-logo-blank i {
    font-size: 56px;
    color: #c9cdd9;
}
.rt-event-meta h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.rt-event-venue, .rt-event-date {
    font-size: 13px;
    color: #555;
    margin-bottom: 3px;
}
.rt-event-finalised {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-top: 8px;
}

.rt-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 6px;
}
.rt-pill-final { background: rgba(67,209,122,0.15); color: #1f7d3f; }
.rt-pill-warn  { background: rgba(255,210,74,0.18); color: #8a6500; }
.rt-pill-correction { background: rgba(122,29,46,0.15); color: #7a1d2e; }

/* Event header */
.rt-event-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 18px 0 24px;
    padding: 22px;
    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 12px;
}
.rt-event-header-logo img {
    max-height: 100px;
    max-width: 160px;
    object-fit: contain;
}
.rt-event-header-info h1 {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 900;
}
.rt-event-header-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: #555;
    font-size: 14px;
}
.rt-event-header-meta i { color: #6b9e1c; margin-right: 4px; }
.rt-event-header-archive {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

/* Tabs */
.rt-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e3e6ee;
    margin-bottom: 18px;
}
.rt-tab {
    background: none;
    border: 0;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #555;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.rt-tab:hover { color: #14181f; }
.rt-tab.active {
    color: #1e2a78;
    border-bottom-color: #b6ed3a;
}
.rt-panel { display: none; }
.rt-panel.active { display: block; }

/* Sections */
.rt-section { margin-bottom: 32px; }
.rt-section h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #1e2a78;
    padding-bottom: 6px;
    border-bottom: 1px solid #e3e6ee;
}

/* Tables */
.rt-table-wrap {
    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 8px;
    overflow-x: auto;
}
.rt-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
.rt-table thead th {
    background: #f1f3fa;
    color: #1e2a78;
    text-align: center;
    padding: 8px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    border-bottom: 2px solid #b6ed3a;
    vertical-align: middle;
}
.rt-table tbody td {
    padding: 7px 10px;
    border-top: 1px solid #f1f3fa;
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
}
.rt-table tbody tr:nth-child(even) td { background: #fafbff; }
.rt-num     { text-align: center; }
.rt-rank    { font-weight: 800; }
.rt-team, .rt-bowler { font-weight: 700; }
.rt-pts     { color: #6b9e1c; font-weight: 900; }
.rt-ind     { color: #b8870b; font-weight: 800; }
.rt-x       { color: #6b9e1c; font-weight: 800; }
.rt-s       { color: #b8870b; font-weight: 800; }
.rt-o       { color: #c52f55; font-weight: 800; }
.rt-card-pos { color: #1f7d3f; font-weight: 800; }
.rt-card-neg { color: #c52f55; font-weight: 800; }



/* Podium */
.rt-podium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.rt-podium-card {
    background: linear-gradient(165deg, #fff, #f6f7fb);
    border: 1px solid #e3e6ee;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
.rt-podium-1 { border-color: #ffd24a; box-shadow: 0 0 0 1px rgba(255,210,74,0.4); }
.rt-podium-2 { border-color: #d1d5db; }
.rt-podium-3 { border-color: #d97706; }
.rt-podium-rank { font-size: 22px; font-weight: 900; color: #aaa; }
.rt-podium-1 .rt-podium-rank { color: #b8870b; }
.rt-podium-2 .rt-podium-rank { color: #888; }
.rt-podium-3 .rt-podium-rank { color: #b06002; }
.rt-podium-name {
    font-size: 14px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.5px; margin: 4px 0 2px;
}
.rt-podium-team { font-size: 11px; color: #888; letter-spacing: 1.5px; text-transform: uppercase; }
.rt-podium-avg {
    font-size: 28px; font-weight: 900; color: #6b9e1c;
    margin-top: 4px;
}
.rt-podium-meta {
    font-size: 10px; color: #888; letter-spacing: 1px; margin-top: 2px;
    display: flex; justify-content: center; gap: 6px;
}

/* Buttons */
.rt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #1e2a78;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.rt-btn:hover { background: #2a3aa0; text-decoration: none; }

.rt-muted { color: #777; }

/* Footer */
.rt-footer {
    text-align: center;
    padding: 24px;
    color: #888;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-top: 1px solid #e3e6ee;
    margin-top: 40px;
    background: #fff;
}
.rt-footer-meta { margin-top: 4px; opacity: 0.7; }

/* Mobile */
@media (max-width: 700px) {
    .rt-main { padding: 16px; }
    .rt-event-header { flex-direction: column; align-items: flex-start; }
    .rt-event-header-info h1 { font-size: 22px; }
    .rt-tabs { overflow-x: auto; }
    .rt-tab { padding: 10px 14px; font-size: 11px; }
}


/* ── Sub-tabs (per-division within a panel) ──────────────────── */
.rt-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid #d8dcec;
    margin: 14px 0 18px 0;
    padding: 0;
}
.rt-subtab {
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    color: #4b5474;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transform: translateY(1px);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rt-subtab:hover {
    color: #1e2a78;
    background: #f1f3fa;
}
.rt-subtab.active {
    color: #1e2a78;
    background: #ffffff;
    border-color: #d8dcec #d8dcec #ffffff;
}
.rt-subpanel {
    display: none;
}
.rt-subpanel.active {
    display: block;
}

/* ── Ineligible bowler row (italics + dimmed, kiosk-style) ────── */
.rt-table tbody tr.rt-row-ineligible td {
    font-style: italic;
    color: #8b91a7;
    opacity: 0.7;
}
.rt-table tbody tr.rt-row-ineligible td.rt-bowler {
    color: #6f7693;
}

/* ── Games tab (head-to-head pairings) ──────────────────────────── */
.rt-games-table .rt-vs {
    color: #8b91a7;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.rt-games-table tr.rt-row-bye td {
    background: #fff8e1;
    color: #8a6f00;
    font-style: italic;
}
.rt-games-table tr.rt-row-bye .rt-vs {
    color: #b8870b;
}
.rt-games-table .rt-winner {
    color: #1f7d3f;
    font-weight: 800;
}

/* Embedded in the tbnq.org.au website: no chrome, the host page's own background. */
body.rt-embed { background: transparent; }
body.rt-embed .rt-header, body.rt-embed .rt-footer { display: none; }
body.rt-embed .rt-main { padding-top: 0; }
