/**
 * Black Bird Derby Manager - Public Styles
 * TV-Optimized Display for Big Screens
 */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --bbd-navy: #3d77dd;
    --bbd-gold: #e8720c;
    --bbd-orange: #e8720c;
    --bbd-green: #4CAF50;
    --bbd-red: #902e1a;
    --bbd-white: #ffffff;
    --bbd-light-gray: #e4f0fb;
    --bbd-border: #e0e0e0;
}

/* Base Container Styles */
.bbd-leaderboard-container,
.bbd-dashboard {
    font-family: 'Inter', sans-serif;
    background: var(--bbd-white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

/* ===============================
   TV-OPTIMIZED LEADERBOARD
   Light Broadcast Theme
   =============================== */
.bbd-tv {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh; /* dynamic viewport height — accounts for browser chrome */
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    background: #ffffff;
    overflow: hidden;
}

/* --- Banner Header (single image or fallback) --- */
.bbd-tv-banner {
    flex: 0 0 auto;
    width: 100%;
    /* 2.8.10 — Move the header's breathing room to ABOVE the banner
       (keeps it out of the TV's top overscan) instead of below it.
       2.8.13 — +5px top spacing. */
    padding-top: clamp(13px, calc(1.6vh + 5px), 31px);
    background: #ffffff;
}

.bbd-tv-banner-img {
    display: block;
    width: 100%;
    height: auto;
    /* 2.8.12 — Kill the theme's default img bottom margin (the ~20px gap
       under the header). The theme rule `.sp-postcontent img` (specificity
       0,1,1) outranks this class, so !important is required to win. The
       header's breathing room lives above the banner now (padding-top). */
    margin-bottom: 0 !important;
}

.bbd-tv-banner-fallback {
    width: 100%;
    background: #1a3a6e;
    display: flex;
    align-items: center;
    padding: 12px 48px;
    gap: 24px;
}

.bbd-tv-banner-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(18px, 2.2vw, 32px);
    font-weight: 700;
    color: #fff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.bbd-tv-banner-accent {
    width: 3px;
    height: 28px;
    background: rgba(255,255,255,0.25);
    flex-shrink: 0;
}

.bbd-tv-banner-live {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(12px, 1vw, 16px);
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* --- Table Area (white, high contrast) --- */
.bbd-tv-table-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #ffffff;
}

.bbd-tv .bbd-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.bbd-tv .bbd-leaderboard-table thead {
    background: #f5f7fa;
}

.bbd-tv .bbd-leaderboard-table th {
    padding: clamp(6px, 0.8vh, 10px) clamp(10px, 1.2vw, 24px);
    text-align: left;
    font-size: clamp(9px, 0.7vw, 12px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8a96a8;
    border-bottom: 2px solid #e8ecf0;
}

.bbd-tv .bbd-leaderboard-table th:first-child {
    padding-left: 48px;
}

.bbd-tv .bbd-leaderboard-table th.col-place {
    width: 70px;
    text-align: center;
    padding-left: 0;
}

.bbd-tv .bbd-leaderboard-table th.col-weight { width: 180px; }
.bbd-tv .bbd-leaderboard-table th.col-length { width: 130px; }
.bbd-tv .bbd-leaderboard-table th.col-time   { width: 120px; }

.bbd-tv .bbd-leaderboard-table tbody tr {
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.2s;
}

.bbd-tv .bbd-leaderboard-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.bbd-tv .bbd-leaderboard-table td {
    padding: clamp(8px, 1.1vh, 16px) clamp(10px, 1.2vw, 24px);
    font-size: clamp(13px, 1.5vw, 26px);
    color: #2d3748;
    white-space: nowrap;
    font-weight: 500;
}

.bbd-tv .bbd-leaderboard-table td:first-child {
    padding-left: 48px;
}

.bbd-tv .bbd-leaderboard-table td.col-place {
    text-align: center;
    padding-left: 0;
}

.bbd-tv .bbd-leaderboard-table td.col-name {
    font-weight: 600;
    color: #1a2d50;
    font-size: clamp(14px, 1.6vw, 28px);
}

/* Place badges — flat, broadcast-style */
.bbd-tv .bbd-place-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(24px, 2.6vw, 40px);
    height: clamp(24px, 2.6vw, 40px);
    border-radius: 50%;
    font-weight: 700;
    font-size: clamp(11px, 1vw, 17px);
    font-family: 'Oswald', sans-serif;
}

.bbd-tv .bbd-place-1 { background: #1a3a6e; color: #fff; }
.bbd-tv .bbd-place-2 { background: #4a6a8e; color: #fff; }
.bbd-tv .bbd-place-3 { background: #7a94b0; color: #fff; }
.bbd-tv .bbd-place-other { background: #e8ecf0; color: #8a96a8; }

/* Top-3 row accents — very subtle */
.bbd-tv .bbd-leaderboard-table tbody tr:nth-child(1) {
    background: rgba(26,58,110,0.04);
}
.bbd-tv .bbd-leaderboard-table tbody tr:nth-child(1) td {
    color: #1a1a2e;
    font-weight: 600;
}

/* Weight leader styling */
.bbd-tv .bbd-weight-leader {
    color: #1a3a6e;
    font-weight: 700;
}

/* Youth badge */
.bbd-tv .bbd-youth-badge {
    display: inline-block;
    font-size: clamp(7px, 0.5vw, 9px);
    background: #1a3a6e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 8px;
    letter-spacing: 0.8px;
}

/* Angler age */
.bbd-tv .bbd-angler-age {
    font-size: clamp(10px, 0.85vw, 14px);
    color: #a0aab8;
    margin-left: 6px;
}

/* --- Stats Bar + Ticker Area --- */
.bbd-tv-ticker-area {
    flex: 0 0 auto;
    border-top: 2px solid #e0e4ea;
}

.bbd-tv-stats-bar {
    display: flex;
    align-items: center;
    padding: 0 48px;
    height: clamp(28px, 3.5vh, 44px);
    background: #1a3a6e;
    gap: clamp(16px, 3vw, 50px);
}

.bbd-tv-stats-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bbd-tv-stats-bar-item.bbd-tv-stats-right {
    margin-left: auto;
}

.bbd-tv-stats-label {
    font-size: clamp(8px, 0.55vw, 10px);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

.bbd-tv-stats-value {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(12px, 1.1vw, 18px);
    font-weight: 700;
    color: #fff;
}

/* LIVE dot pulse */
.bbd-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e74c3c;
    animation: bbd-pulse-dot 2s ease-in-out infinite;
}

@keyframes bbd-pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Ticker — DARK version (user requested) */
.bbd-tv-ticker {
    display: flex;
    align-items: center;
    height: clamp(30px, 3.8vh, 48px);
    overflow: hidden;
    background: #1a2d50;
}

.bbd-tv-ticker-label {
    flex: 0 0 auto;
    background: #1a3a6e;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(9px, 0.8vw, 13px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 clamp(12px, 1.2vw, 24px);
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.bbd-tv-ticker-label::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    border-top: clamp(15px, 1.9vh, 24px) solid transparent;
    border-bottom: clamp(15px, 1.9vh, 24px) solid transparent;
    border-left: 10px solid #1a3a6e;
}

.bbd-tv-ticker-track {
    flex: 1;
    overflow: hidden;
    padding-left: 16px;
}

.bbd-tv-ticker-scroll {
    display: flex;
    gap: clamp(24px, 3.5vw, 50px);
    animation: bbd-ticker-scroll 35s linear infinite;
    white-space: nowrap;
}

@keyframes bbd-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.bbd-tv-ticker-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(10px, 0.9vw, 15px);
    color: rgba(255,255,255,0.5);
}

.bbd-tv-ticker-item .ticker-name  { color: #ffffff; font-weight: 600; }
.bbd-tv-ticker-item .ticker-weight { color: #8ab4f8; font-weight: 700; }
.bbd-tv-ticker-item .ticker-time  { color: rgba(255,255,255,0.35); font-size: clamp(8px, 0.7vw, 12px); }
.bbd-tv-ticker-item .ticker-sep   { color: rgba(255,255,255,0.2); margin: 0 2px; }
.bbd-tv-ticker-item .ticker-new {
    background: #e74c3c;
    color: #fff;
    font-size: clamp(7px, 0.45vw, 8px);
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bbd-ticker-loading {
    color: rgba(255,255,255,0.4);
    font-size: clamp(10px, 0.8vw, 13px);
}

/* --- Footer --- */
.bbd-tv-footer {
    flex: 0 0 auto;
    background: #902e1a;
    padding: 3px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #6e2213;
    flex-shrink: 0;
}

.bbd-tv-footer-text {
    font-size: clamp(8px, 0.55vw, 10px);
    color: rgba(255, 255, 255, 0.85);
}

/* --- TV Scroll animation for overflow --- */
.bbd-tv-table-wrap.bbd-scrolling .bbd-leaderboard-table tbody {
    animation: bbd-tv-scroll var(--scroll-duration, 30s) linear infinite;
}

@keyframes bbd-tv-scroll {
    0%   { transform: translateY(0); }
    45%  { transform: translateY(var(--scroll-distance, 0px)); }
    50%  { transform: translateY(var(--scroll-distance, 0px)); }
    95%  { transform: translateY(0); }
    100% { transform: translateY(0); }
}

/* TV Loading */
.bbd-tv .bbd-loading {
    color: #8a96a8;
    font-size: 24px;
    padding: 60px;
}

/* TV fade-in animation for new rows */
.bbd-tv .bbd-fade-in {
    animation: bbd-tv-row-in 0.6s ease-out;
}

@keyframes bbd-tv-row-in {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* TV highlight flash when a row updates */
.bbd-tv .bbd-highlight {
    animation: bbd-tv-flash 1.5s ease-out;
}

@keyframes bbd-tv-flash {
    0%   { background: rgba(26, 58, 110, 0.15); }
    100% { background: transparent; }
}

/* Fullscreen toggle button */
.bbd-tv-fullscreen-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000000;
    background: rgba(26,58,110,0.8);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.bbd-tv:hover .bbd-tv-fullscreen-btn {
    opacity: 1;
}

/* Hide WP admin bar when in TV mode */
.bbd-tv ~ #wpadminbar,
body.admin-bar .bbd-tv { top: 0; }

/* ===============================
   NON-TV STYLES (dashboard, etc.)
   =============================== */

/* Header */
.bbd-leaderboard-header,
.bbd-dashboard-header {
    background: linear-gradient(135deg, var(--bbd-navy) 0%, #5a8fe6 100%);
    color: var(--bbd-white);
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* Sidebar Logo */
.bbd-sidebar-logo {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bbd-gold);
}

.bbd-derby-logo {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.bbd-header-live {
    flex-shrink: 0;
}

/* Dashboard header logo (inline, smaller) */
.bbd-dashboard-header-logo {
    flex-shrink: 0;
}

.bbd-derby-logo-sm {
    max-height: 80px;
    width: auto;
    border-radius: 4px;
}

/* Legacy logo text (fallback) */
.bbd-logo-section {
    text-align: center;
}

.bbd-logo-text {
    font-family: 'Oswald', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.bbd-logo-black {
    color: var(--bbd-gold);
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
}

.bbd-logo-bird {
    color: var(--bbd-gold);
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
}

.bbd-logo-subtitle {
    font-family: 'Brush Script MT', cursive;
    color: var(--bbd-orange);
    font-size: 18px;
    margin-top: 2px;
}

.bbd-title-section h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 32px;
    font-weight: 600;
    margin: 0;
    color: var(--bbd-white);
}

/* Live Badge */
.bbd-live-badge,
.bbd-live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bbd-red);
    color: var(--bbd-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.bbd-live-dot {
    width: 10px;
    height: 10px;
    background: #e74c3c; /* 2.8.14 — live dot red, not white */
    border-radius: 50%;
    animation: bbd-pulse 1.5s infinite;
}

@keyframes bbd-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Content Layout */
.bbd-leaderboard-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 0;
    align-items: start;
}

.bbd-table-column {
    display: flex;
    flex-direction: column;
}

.bbd-table-wrapper {
    padding: 20px;
    overflow-x: auto;
}

/* Leaderboard Table */
.bbd-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
}

.bbd-leaderboard-table thead {
    background: var(--bbd-navy);
    color: var(--bbd-white);
}

.bbd-leaderboard-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.bbd-leaderboard-table th.col-place {
    width: 80px;
    text-align: center;
}

.bbd-leaderboard-table th.col-weight {
    width: 150px;
}

.bbd-leaderboard-table th.col-length,
.bbd-leaderboard-table th.col-time {
    width: 110px;
}

.bbd-leaderboard-table tbody tr {
    border-bottom: 1px solid var(--bbd-border);
    transition: background 0.2s;
}

.bbd-leaderboard-table tbody tr:hover {
    background: var(--bbd-light-gray);
}

.bbd-leaderboard-table td {
    padding: 14px 12px;
    white-space: nowrap;
}

.bbd-leaderboard-table td.col-place {
    text-align: center;
}

/* Place Badges */
.bbd-place-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
}

.bbd-place-1 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.bbd-place-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: var(--bbd-navy);
}

.bbd-place-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    color: var(--bbd-white);
}

.bbd-place-other {
    background: var(--bbd-light-gray);
    color: var(--bbd-navy);
}

/* Youth Badge */
.bbd-youth-badge {
    display: inline-block;
    background: var(--bbd-gold);
    color: var(--bbd-navy);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
}

/* Stats Sidebar */
.bbd-stats-sidebar {
    background: var(--bbd-light-gray);
    padding: 20px;
    border-left: 1px solid var(--bbd-border);
    overflow-y: auto;
}

.bbd-stats-sidebar h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    color: var(--bbd-navy);
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bbd-gold);
}

.bbd-stat-item {
    margin-bottom: 15px;
}

.bbd-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.bbd-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--bbd-navy);
    font-family: 'Oswald', sans-serif;
}

.bbd-leader-name {
    font-size: 18px;
}

.bbd-top-weight {
    color: var(--bbd-gold);
    background: var(--bbd-navy);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 22px;
}

/* Recent Catches */
.bbd-recent-catches {
    margin-top: 10px;
}

.bbd-recent-catch {
    background: var(--bbd-white);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid var(--bbd-gold);
}

.bbd-recent-name {
    font-weight: 600;
    color: var(--bbd-navy);
}

.bbd-recent-details {
    font-size: 13px;
    color: #666;
    margin-top: 3px;
}

/* Sponsor logo bar */
.bbd-sponsor-logo-bar {
    background: #ffffff;
    text-align: center;
    padding: 12px 24px;
    border-bottom: 1px solid #e0e8f4;
    border-right: 1px solid var(--bbd-border);
}

.bbd-sponsor-logo-img {
    max-height: 200px;
    width: auto;
    display: inline-block;
}

/* Angler age label */
.bbd-angler-age {
    font-size: 12px;
    color: #888;
    font-weight: 400;
    margin-left: 3px;
}

/* Footer */
.bbd-leaderboard-footer,
.bbd-dashboard-footer {
    background: var(--bbd-navy);
    color: var(--bbd-white);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.bbd-sponsor {
    color: var(--bbd-gold);
}

.bbd-last-update {
    opacity: 0.8;
}

/* Loading State */
.bbd-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* ===============================
   CHART CONTAINERS
   =============================== */

.bbd-chart-container {
    background: var(--bbd-white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bbd-chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.bbd-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--bbd-border);
    background: var(--bbd-light-gray);
}

.bbd-chart-header h3 {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    color: var(--bbd-navy);
}

.bbd-chart-wrapper {
    padding: 20px;
    position: relative;
}

/* ===============================
   DASHBOARD GRID
   =============================== */

.bbd-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 25px;
    background: var(--bbd-light-gray);
}

.bbd-dashboard-item {
    min-height: 400px;
}

/* ===============================
   GAUGE CONTAINER
   =============================== */

.bbd-gauge-container {
    background: var(--bbd-white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    text-align: center;
}

.bbd-gauge-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--bbd-border);
    background: var(--bbd-light-gray);
}

.bbd-gauge-header h3 {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    color: var(--bbd-navy);
}

.bbd-gauge-wrapper {
    padding: 20px;
}

.bbd-gauge-info {
    padding: 15px 20px 25px;
    background: var(--bbd-light-gray);
}

.bbd-gauge-name {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--bbd-navy);
}

.bbd-gauge-weight {
    font-size: 32px;
    font-weight: 700;
    color: #e8720c;
    font-family: 'Oswald', sans-serif;
}

/* ===============================
   STATS WIDGET
   =============================== */

.bbd-stats-widget {
    padding: 20px;
}

.bbd-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.bbd-stat-card {
    background: var(--bbd-white);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-top: 4px solid var(--bbd-gold);
}

.bbd-stat-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.bbd-stat-number {
    font-family: 'Oswald', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--bbd-navy);
}

/* ===============================
   RECENT CATCHES WIDGET
   =============================== */

.bbd-recent-container {
    background: var(--bbd-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.bbd-recent-container h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    color: var(--bbd-navy);
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bbd-gold);
}

.bbd-recent-list .bbd-recent-catch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bbd-light-gray);
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--bbd-gold);
}

.bbd-recent-list .bbd-recent-catch:last-child {
    margin-bottom: 0;
}

/* ===============================
   ANIMATIONS
   =============================== */

.bbd-fade-in {
    animation: bbdFadeIn 0.3s ease-out;
}

@keyframes bbdFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bbd-highlight {
    animation: bbdHighlight 2s ease-out;
}

@keyframes bbdHighlight {
    0% {
        background: rgba(251, 255, 56, 0.3);
    }
    100% {
        background: transparent;
    }
}

/* ===============================
   RESPONSIVE (for admin preview)
   =============================== */

@media (max-width: 1200px) {
    .bbd-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .bbd-leaderboard-content {
        grid-template-columns: 1fr;
    }

    .bbd-sponsor-logo-bar {
        border-right: none;
    }

    .bbd-stats-sidebar {
        border-left: none;
        border-top: 1px solid var(--bbd-border);
    }
    
    .bbd-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===============================
   TV DISPLAY OPTIMIZATIONS
   =============================== */

@media (min-width: 1920px) {
    .bbd-leaderboard-table {
        font-size: 22px;
    }
    
    .bbd-leaderboard-table th,
    .bbd-leaderboard-table td {
        padding: 18px 15px;
    }
    
    .bbd-place-badge {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .bbd-stat-value {
        font-size: 32px;
    }
    
    .bbd-logo-text {
        font-size: 48px;
    }

    .bbd-title-section h1 {
        font-size: 42px;
    }
}

.bbd-registration-wrap {
    background: #d6e8f7;
    border: 1px solid #b8d4ee;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Registration form two-column grid.
 * 2.8.5 — Pulled the inline grid styles out of the form/sponsor markup
 * so this CSS class can actually own the layout (and so the mobile
 * media query below isn't competing with inline !important-equivalent
 * specificity). The numbers below match what was previously inlined. */
.bbd-reg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    align-items: start;
}

.bbd-reg-form-left {
    grid-column: 1;
    align-self: start;
    margin-top: 20px;
}

.bbd-reg-form-right {
    grid-column: 2;
    text-align: center;
    align-self: start;
    padding-top: 30px;
}

/* UCAN donation block */
.bbd-ucan-block {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    border: 1px solid var(--bbd-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.bbd-ucan-logo {
    flex-shrink: 0;
}

.bbd-ucan-img {
    max-width: 160px;
    height: auto;
    border-radius: 6px;
}

.bbd-ucan-text strong {
    display: block;
    font-size: 16px;
    color: var(--bbd-navy);
    margin-bottom: 6px;
}

.bbd-ucan-text p {
    margin: 0;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.bbd-proudly-sponsored {
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bbd-navy);
    margin: 0 0 6px;
}

.bbd-reg-form-full {
    grid-column: 1 / -1;
}

.bbd-reg-logo {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.bbd-registration-wrap h2 {
    margin-top: 0;
    color: var(--bbd-navy);
}

.bbd-notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin: 10px 0 16px;
    font-size: 14px;
}

.bbd-notice-success {
    background: #ecfdf3;
    border: 1px solid #7dd3a7;
    color: #0f5132;
}

.bbd-notice-warning {
    background: #fff8e6;
    border: 1px solid #f5c26b;
    color: #8a5a00;
}

.bbd-notice-error {
    background: #fff0f0;
    border: 1px solid #f3a2a2;
    color: #7a1c1c;
}

.bbd-native-registration p {
    margin: 0 0 14px;
}

.bbd-native-registration input[type="text"],
.bbd-native-registration input[type="email"],
.bbd-native-registration input[type="number"],
.bbd-native-registration input[type="date"],
.bbd-native-registration select {
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
}

.bbd-native-registration input:focus,
.bbd-native-registration select:focus {
    border-color: var(--bbd-navy);
    outline: none;
    box-shadow: 0 0 0 2px rgba(61,119,221,0.15);
}

.bbd-fieldset {
    border: 1px solid #c5d8f0;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 0 0 18px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(61, 119, 221, 0.10);
}

.bbd-fieldset legend {
    font-weight: 700;
    color: #1a4fa0;
    font-size: 15px;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #c5d8f0;
    border-radius: 20px;
}

.bbd-required {
    color: var(--bbd-red);
}

.bbd-help-text {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
}

.bbd-form-row {
    display: grid;
    gap: 12px;
}

.bbd-form-row-2 {
    grid-template-columns: 1fr 1fr;
}

.bbd-form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.bbd-form-row-name-age {
    grid-template-columns: 2fr 2fr 1fr;
}

.bbd-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bbd-radio-group {
    display: flex;
    gap: 20px;
    margin: 6px 0 10px;
}

.bbd-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

.bbd-radio-group input[type="radio"] {
    width: auto;
    margin: 0;
}

.bbd-boat-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--bbd-border);
}

.bbd-extra-adult-row,
.bbd-child-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.bbd-participants {
    display: grid;
    gap: 12px;
}

.bbd-participant-row {
    border: 1px solid var(--bbd-border);
    border-radius: 10px;
    padding: 12px;
    background: #e4f0fb;
}

.bbd-participant-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bbd-participant-fields {
    display: grid;
    grid-template-columns: 140px 1fr 1fr 120px;
    gap: 10px;
}

.bbd-participant-actions {
    display: flex;
    gap: 8px;
    margin: 12px 0 16px;
}

.bbd-registration-summary {
    background: #ffffff;
    border: 1px solid #c5d8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 18px;
    line-height: 1.8;
    box-shadow: 0 2px 10px rgba(61, 119, 221, 0.10);
}

.bbd-summary-total {
    font-size: 16px;
    border-top: 1px solid #d8e2ef;
    padding-top: 8px;
    margin-top: 4px;
}

.bbd-terms-text {
    background: #e4f0fb;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    padding: 10px;
    margin: 0 0 10px;
    color: #334155;
    font-size: 13px;
}

.bbd-reg-note {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
}

.bbd-submit-btn {
    font-size: 18px;
    font-weight: 700;
    padding: 14px 36px;
    background: #3d77dd !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.bbd-submit-btn:hover,
.bbd-submit-btn:focus {
    background: #2c5fbf !important;
    color: #fff !important;
}

/* --- Public Catch Entry Form --- */
.bbd-catch-entry-wrap {
    background: #d6e8f7;
    border: 1px solid #b8d4ee;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    max-width: 700px;
    margin: 0 auto; /* 2.9.14 — center on the post like the check-in station */
}

.bbd-catch-header {
    margin-bottom: 24px;
}

.bbd-catch-entry-wrap h2 {
    margin: 0 0 4px;
    color: var(--bbd-navy);
    font-size: 22px;
}

.bbd-catch-header-sub {
    font-size: 28px;
    font-weight: 700;
    color: #1a4fa0;
}

/* Step labels */
.bbd-catch-step {
    margin-bottom: 18px;
}

.bbd-catch-step-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3d77dd;
    margin-bottom: 6px;
}

.bbd-catch-fieldset {
    margin-bottom: 0 !important;
}

/* Big inputs - easy to tap */
.bbd-catch-big-input {
    font-size: 20px !important;
    padding: 14px 16px !important;
    border-radius: 8px !important;
    border: 2px solid #ccc !important;
    width: 100% !important;
    box-sizing: border-box;
    background: #fff !important;
}

.bbd-catch-big-input:focus {
    border-color: var(--bbd-navy) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(61,119,221,0.15) !important;
}

/* Measurement grid: side by side */
.bbd-catch-measure-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.bbd-catch-measure-title {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

/* Large number inputs */
.bbd-catch-num {
    width: 90px !important;
    height: 58px;
    font-size: 26px !important;
    font-weight: 700 !important;
    padding: 12px 8px !important;
    text-align: center !important;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-sizing: border-box;
    -moz-appearance: textfield;
}

.bbd-catch-num::-webkit-outer-spin-button,
.bbd-catch-num::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bbd-catch-num:focus {
    border-color: var(--bbd-navy) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(61,119,221,0.15) !important;
}

.bbd-catch-unit {
    font-size: 20px !important;
    font-weight: 600;
    color: #555;
    min-width: 30px;
}

.bbd-catch-select {
    font-size: 20px !important;
    padding: 12px 8px !important;
    height: 58px;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
    background: #fff !important;
    min-width: 130px;
    box-sizing: border-box;
}

/* Catch time row */
.bbd-catch-time-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Now button */
.bbd-pub-now-btn {
    font-size: 17px !important;
    font-weight: 600;
    padding: 14px 22px !important;
    background: #fff !important;
    border: 2px solid var(--bbd-navy) !important;
    color: var(--bbd-navy) !important;
    border-radius: 8px !important;
    cursor: pointer;
    white-space: nowrap;
}

.bbd-pub-now-btn:hover {
    background: var(--bbd-navy) !important;
    color: #fff !important;
}

.bbd-angler-search-wrap {
    position: relative;
}

.bbd-pub-search-results {
    position: absolute;
    z-index: 100;
    background: #fff;
    border: 1px solid var(--bbd-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
}

.bbd-pub-result {
    padding: 16px 18px;
    cursor: pointer;
    font-size: 18px;
}

.bbd-pub-result:hover {
    background: #d6e8f7;
}

.bbd-pub-no-result {
    cursor: default;
    color: #999;
}

.bbd-pub-selected {
    display: none;
    margin-top: 0;
    padding: 0;
    background: #ecfdf3;
    border-radius: 6px;
    color: #0f5132;
    font-size: 16px;
}

/* Selected angler card */
.bbd-pub-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #eaf3ff;
    border: 2px solid #3d77dd;
    border-radius: 8px;
    padding: 14px 18px;
}

.bbd-pub-selected-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a4fa0;
}

.bbd-pub-change-angler-btn {
    font-size: 15px;
    font-weight: 600;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid #3d77dd;
    color: #3d77dd;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.bbd-pub-change-angler-btn:hover {
    background: #3d77dd;
    color: #fff;
}

.bbd-measure-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.bbd-catch-actions {
    display: flex;
    gap: 14px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.bbd-pub-submit-btn {
    flex: 1;
    min-width: 200px;
    font-size: 22px !important;
    font-weight: 700;
    padding: 20px 32px !important;
    background: #3d77dd !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.bbd-pub-submit-btn:hover {
    background: #2d60c0 !important;
}

.bbd-pub-clear-btn {
    font-size: 17px !important;
    padding: 18px 28px !important;
    background: #fff !important;
    border: 2px solid #ccc !important;
    color: #666 !important;
    border-radius: 10px !important;
    cursor: pointer;
}

.bbd-pub-clear-btn:hover {
    border-color: #999 !important;
    color: #333 !important;
}

/* Undo button inside success banner */
.bbd-pub-undo-btn {
    font-size: 15px;
    font-weight: 600;
    padding: 8px 18px;
    background: #fff;
    border: 2px solid #fff;
    color: #1a5c1a;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 10px;
    vertical-align: middle;
}

.bbd-pub-undo-btn:hover {
    background: rgba(0,0,0,0.08);
}

.bbd-pub-undo-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

@media (max-width: 900px) {
    .bbd-form-grid,
    .bbd-form-row-2,
    .bbd-form-row-3 {
        grid-template-columns: 1fr;
    }

    .bbd-participant-fields {
        grid-template-columns: 1fr;
    }

    .bbd-registration-summary {
        grid-template-columns: 1fr;
    }

    /* 2.8.5 — Stack registration form on mobile and put the sponsor
     * banner above the title (the previous side-by-side layout was
     * crushing both into ~50% width on phones, which made the title
     * wrap to four lines and the sponsor logo near-unreadable). */
    .bbd-reg-form-grid {
        grid-template-columns: 1fr;
    }
    .bbd-reg-form-left,
    .bbd-reg-form-right,
    .bbd-reg-form-full {
        grid-column: 1;
    }
    .bbd-reg-form-right {
        order: -1;          /* render before the title block */
        padding-top: 0;
        margin-bottom: 8px;
    }
    .bbd-reg-form-left {
        margin-top: 8px;
    }
    .bbd-reg-logo {
        max-width: 320px;
        margin: 0 auto;
    }
}

/* =======================================================================
   R2.4.0 — Rotating 2-Column Leaderboard (Adults) + Youth Board + Prizes
   ======================================================================= */

/* Page indicator strip: "Top 1–10 • • • ◦ ◦" */
.bbd-tv-page-indicator {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(4px, 0.5vh, 10px) clamp(16px, 2vw, 48px);
    background: #f5f7fa;
    border-bottom: 1px solid #e8ecf0;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-size: clamp(11px, 0.9vw, 15px);
    font-weight: 600;
    color: #1a3a6e;
}

.bbd-tv-page-dots {
    display: inline-flex;
    gap: 8px;
}

.bbd-tv-page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c9d1de;
    transition: background 0.25s ease-out, transform 0.25s ease-out;
}

.bbd-tv-page-dot.is-active {
    background: #1a3a6e;
    transform: scale(1.25);
}

/* Horizontal slide track — outer wrap clips, inner track holds pages side-by-side. */
.bbd-tv-pages-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.bbd-tv-pages-track {
    display: flex;
    flex-wrap: nowrap;
    height: 100%;
    width: 100%;
    transition: transform 400ms ease-out;
    will-change: transform;
}

.bbd-tv-pages-track.bbd-no-transition {
    transition: none !important;
}

/* Each page is exactly 100% of the viewport-wide wrap. */
.bbd-tv-page {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(12px, 1.6vw, 40px);
    padding: clamp(10px, 1.2vh, 20px) clamp(16px, 2vw, 48px);
    box-sizing: border-box;
}

.bbd-tv-page-col {
    display: flex;
    flex-direction: column;
    /* 2.7.1 — Top-align entries so a single row doesn't float vertically
       in the middle of the viewport. `space-evenly` worked fine on a full
       10-row page but looked broken at 1–3 rows. flex-start + gap gives
       a consistent top-down list at any fill level. */
    justify-content: flex-start;
    gap: clamp(4px, 0.9vh, 14px);
    min-width: 0; /* allow text truncation in flex children */
}

/* Rows — broadcast-style, full-bleed, big readable type. */
.bbd-tv-row {
    display: grid;
    grid-template-columns: clamp(36px, 3vw, 56px) 1fr auto auto auto;
    align-items: center;
    column-gap: clamp(10px, 1vw, 20px);
    padding: clamp(6px, 0.7vh, 12px) clamp(8px, 0.8vw, 16px);
    border-bottom: 1px solid #eef1f5;
    font-size: clamp(14px, 1.4vw, 26px);
    color: #2d3748;
    min-width: 0;
}

.bbd-tv-row:last-child {
    border-bottom: none;
}

.bbd-tv-row .bbd-place-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(26px, 2.4vw, 40px);
    height: clamp(26px, 2.4vw, 40px);
    border-radius: 50%;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(12px, 1vw, 18px);
    background: #e8ecf0;
    color: #8a96a8;
    flex-shrink: 0;
}

.bbd-tv-row .bbd-place-1 { background: #1a3a6e; color: #fff; }
.bbd-tv-row .bbd-place-2 { background: #4a6a8e; color: #fff; }
.bbd-tv-row .bbd-place-3 { background: #7a94b0; color: #fff; }

.bbd-tv-name {
    font-weight: 600;
    color: #1a2d50;
    font-size: clamp(15px, 1.5vw, 28px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.bbd-tv-weight {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: #1a3a6e;
    font-size: clamp(15px, 1.5vw, 26px);
    white-space: nowrap;
}

.bbd-tv-length {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    color: #8a96a8;
    font-size: clamp(12px, 1.1vw, 20px);
    white-space: nowrap;
}

/* Prize pill — gold so cash awards jump off the screen. */
.bbd-prize {
    display: inline-block;
    padding: 3px clamp(8px, 0.8vw, 14px);
    border-radius: 999px;
    background: linear-gradient(180deg, #f6c460 0%, #e8a220 100%);
    color: #3a2200;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(11px, 1vw, 17px);
    letter-spacing: 0.4px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}

/* Subtle accent on any row that earned a prize. */
.bbd-tv-row.bbd-in-money {
    background: linear-gradient(90deg, rgba(232,162,32,0.08) 0%, rgba(232,162,32,0) 60%);
}

/* Youth Leaderboard — same row style, simpler wrapper, no pagination. */
/* 2.9.4 — Dom Casual Std Bold (licensed, self-hosted) for derby headings.
   Paths are relative to this stylesheet (public/css/ -> public/fonts/). */
@font-face {
    font-family: 'Dom Casual Std';
    src: url('../fonts/DomCasualStd-Bold.woff2') format('woff2'),
         url('../fonts/DomCasualStd-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* 2.9.5 — Shared title-bar style for the youth board and every rotator panel. */
.bbd-tv-youth-heading,
.bbd-rotator-heading {
    flex: 0 0 auto;
    padding: clamp(8px, 1.4vh, 18px) clamp(16px, 2vw, 48px);
    background: #1a3a6e;
    color: #fff;
    text-align: center; /* 2.9.2 — centered title bar under the banner */
}

.bbd-tv-youth-title,
.bbd-rotator-panel-title {
    margin: 0;
    /* 2.9.4 — Dom Casual Std to match the banner branding. */
    font-family: 'Dom Casual Std', 'Oswald', sans-serif;
    font-size: clamp(24px, 2.8vw, 50px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.1;
    /* 2.9.3 — Force white; the theme's h2 color rule was overriding it dark. */
    color: #ffffff !important;
}

.bbd-tv-youth-wrap {
    padding: clamp(10px, 1.2vh, 20px) clamp(16px, 2vw, 48px);
}

.bbd-tv-youth-list {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.6vh, 10px);
}

.bbd-tv-youth-list .bbd-tv-row {
    grid-template-columns: clamp(36px, 3vw, 56px) 1fr auto auto auto;
}

/* Empty-state placeholders inside pages-wrap / youth-wrap */
.bbd-tv-loading,
.bbd-tv-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a96a8;
    font-style: italic;
    font-size: clamp(14px, 1.2vw, 22px);
    padding: 40px;
}

/* Keep legacy table cell for backward compat on non-TV pages. */
.bbd-leaderboard-table .col-prize {
    white-space: nowrap;
}

/* ==========================================================================
   2.6.0 — Check-in Station (tablet-friendly, big touch targets)
   ========================================================================== */

.bbd-checkin-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bbd-checkin-header {
    text-align: center;
    margin-bottom: 24px;
}

.bbd-checkin-header h2 {
    margin: 0 0 4px;
    font-size: 28px;
    font-weight: 700;
    color: #1a3a6e;
    letter-spacing: 0.5px;
}

.bbd-checkin-header .bbd-checkin-sub {
    margin: 0;
    font-size: 15px;
    color: #6b7a90;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Countdown */
.bbd-checkin-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    background: #f4f7fb;
    border: 2px solid #d9e1ec;
    border-radius: 12px;
    font-size: 18px;
    color: #1a3a6e;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.bbd-countdown-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.bbd-countdown-time {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 28px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.bbd-checkin-countdown.bbd-countdown-warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #bf360c;
    animation: bbdCountdownPulse 2s ease-in-out infinite;
}

.bbd-checkin-countdown.bbd-countdown-locked {
    background: #ffebee;
    border-color: #d32f2f;
    color: #b71c1c;
    animation: none;
}

/* Admin has disabled cutoff enforcement (testing / rehearsal mode). */
.bbd-checkin-countdown.bbd-countdown-testing {
    background: #fffde7;
    border-color: #fbc02d;
    color: #6d4c00;
    animation: none;
}

.bbd-checkin-countdown.bbd-countdown-testing .bbd-countdown-time {
    font-size: 18px;
    letter-spacing: 2px;
}

@keyframes bbdCountdownPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

/* Search area */
.bbd-checkin-search {
    margin-bottom: 20px;
}

.bbd-checkin-search label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px;
    color: #1a3a6e;
}

.bbd-checkin-search input[type="text"] {
    width: 100%;
    padding: 16px 18px;
    font-size: 18px;
    border: 2px solid #d9e1ec;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
    min-height: 56px;
}

.bbd-checkin-search input[type="text"]:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.bbd-checkin-results {
    margin-top: 8px;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    background: #fff;
}

.bbd-checkin-results:empty {
    display: none;
}

.bbd-checkin-result-item {
    padding: 14px 16px;
    border-bottom: 1px solid #eef1f6;
    cursor: pointer;
    font-size: 16px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background 0.15s ease;
}

.bbd-checkin-result-item:last-child {
    border-bottom: none;
}

.bbd-checkin-result-item:hover,
.bbd-checkin-result-item:active {
    background: #f4f7fb;
}

.bbd-checkin-result-name {
    font-weight: 600;
    color: #1a3a6e;
}

.bbd-checkin-result-meta {
    font-size: 13px;
    color: #6b7a90;
}

/* Selected angler card */
.bbd-checkin-selected {
    padding: 20px;
    background: #f0f7ff;
    border: 2px solid #90caf9;
    border-radius: 12px;
    margin-bottom: 20px;
}

.bbd-checkin-selected-name {
    font-size: 22px;
    font-weight: 700;
    color: #0d47a1;
    margin: 0 0 6px;
}

.bbd-checkin-selected-meta {
    font-size: 14px;
    color: #37474f;
    margin: 0;
}

/* Big check-in button */
.bbd-checkin-big-btn {
    display: block;
    width: 100%;
    padding: 22px 28px;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    background: #2e7d32;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    min-height: 72px;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.bbd-checkin-big-btn:hover:not(:disabled) {
    background: #1b5e20;
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.35);
}

.bbd-checkin-big-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.25);
}

.bbd-checkin-big-btn:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.75;
}

/* Success banner */
.bbd-checkin-success {
    padding: 24px;
    background: #e8f5e9;
    border: 2px solid #2e7d32;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.bbd-checkin-success-main {
    font-size: 24px;
    font-weight: 700;
    color: #1b5e20;
    margin: 0 0 8px;
}

.bbd-checkin-success-sub {
    font-size: 16px;
    color: #2e7d32;
    margin: 0 0 16px;
}

.bbd-checkin-success-time {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #0d47a1;
}

.bbd-checkin-undo-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #b71c1c;
    background: #fff;
    border: 2px solid #b71c1c;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.15s ease, color 0.15s ease;
}

.bbd-checkin-undo-btn:hover {
    background: #b71c1c;
    color: #fff;
}

.bbd-checkin-undo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error notice */
.bbd-notice-error {
    padding: 16px 20px;
    margin-bottom: 16px;
    background: #ffebee;
    border: 2px solid #d32f2f;
    border-radius: 10px;
    color: #b71c1c;
    font-size: 15px;
    font-weight: 500;
}

.bbd-notice-error:empty {
    display: none;
}

/* Weigh station — check-in time display */
.bbd-pub-checkin-time {
    padding: 14px 18px;
    margin: 12px 0 18px;
    background: #e3f2fd;
    border-left: 4px solid #1a73e8;
    border-radius: 6px;
    font-size: 15px;
    color: #0d47a1;
}

.bbd-pub-checkin-time strong {
    font-weight: 700;
}

/* Tablet landscape / portrait tweaks */
@media (max-width: 1024px) {
    .bbd-checkin-wrap {
        padding: 16px 14px;
    }

    .bbd-checkin-header h2 {
        font-size: 26px;
    }

    .bbd-countdown-time {
        font-size: 26px;
    }

    .bbd-checkin-big-btn {
        padding: 24px 20px;
        font-size: 22px;
        min-height: 80px;
    }
}

@media (max-width: 640px) {
    .bbd-checkin-countdown {
        flex-direction: column;
        gap: 4px;
        padding: 12px 14px;
    }

    .bbd-checkin-search input[type="text"] {
        font-size: 16px;
        padding: 14px 16px;
    }

    .bbd-checkin-big-btn {
        font-size: 18px;
        letter-spacing: 1px;
    }
}

/* ============================================================
 * 2.8.0 — Podium layout for [derby_leaderboard layout="podium"]
 *
 * Two-screen rotation. Screen 1 has 3 hero podium tiles for the
 * top 3 stacked down a 38% left column, with places 4-14 in an
 * 11-row right list. Screen 2 is a denser 2x8 grid for places
 * 15-30 reusing the existing .bbd-tv-row markup.
 *
 * These selectors override the legacy .bbd-tv-page (1fr 1fr grid)
 * by source-order specificity. Don't move them above the legacy
 * .bbd-tv-page block.
 * ============================================================ */

/* Screen 1 — podium + 11-row list */
.bbd-tv-page.bbd-tv-podium-page {
    grid-template-columns: minmax(280px, 38%) 1fr;
    column-gap: clamp(8px, 0.8vw, 16px);
    /* 2.8.10 — Trimmed top padding (space moved above the header). */
    padding: clamp(2px, 0.2vh, 4px) clamp(10px, 1vw, 20px) clamp(8px, 0.8vh, 16px);
    background: #f0f2f6;
}

.bbd-tv-podium-stack {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.7vh, 12px);
    min-height: 0;
}

.bbd-tv-podium-tile {
    flex: 1 1 0;
    min-height: 0;
    background: #ffffff;
    border-radius: 4px;
    display: grid;
    grid-template-columns: clamp(56px, 5.5vw, 110px) 1fr;
    column-gap: clamp(8px, 0.8vw, 18px);
    align-items: center;
    padding: clamp(8px, 1vh, 18px) clamp(10px, 1vw, 22px);
    padding-left: clamp(14px, 1.2vw, 24px);
    position: relative;
    overflow: hidden;
}

/* Left rail uses the same place-color palette as the round badges. */
.bbd-tv-podium-tile::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: clamp(4px, 0.45vw, 8px);
}
.bbd-tv-podium-1::before { background: #1a3a6e; }
.bbd-tv-podium-2::before { background: #4a6a8e; }
.bbd-tv-podium-3::before { background: #7a94b0; }

.bbd-tv-podium-place {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 5.5vw, 96px);
    line-height: 1;
    text-align: center;
}
.bbd-tv-podium-1 .bbd-tv-podium-place { color: #1a3a6e; }
.bbd-tv-podium-2 .bbd-tv-podium-place { color: #4a6a8e; }
.bbd-tv-podium-3 .bbd-tv-podium-place { color: #7a94b0; }

.bbd-tv-podium-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(2px, 0.4vh, 6px);
    min-width: 0; /* allow text-overflow on long names */
}

.bbd-tv-podium-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(6px, 0.6vw, 12px);
    min-width: 0;
}

.bbd-tv-podium-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #2d3748;
    font-size: clamp(14px, 1.35vw, 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* Inherits the gold gradient from .bbd-prize; override size/padding so it
   reads as a featured pill on the podium tile rather than a row tag. */
.bbd-prize.bbd-tv-podium-prize {
    flex-shrink: 0;
    /* 2.8.10 — Bigger podium prize amount; vertical padding kept tight and
       line-height snug so the larger text isn't clipped by the tile's
       overflow:hidden. */
    font-size: clamp(24px, 2.4vw, 44px);
    padding: clamp(3px, 0.4vh, 7px) clamp(16px, 1.5vw, 28px);
    line-height: 1.1;
    letter-spacing: 0.4px;
}

.bbd-tv-podium-meta {
    font-family: 'Inter', sans-serif;
    font-size: clamp(10px, 0.95vw, 16px);
    color: #888;
    line-height: 1.2;
}

.bbd-tv-podium-weight {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(22px, 2.6vw, 44px);
    color: #1a3a6e;
    line-height: 1.05;
    margin-top: clamp(2px, 0.3vh, 6px);
}

.bbd-tv-podium-gap {
    font-family: 'Inter', sans-serif;
    font-size: clamp(10px, 0.85vw, 14px);
    color: #2a7a2a;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Right list (places 4–14). Uses .bbd-tv-row for each entry but tightens
   spacing so all 11 fit without scrolling. */
.bbd-tv-podium-list {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    min-height: 0;
}

.bbd-tv-podium-list .bbd-tv-row {
    flex: 1 1 0;
    min-height: 0;
    border-bottom: 1px solid #eef1f5;
    padding: clamp(4px, 0.5vh, 10px) clamp(10px, 1vw, 20px);
}

.bbd-tv-podium-list .bbd-tv-row:last-child {
    border-bottom: none;
}

/* Screen 2 — places 15–30 in 2 cols × 8 rows. Inherits .bbd-tv-page's
   1fr 1fr grid; only adjusts inner padding/gap so row count fits. */
.bbd-tv-page.bbd-tv-podium-page-list {
    padding: clamp(8px, 0.8vh, 16px) clamp(12px, 1.2vw, 24px);
    column-gap: clamp(10px, 1vw, 24px);
    background: #ffffff;
}

.bbd-tv-podium-page-list .bbd-tv-page-col {
    background: transparent;
    gap: clamp(2px, 0.4vh, 8px);
}

.bbd-tv-podium-page-list .bbd-tv-row {
    padding: clamp(4px, 0.5vh, 10px) clamp(8px, 0.8vw, 16px);
}

/* ============================================================
 * 2.9.0 — Rotating second-screen dashboard ([derby_rotator])
 * One fixed fullscreen stage; each panel is a slide that cross-
 * fades. Embedded TV views (.bbd-tv) are re-scoped from fixed to
 * fill their slide. Slides use opacity (not display:none) so
 * Chart.js canvases size correctly even while inactive.
 * ============================================================ */
/* 2.9.5 — Persistent screen frame: the derby banner (header) and the live-
   catches ticker (footer) stay put; only the middle stage rotates. */
.bbd-rotator {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 999999;
    background: #f0f2f6;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.bbd-rotator-header { flex: 0 0 auto; }
.bbd-rotator-footer { flex: 0 0 auto; }
.bbd-rotator-stage {
    flex: 1 1 auto;
    position: relative;
    min-height: 0;
    overflow: hidden;
}
.bbd-rotator-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}
.bbd-rotator-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* Embedded full-board views (youth) fill the stage; their own banner + footer
   are hidden because the screen frame already provides them. */
.bbd-rotator .bbd-tv {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: auto;
}
.bbd-rotator .bbd-tv-fullscreen-btn { display: none; }
.bbd-rotator-slide-full .bbd-tv-banner,
.bbd-rotator-slide-full .bbd-tv-footer { display: none; }
/* Contained panels (charts/stats/gauge/recent): Dom Casual title bar + body. */
.bbd-rotator-heading { flex: 0 0 auto; }
.bbd-rotator-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: clamp(8px, 1.4vh, 26px) clamp(20px, 3vw, 72px);
}
.bbd-rotator-body > * { width: 100%; height: 100%; }
/* 2.9.7 — Charts fill the stage responsively instead of a fixed pixel height
   (the fixed height overflowed the TV and clipped the title/bars). The chart's
   own card header is hidden — the rotator's Dom Casual title bar replaces it. */
.bbd-rotator-body .bbd-chart-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}
.bbd-rotator-body .bbd-chart-header { display: none; }
.bbd-rotator-body .bbd-chart-wrapper {
    height: auto !important;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
}
/* 2.9.9 — Derby Stats: a 2x2 grid that fills the stage exactly (was
   overflowing, clipping the bottom two cards behind the footer). Cards are
   centered and TV-sized. */
.bbd-rotator-body .bbd-stats-widget {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.bbd-rotator-body .bbd-stat-grid {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: 1fr 1fr;
    gap: clamp(12px, 1.8vh, 28px);
}
.bbd-rotator-body .bbd-stat-card {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1vh, 14px);
    padding: clamp(8px, 2vh, 28px);
}
.bbd-rotator-body .bbd-stat-icon   { font-size: clamp(34px, 4.2vh, 66px); margin: 0; }
.bbd-rotator-body .bbd-stat-number { font-size: clamp(34px, 4.6vh, 74px); }
.bbd-rotator-body .bbd-stat-label  { font-size: clamp(13px, 1.5vh, 22px); }
.bbd-rotator-dots {
    /* 2.9.8 — Slide dots hidden per request. */
    display: none;
    position: absolute;
    bottom: clamp(6px, 1vh, 14px);
    left: 0; right: 0;
    gap: 12px;
    justify-content: center;
    z-index: 5;
}
.bbd-rotator-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(26, 58, 110, 0.25);
    transition: background 0.3s ease;
}
.bbd-rotator-dot.is-active { background: #1a3a6e; }
