:root { 
    --soh-bg-alt: #f8f9fa; 
    --soh-border: #dee2e6; 
    --soh-header-bg: #e9ecef; 
    --soh-text-dark: #212529; 
    --soh-text-light: #6c757d; 
    /* The --soh-accent variable is set dynamically via inline style */
}
#sports-odds-hub-app { font-family: inherit; font-size: 14px; }
.soh-loading, .soh-error { display: flex; align-items: center; justify-content: center; padding: 60px 20px; font-size: 1.2em; color: var(--soh-text-light); text-align: center; }
.soh-spinner { width: 24px; height: 24px; border: 3px solid rgba(0,0,0,0.1); border-top-color: var(--soh-accent); border-radius: 50%; animation: soh-spin 1s linear infinite; margin-right: 15px; }
@keyframes soh-spin { to { transform: rotate(360deg); } }

.soh-main-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px 20px; padding: 15px; background-color: var(--soh-bg-alt);border-top-right-radius:12px; border-top-left-radius:12px}
.soh-left-controls, .soh-right-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 20px; }
.soh-controls-group { display: flex; align-items: center; gap: 8px; }
.soh-main-controls label { font-weight: 600; font-size: 13px; margin: 0; color: var(--soh-text-light); }
.soh-main-controls select { padding: 6px 10px; border-radius: 6px; border: 1px solid #ccc; font-size: 13px; background: #fff; margin-bottom:auto }
.soh-last-updated { font-size: 12px; color: var(--soh-text-light); line-height: 1.2; text-align: center; }
.soh-mobile-label { display: none; }

.soh-table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.soh-table .soh-game-cell { padding: 0 !important; }
.soh-table td { border-bottom: none; }
#sports-odds-hub-app .soh-table tr { border-bottom: none !important; }
.soh-table tr:last-child .soh-game-grid-container { border-bottom: none; }

.soh-day-header { background-color: #dde1e6; }
.soh-day-header .soh-grid-header-item { font-weight: 600; font-size: 11px; padding: 8px 5px; color: var(--soh-text-dark); text-transform: uppercase; text-align: center; white-space: nowrap; }
.soh-day-header .soh-grid-header-item:first-child,
.soh-day-header .soh-grid-header-item:nth-child(2) { border-right: 1px solid var(--soh-border); }

.soh-game-grid-container { display: grid; align-items: center; border-bottom: 1px solid var(--soh-border); }
.soh-game-grid-container.soh-grid-cols-3 { grid-template-columns: 12% 8% 28% 17.33% 17.33% 17.34%; padding: 9px 0px}
.soh-game-grid-container.soh-grid-cols-2 { grid-template-columns: 12% 8% 28% 26% 26%; padding: 9px 0px }
.soh-game-grid-container.soh-grid-cols-1 { grid-template-columns: 12% 8% 28% 52%; padding: 9px 0px}
.soh-grid-time { grid-row: span 3; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--soh-border); }
.soh-grid-league { grid-row: span 3; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--soh-border); }
.soh-grid-matchup-header { display: flex; justify-content: center; align-items: center; }
.soh-grid-matchup-team { text-align: center; font-weight: 600; }
.soh-grid-odds-header, .soh-grid-odds-data { text-align: center; }
.soh-grid-odds-header a { text-decoration: none; color: inherit; }

.soh-cell-time { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; }
.soh-live-game .soh-game-grid-container { background-color: #FFFEEB; }
.soh-live-tag { color: #e65100; font-size: 0.8em; font-weight: bold; line-height: 1; }
.soh-day-separator td { font-weight: bold; background-color: var(--soh-header-bg); padding: 12px!important; cursor: default; text-align: left; border-bottom: 1px solid var(--soh-border); }
.soh-icon-container { display: flex; align-items: center; justify-content: center; gap: 15px;}
.soh-icon-container .bi { font-size: 18px; line-height: 1; vertical-align: middle; transition: color 0.2s ease; cursor: pointer; }
.soh-icon-container .bi-fire { color: var(--soh-accent); }
.soh-icon-container .soh-modal-trigger { color: var(--soh-text-light); }
.soh-icon-container .soh-modal-trigger:hover { color: var(--soh-accent); }

.soh-league-tag { font-size: 10px; font-weight: 600; color: #fff; padding: 2px 5px; border-radius: 4px; display: inline-block; }
.soh-odds-book { font-size: 10px; font-weight: 700; color: var(--soh-text-light); background-color: #f1f1f1; padding: 2px 5px; border-radius: 4px; display: inline-block; text-transform: capitalize; }
.soh-odds-line { font-weight: 500; font-size: 14px; color: var(--soh-text-dark); text-decoration: none; }
.soh-odds-line:hover { color: var(--soh-accent); }
.soh-alert-bell { cursor: pointer; opacity: 0.5; transition: all 0.2s ease; user-select: none; font-size: 1.2em; }
.soh-alert-bell:hover { opacity: 1; transform: scale(1.1); }
.soh-alert-bell.active { opacity: 1; color: #fd7e14; }

.soh-icon-btn { background: none !important; border: none; cursor: pointer; color: var(--soh-text-light); font-size: 18px; padding: 0 5px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: color .2s, opacity .2s; }
.soh-icon-btn:hover { color: var(--soh-accent); }
.soh-icon-btn.dashicons-before::before, .soh-icon-btn .bi { font-size: 22px; width: 22px; height: 22px; }
.soh-icon-btn.soh-spinning::before { animation: soh-spin 1s linear infinite; display: inline-block; }
.soh-refresh-group { display: flex; align-items: center; gap: 8px; }
#soh-big-game-filter { opacity: 0.5; }
#soh-big-game-filter.active { opacity: 1; color: var(--soh-accent); }

.soh-theme-switcher { display: flex; align-items: center; border: 1px solid var(--soh-border); border-radius: 6px; overflow: hidden; }
.soh-theme-switcher button { background-color: transparent; border: none; padding: 5px 10px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--soh-text-light); transition: background-color 0.2s, color 0.2s; border-left: 1px solid transparent; border-right: 1px solid transparent; }
.soh-theme-switcher button:first-child { border-left: none; }
.soh-theme-switcher button:last-child { border-right: none; }
.soh-theme-switcher button.active { background-color: var(--soh-accent); color: #fff; }
.soh-theme-switcher button:not(.active):hover { background-color: rgba(0,0,0,0.05); }

.soh-modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.soh-modal-backdrop.soh-visible { opacity: 1; visibility: visible; }
.soh-modal-content { background: #fff; border-radius: 8px; max-width: 800px; width: 90%; max-height: 90vh; overflow-y: auto; transform: scale(0.95); transition: transform 0.3s ease; box-shadow: 0 5px 25px rgba(0,0,0,0.2); }
.soh-modal-backdrop.soh-visible .soh-modal-content { transform: scale(1); }
.soh-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--soh-border); }
.soh-modal-title { font-size: 1.222222em; font-weight: 600; color: var(--soh-text-dark); }
.soh-modal-close { width: 32px; height: 32px; border-radius: 50%; background-color: #f1f1f1; color: #888; font-size: 28px; line-height: 1; border: none; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; display: flex; align-items: center; justify-content: center; padding: 0; }
.soh-modal-close:hover { background-color: #e2e2e2; color: #111; }
.soh-modal-body { padding: 0; }
.soh-book-odds-table { width: 100%; border-collapse: collapse; }
.soh-book-odds-table th, .soh-book-odds-table td { padding: 12px 15px!important; border-bottom: 1px solid var(--soh-border); text-align: center; vertical-align: middle; }
.soh-book-odds-table th { font-size: 0.8em; text-transform: uppercase; color: var(--soh-text-light); font-weight: 600; }
.soh-book-odds-table thead tr:first-child th { border-bottom: 1px solid var(--soh-border); padding-bottom: 12px; }
.soh-book-odds-table tbody tr:last-child td { border-bottom: none; }
.soh-book-odds-table tbody tr:nth-child(even) { background-color: var(--soh-bg-alt); }
.soh-book-odds-table tbody td:first-child { text-align: left; font-weight: 600; }
.soh-book-odds-table a { text-decoration: none; color: var(--soh-text-dark); }
.soh-book-odds-table a:hover { color: var(--soh-accent); }
.soh-odds-cell-inner { display: flex; justify-content: center; align-items: center; padding: 5px 0; }
.soh-odds-label { font-size: 0.9em; color: var(--soh-text-light); margin-right: 4px; }
.soh-odds-price { font-size: 1em; color: var(--soh-text-dark); }
.soh-favorite { font-weight: 700; }
.soh-notification { position: fixed; bottom: 20px; right: 20px; background-color: var(--soh-text-dark); color: #fff; padding: 15px 20px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 10001; display: flex; align-items: flex-start; gap: 15px; max-width: 320px; animation: soh-notify-in 0.5s ease-out forwards; }
@keyframes soh-notify-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.soh-notification-content p { margin: 5px 0 0 0; opacity: 0.9; }
.soh-notification-close { background: transparent; border: none; color: #fff; opacity: 0.7; font-size: 24px; cursor: pointer; padding: 0; line-height: 1; }
.soh-notification-close:hover { opacity: 1; }

/* League-specific background colors for soh-league-tag */
.soh-league-tag.nfl { background-color: #1C5A8A; } /* Cooler Blue */
.soh-league-tag.ncaaf { background-color: #C0392B; } /* Crimson Red (unchanged) */
.soh-league-tag.nba { background-color: #8E44AD; } /* Purple (unchanged) */
.soh-league-tag.ncaab { background-color: #E67E22; } /* Brighter Golden Orange */
.soh-league-tag.mlb { background-color: #196F3D; } /* Forest Green (unchanged) */
.soh-league-tag.nhl { background-color: #148F77; } /* Teal (unchanged) */
.soh-league-tag.mls { background-color: #922B21; } /* Maroon Red */

/* Ensure text readability and consistent styling */
.soh-league-tag {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    padding: 2px 5px;
    border-radius: 4px;
    display: inline-block;
}

/* Dark theme adjustments to maintain contrast */
.soh-theme-dark {
    color-scheme: dark;
    --soh-bg-alt: #1a1a1a;
    --soh-border: #3a3a3a;
    --soh-header-bg: #2a2a2a;
    --soh-text-dark: #e1e1e1;
    --soh-text-light: #999;
    background-color: #121212;
    border-radius: 12px;
}
.soh-theme-dark .soh-day-header { background-color: #1f1f1f; }
.soh-theme-dark .soh-day-separator td,
.soh-theme-dark .soh-grid-matchup-team,
.soh-theme-dark .soh-cell-time { color: var(--soh-text-dark); }
.soh-theme-dark .soh-odds-line { color: var(--soh-text-dark); }
.soh-theme-dark .soh-grid-time, .soh-theme-dark .soh-grid-league, .soh-theme-dark .soh-day-header .soh-grid-header-item:first-child, .soh-theme-dark .soh-day-header .soh-grid-header-item:nth-child(2) { border-right-color: var(--soh-border); }
.soh-theme-dark .soh-odds-book { background-color: #333; color: #ccc; }
.soh-theme-dark .soh-main-controls select { background: #333; color: var(--soh-text-dark); border-color: #555; border-top-right-radius:12px; border-top-left-radius:12px }
.soh-theme-dark .soh-modal-content { background-color: #1e1e1e; }
.soh-theme-dark .soh-modal-close { background-color: #333; color: #aaa; }
.soh-theme-dark .soh-modal-close:hover { background-color: #444; color: #fff; }
.soh-theme-dark .soh-live-game .soh-game-grid-container { background-color: rgba(22, 45, 60, 0.5); }
.soh-theme-dark .soh-theme-switcher { border-color: #555; }
.soh-theme-dark .soh-theme-switcher button:not(.active):hover { background-color: rgba(255,255,255,0.1); }
.soh-theme-dark .soh-league-tag.nfl { background-color: #2E7FB8; } /* Lighter Cooler Blue */
.soh-theme-dark .soh-league-tag.ncaaf { background-color: #E74C3C; } /* Lighter Crimson (unchanged) */
.soh-theme-dark .soh-league-tag.nba { background-color: #9B59B6; } /* Lighter Purple (unchanged) */
.soh-theme-dark .soh-league-tag.ncaab { background-color: #F39C12; } /* Lighter Orange */
.soh-theme-dark .soh-league-tag.mlb { background-color: #229954; } /* Lighter Green (unchanged) */
.soh-theme-dark .soh-league-tag.nhl { background-color: #17A589; } /* Lighter Teal (unchanged) */
.soh-theme-dark .soh-league-tag.mls { background-color: #A1362B; } /* Lighter Maroon */

/* Dark theme adjustments */


@media (max-width: 782px) {
    #sports-odds-hub-app { font-size: 12px; }
    .soh-odds-line { font-size: 12px; }
    .soh-main-controls { flex-direction: column; }
    .soh-left-controls { justify-content: space-between; width: 100%; }
    .soh-right-controls { justify-content: center; width: 100%; }
    .soh-desktop-label { display: none; }
    .soh-mobile-label { display: inline; }
    .soh-main-controls label, .soh-main-controls select, .soh-theme-switcher button { font-size: 12px; }
    .soh-icon-container .bi { font-size: 16px; }

    .soh-table { min-width: 700px; }
    .soh-game-grid-container.soh-grid-cols-3 { grid-auto-columns: max-content; }
    .soh-game-grid-container.soh-grid-cols-2 { grid-auto-columns: max-content; }
    .soh-game-grid-container.soh-grid-cols-1 { grid-auto-columns: max-content; }
    .soh-day-separator td { padding-left: 10px; }

    .soh-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

.soh-best-book {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--soh-accent);
    margin-top: 2px;
    line-height: 1;
}

.soh-theme-dark .soh-best-book {
    color: var(--soh-accent);
}