@charset "ISO-8859-1";

.sb--football {
    display: flex;
    flex-direction: column;
    margin: 5px 5px;
    min-width: 350px;
    max-width: 350px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
@media all and (min-width: 768px) {
    .sb--football {
        min-width: 375px;
        max-width: 375px;
    }
}
@media all and (min-width: 1095px) {
    .sb--football {
        min-width: 350px;
        max-width: 350px;
    }
}

/*** sb hide/show ***/
.hide--sb {
    display:none !important;
}
.show-inline--sb {
    display:inline-block !important;
}
.show--sb {
    display:block !important;
}

/* --- NEW MODERN HEADER --- */
.sb__game-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background-color: #f8fafc;
    border-bottom: 1px solid #edf2f7;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #1a202c; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-right:empty {
    display: none;
}

.sb--football .status-left {
    flex: 1 1 auto;
    min-width: 0;
}

.sb--football .time-clock {
    white-space: nowrap;
}

/* --- HARDWARE ACCELERATED PULSE DOT --- */
span.live-game {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3b82f6; 
}

span.live-game::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background-color: #3b82f6;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(2.5); opacity: 0; }
}

.sb__info-top-row th, 
.sb__info th {
    font-size: 10px;
    color: #a0aec0;
    text-transform: uppercase;
    padding: 8px 0 4px 0;
    border-bottom: none !important; 
}

/*** info ***/
.sb__info {
    width:100%;
    font-size: 10px;
    font-weight: normal;
    text-align: left;
    color: black; 
}
.sb__info table {
    width: 100%;
    border-collapse: collapse;
}
.sb__info th {
    border-bottom: solid 1px #CCC;
    color: #003366;
}

.sb__info .game-status {
    padding: 2px 0 1px 0;
    display: flex;
    justify-content: left;
    align-items: center;
}

.sb__info th.rhe {
    padding: 3px 0 3px 0;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
}
.sb__info td.winner {
    padding: 0px;
    width:4%;
    font-size: 12px;
    font-weight: bold;
}

/* Scorebox Team Info Block */
.sb-team-cell {
    padding: 0; 
    vertical-align: middle;
    text-align: left;
}
.sb-team-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 3px;
}
a.sb-team-link:hover {
    font-weight: normal;
}
a.sb-team-link:hover .sb-name {
    opacity: 0.8; 
    text-decoration: underline;
}

/* Stack for Rank, Name, and Record */
.sb-text-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
}
.sb-name-row {
    display: flex;
    align-items: center;
    gap: 4px; 
}
.sb-rank {
    font-size: 13px; 
    font-weight: bold;
    color: black;
}
.sb-name {
    font-size: 14px;
    font-weight: bold;
    color: #003366;
}
.sb-record {
    font-size: 11px;
    color: #666;
}

.sb--football .status-right:empty {
    display: none !important;
}

.sb__info td.rhe {
    padding: 3px;
    width: 9%;
    font-size: 14px;
    text-align: center;
}
.sb__info td.runs {
    font-size: 15px;
    font-weight: bold;
}

/*** live action (Quarters & Last Play) ***/
.sb__live-action {
    padding: 10px 16px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.dash-last-play:empty {
    display: none;
}

/* --- MIDDLE: QUARTERS GRID --- */
.quarter-grid {
    display: grid;
    grid-template-columns: 45px repeat(var(--cols, 5), 1fr); 
    text-align: center;
    align-items: center;
}

.inn-lbl { 
    font-size: 10px; 
    font-weight: 800; 
    color: #a0aec0; 
    padding-bottom: 6px; 
    border-bottom: 1px solid #e2e8f0; 
    margin-bottom: 4px;
}
.inn-lbl-corner { 
    font-size: 10px; 
}
.t1-name, .inn-cell[class*="t1-q-"] {
    padding-bottom: 6px;
    margin-bottom: 4px;
}
.inn-t-name { font-size: 11px; font-weight: 700; color: #718096; text-align: left; text-transform: uppercase;}
.inn-cell { font-size: 12px; font-weight: 500; color: #1a202c; }


/* --- BOTTOM: LAST PLAY BOX --- */
.scorebox-last-play {
    display: none; 
    width: 100%;
    margin-top: 10px; 
    padding: 6px 10px; 
    background-color: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 6px; 
    font-size: 12px; 
    font-weight: 500; 
    color: #2d3748; 
    text-align: left;
    line-height: 1.35;
    box-sizing: border-box;
}

.scorebox-last-play.is-active {
    display: block; 
}

.scorebox-last-play .lp-label {
    font-weight: bold;
    color: #003366;
    margin-right: 4px;
}
.scorebox-last-play .lp-text {
    font-style: italic;
}

/*** live win prob ***/
.sb__lwp {
    width: 100%;
    padding: 12px 16px;
    background-color: white;
    border-top: 1px solid #edf2f7;
    box-sizing: border-box; 
}

.lwp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #4a5568; 
}

.lwp-progress-bar {
    height: 6px;
    border-radius: 3px;
    display: flex;
    gap: 2px; 
    overflow: hidden;
    background: #edf2f7; 
}

.lwp-fill-1, .lwp-fill-2 {
    height: 100%;
    min-width: 3%; 
    transition: width 0.5s ease-in-out, background-color 0.5s ease;
}

/*** Footer ***/
.sb__footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; 
    gap: 15px; 
    padding: 8px 10px;
    font-size: 10px;
    color: #718096;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    margin-top: auto; 
}

.sb__footer .footer-left {
    text-align: left;
    line-height: 1.4;
    font-weight: 600;
    flex: 1 1 75%;
}

.sb__footer .footer-right {
    text-align: right;
    font-weight: 800;
    color: #4a5568;
    text-transform: uppercase;
    flex: 0 0 25%; 
    line-height: 1.2;
}

/* =========================================================
   PREDICTION HIGHLIGHT ZONES (The "Icy Blue" Analytics Look)
   ========================================================= */
.bg-predict,
.sb__info th.pred-col,
.sb__info td.pred-col {
    background-color: #eff6ff !important;
}

.sb__info th.pred-col,
.sb__info td.pred-col {
    border-left: 1px solid #dbeafe !important;
}

.sb__prediction-block {
    border-top: 1px solid #dbeafe;
    padding: 12px 16px;
}

.sb__pred-wp .lwp-labels {
    color: #1e3a8a;
    margin-bottom: 6px;
}

.sb__prediction-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #bfdbfe;
    padding-top: 8px;
    margin-top: 8px;
}

.sb__prediction-line .pred-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #60a5fa;
    letter-spacing: 0.5px;
    margin-right: 6px;
}

.sb__prediction-line .pred-val {
    font-size: 14px;
    font-weight: 700;
    color: #1e3a8a;
}

#master-scoreboard-wrapper.sb-size-small .sb__prediction-block {
    display: none !important;
}

/* --- SCOREBOX DISPLAY OPTIONS (Master Overrides) --- */
#master-scoreboard-wrapper.hide-innings .quarter-grid { display: none !important; }
#master-scoreboard-wrapper.hide-lwp .sb__lwp { display: none !important; }
#master-scoreboard-wrapper.hide-last-play .scorebox-last-play { display: none !important; }
#master-scoreboard-wrapper.hide-venue .sb__footer { display: none !important; }

/* Edge Case Fixes */
#master-scoreboard-wrapper.hide-innings.hide-last-play .sb__live-action { display: none !important; }
#master-scoreboard-wrapper.hide-venue .sb--football { padding-bottom: 10px !important; }


/* =========================================================
   "SMALL SIZE" MASTER OVERRIDES
   ========================================================= */

#master-scoreboard-wrapper.sb-size-small {
    align-items: stretch !important;
}

#master-scoreboard-wrapper.sb-size-small .sb--football {
    width: calc(50% - 10px) !important; 
    min-width: 170px !important; 
    max-width: calc(50% - 10px) !important; 
    min-height: 110px; 
    border-radius: 8px !important; 
    font-size: 13px;
    margin: 5px; 
    display: flex ;
    flex-direction: column;
    justify-content: flex-start; 
    height: auto; 
}

@media all and (min-width: 768px) {
    #master-scoreboard-wrapper.sb-size-small .sb--football {
        width: 210px !important;
        min-width: 210px !important;
        max-width: 210px !important;
    }
}

#master-scoreboard-wrapper.sb-size-small .team-logo-sprite,
#master-scoreboard-wrapper.sb-size-small .sb__live-action,
#master-scoreboard-wrapper.sb-size-small .sb__lwp,
#master-scoreboard-wrapper.sb-size-small .sb__footer,
#master-scoreboard-wrapper.sb-size-small .sb-rank,
#master-scoreboard-wrapper.sb-size-small .sb-record {
    display: none !important;
}

#master-scoreboard-wrapper.sb-size-small .sb__game-status-row {
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 8px; 
}

#master-scoreboard-wrapper.sb-size-small .sb__info td {
    padding-top: 4px;    
    padding-bottom: 4px; 
    vertical-align: middle; 
}

#master-scoreboard-wrapper.sb-size-small .sb-team-cell {
    padding-left: 8px; 
}

#master-scoreboard-wrapper.sb-size-small .sb-name-row,
#master-scoreboard-wrapper.sb-size-small .sb-name {
    display: block; 
    font-size: 13px; 
    font-weight: 700;
    line-height: 1.2; 
    white-space: normal; 
}

#master-scoreboard-wrapper.sb-size-small .sb__info th.rhe {
    font-size: 9px;
    padding-bottom: 2px;
    padding-right: 2px;
}
#master-scoreboard-wrapper.sb-size-small .sb__info td.rhe {
    font-size: 13px; 
    padding-left: 0;
    padding-right: 2px;
}
#master-scoreboard-wrapper.sb-size-small .sb__info td.runs {
    font-size: 14px;
    font-weight: 800;
}

#master-scoreboard-wrapper.sb-size-small .time-clock {
    display: block;
    width: auto;
    line-height: 1.2;
    white-space: nowrap;
}


/* =========================================================
   GLOBAL WINNER & POSSESSION UI (The "Edge Tab" Pill)
   ========================================================= */

.sb--football .winner-col,
.sb--football .winner {
    display: none !important;
}

.sb--football .sb-team-cell {
    position: relative;
    padding-left: 12px; 
}

.sb--football tr.is-winner .sb-team-cell::before,
.sb--football tr.has-possession .sb-team-cell::before {
    content: "";
    position: absolute;
    left: 0; 
    top: 50%;
    transform: translateY(-50%); 
    height: 70%; 
    width: 5px; 
    border-radius: 0 4px 4px 0; 
}

.sb--football tr.has-possession .sb-team-cell::before {
    background-color: #7c3f1d;
}

.sb--football tr.is-winner .sb-team-cell::before {
    background-color: #48bb78; 
}

#master-scoreboard-wrapper.sb-size-small .sb-team-cell {
    padding-left: 6px !important; 
}
#master-scoreboard-wrapper.sb-size-small tr.is-winner .sb-team-cell::before,
#master-scoreboard-wrapper.sb-size-small tr.has-possession .sb-team-cell::before {
    width: 4px !important; 
}

/* =========================================================
   DASHBOARD COMMAND AREA (Desktop & Mobile Layout)
   ========================================================= */
.sb-header-grid .commands-area.sb-controls-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important; 
    margin-top: 15px;
    text-align: left;
}

.sb-control-block {
    background-color: #f4f6f8; 
    border: 2px solid #94a3b8; 
    border-radius: 8px;
    padding: 10px 15px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.sb-block-left {
    flex: 1 1 400px; 
    min-width: 0; 
}

.sb-block-right {
    flex: 0 0 200px;  
    max-width: 200px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px; 
}

.sb-block-title {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #1a202c;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.sb-ctrl-row {
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
    gap: 6px; 
    min-width: 0; 
}

.sb-ctrl-row:last-child {
    margin-bottom: 0;
}

.sb-ctrl-row .sb-skinny-label {
    width: auto; 
    flex-shrink: 0;
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096;
}

.sb-action-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; 
}

.sb-segmented-track {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; 
}
.sb-segmented-track::-webkit-scrollbar {
    display: none; 
}

@media (max-width: 768px) {
    .sb-ctrl-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px; 
    }
    .sb-ctrl-row .sb-skinny-label {
        width: auto; 
    }
    .sb-action-bar, .sb-segmented-track {
        margin-top: 0 !important;
        padding-left: 0 !important;
        max-width: 100%; 
    }
}

/* =========================================================
   DATE RIBBON (Horizontal Scroll)
   ========================================================= */
.sb-date-wrapper {
    display: flex;
    align-items: center;
    background: #f4f6f8;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.sb-date-track-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.sb-date-track {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.sb-date-track::-webkit-scrollbar {
    display: none; 
}

.sb-date-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 65px; 
    padding: 6px 0;
    border-radius: 6px;
    color: #4a5568;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.sb-date-pill .day-num {
    font-size: 15px;
    font-weight: 800;
    color: #1a202c;
    margin-top: 2px;
}

.sb-date-pill:hover {
    background: #e2e8f0;
    text-decoration: none;
}

.sb-date-pill.active {
    background: #2b6cb0;
    color: #ffffff;
    border-color: #2c5282;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.sb-date-pill.active .day-num {
    color: #ffffff;
}

.sb-date-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0 10px;
    font-size: 14px;
    height: 100%;
}
.sb-date-btn:hover {
    color: #2b6cb0;
}
.sb-date-btn.cal-btn {
    border-left: 1px solid #cbd5e0;
    margin-left: 5px;
    padding-left: 15px;
    color: #2b6cb0;
}
.ui-datepicker,
.datepicker {
    z-index: 999999 !important; 
}

/* --- ADMIN SCOREBOX FOOTER --- */
.sb__admin-footer {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 6px 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.admin-row:last-child { margin-bottom: 0; }

.status-row { justify-content: flex-start; gap: 6px; }
.status-circle {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.circle-green  { background: #10B981; box-shadow: 0 0 4px #10B981; }
.circle-red    { background: #EF4444; box-shadow: 0 0 4px #EF4444; }
.circle-blue   { background: #3B82F6; box-shadow: 0 0 4px #3B82F6; }
.circle-purple { background: #8B5CF6; }
.circle-yellow { background: #F59E0B; }
.circle-gray   { background: #9CA3AF; }

.status-text { font-weight: bold; color: #1e293b; }
.admin-pc { margin-left: auto; color: #64748b; }

.url-row a {
    color: #2563eb;
    text-decoration: none;
    white-space: normal;
    word-break: break-all; 
    line-height: 1.2;
    display: block;
    width: 100%;
    font-size: 10px; 
}

.override-badge {
    background: #e2e8f0; padding: 2px 4px; border-radius: 3px; color: #334155; font-weight: bold;
}
.admin-buttons { display: flex; gap: 4px; }
.admin-btn {
    font-size: 9px; padding: 3px 6px; border: none; border-radius: 3px; cursor: pointer; font-weight: bold; text-transform: uppercase;
}
.admin-btn:hover { opacity: 0.8; }
.btn-force { background: #f59e0b; color: white; }
.btn-final { background: #ef4444; color: white; }
.btn-clear { background: #64748b; color: white; }

.size-toggle-wrapper {
    display: inline-flex;
    background: #e2e8f0; 
    border-radius: 8px;
    padding: 3px;
    width: 180px; 
}

.size-toggle-label {
    flex: 1;
    text-align: center;
    padding: 5px 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin: 0;
}

.size-toggle-label input { 
    display: none; 
}

.size-toggle-label.active {
    background: #ffffff;
    color: #1a202c;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.disabled-control {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important; 
}

.custom-view-btn { color: #48bb78 !important; } 
.custom-edit-btn { color: #3182ce !important; } 
.custom-view-btn:hover { color: #38a169 !important; }
.custom-edit-btn:hover { color: #2b6cb0 !important; }