/*
 * story-box-score.css
 *
 * MLB newspaper box embeds inside CubsHQ news story and update bodies.
 * Loaded from mainLayout.jsp only when the story body contains a
 * story-box-score marker.
 */

.story-box-score:empty {
    display: none;
}

.story-box-score .sbs-card {
    margin: 22px 0;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    background: #fff;
    padding: 14px 16px 12px;
    box-sizing: border-box;
}

.story-box-score .sbs-header {
    margin-bottom: 10px;
}

.story-box-score .sbs-eyebrow {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #61707d;
    font-family: Arial, Helvetica, sans-serif;
}

.story-box-score .sbs-title {
    margin: 2px 0 0;
    font-size: 19px;
    line-height: 1.2;
    color: #182532;
    font-family: Georgia, serif;
}

.story-box-score .sbs-date {
    margin-top: 2px;
    font-size: 12px;
    color: #61707d;
    font-family: Arial, Helvetica, sans-serif;
}

.story-box-score .sbs-linescore-wrap,
.story-box-score .sbs-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 12px;
}

.story-box-score .sbs-section-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #182532;
    font-family: Arial, Helvetica, sans-serif;
    margin: 10px 0 4px;
}

.story-box-score .sbs-linescore,
.story-box-score .sbs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    color: #182532;
}

.story-box-score .sbs-linescore th,
.story-box-score .sbs-linescore td,
.story-box-score .sbs-table th,
.story-box-score .sbs-table td {
    padding: 4px 6px;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid #eef1f4;
}

.story-box-score .sbs-linescore th:first-child,
.story-box-score .sbs-linescore td:first-child,
.story-box-score .sbs-table th:first-child,
.story-box-score .sbs-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.story-box-score .sbs-table .sbs-totals th,
.story-box-score .sbs-table .sbs-totals td {
    font-weight: 700;
    border-top: 1px solid #cfd6dd;
}

.story-box-score .sbs-extras {
    margin: 6px 0 10px;
    font-size: 11px;
    line-height: 1.45;
    color: #61707d;
    font-family: Arial, Helvetica, sans-serif;
}

.story-box-score .sbs-team-tabs {
    position: relative;
    margin-top: 12px;
}

.story-box-score .sbs-tab-input {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    opacity: 0;
    appearance: none;
    -webkit-appearance: none;
}

.story-box-score .sbs-tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.story-box-score .sbs-tab {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 6px 0 0;
    border-radius: 4px;
    background: #f1f5f9;
    color: #182532;
    font-size: 12px;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.story-box-score .sbs-tab-cubs-input:checked ~ .sbs-tab-bar .sbs-tab-cubs,
.story-box-score .sbs-tab-opp-input:checked ~ .sbs-tab-bar .sbs-tab-opp {
    background: #0E3386;
    color: #fff;
}

.story-box-score .sbs-panel-opp {
    display: none;
}

.story-box-score .sbs-tab-cubs-input:not(:checked) ~ .sbs-panel-cubs {
    display: none;
}

.story-box-score .sbs-tab-opp-input:checked ~ .sbs-panel-opp {
    display: block;
}

.story-box-score .sbs-team-tabs .sbs-section {
    margin-top: 0;
}

.story-box-score .sbs-tab-cubs-input:focus-visible ~ .sbs-tab-bar .sbs-tab-cubs,
.story-box-score .sbs-tab-opp-input:focus-visible ~ .sbs-tab-bar .sbs-tab-opp {
    outline: 2px solid #0E3386;
    outline-offset: 2px;
}

html.dark-mode .story-box-score .sbs-card {
    background: var(--dm-bg-elevated, #1a1f27);
    border-color: rgba(255, 255, 255, .12);
}

html.dark-mode .story-box-score .sbs-title,
html.dark-mode .story-box-score .sbs-section-title,
html.dark-mode .story-box-score .sbs-linescore,
html.dark-mode .story-box-score .sbs-table {
    color: var(--dm-text-primary, #f1f5f9);
}

html.dark-mode .story-box-score .sbs-eyebrow,
html.dark-mode .story-box-score .sbs-date {
    color: var(--dm-text-muted, #a0a0a0);
}

html.dark-mode .story-box-score .sbs-extras {
    color: var(--dm-text-secondary, #bbb);
}

html.dark-mode .story-box-score .sbs-tab {
    background: var(--dm-bg-elevated, #1a1f27);
    color: var(--dm-text-primary, #f1f5f9);
}

html.dark-mode .story-box-score .sbs-tab-cubs-input:checked ~ .sbs-tab-bar .sbs-tab-cubs,
html.dark-mode .story-box-score .sbs-tab-opp-input:checked ~ .sbs-tab-bar .sbs-tab-opp {
    background: #3d6fd1;
    color: #fff;
}

html.dark-mode .story-box-score .sbs-tab-cubs-input:focus-visible ~ .sbs-tab-bar .sbs-tab-cubs,
html.dark-mode .story-box-score .sbs-tab-opp-input:focus-visible ~ .sbs-tab-bar .sbs-tab-opp {
    outline-color: #fff;
}

html.dark-mode .story-box-score .sbs-linescore th,
html.dark-mode .story-box-score .sbs-linescore td,
html.dark-mode .story-box-score .sbs-table th,
html.dark-mode .story-box-score .sbs-table td {
    border-bottom-color: rgba(255, 255, 255, .08);
}

html.dark-mode .story-box-score .sbs-table .sbs-totals th,
html.dark-mode .story-box-score .sbs-table .sbs-totals td {
    border-top-color: rgba(255, 255, 255, .18);
}

[itemprop="articleBody"] > .story-box-score {
    clear: both;
}
