/* CubshQ Cubs team/player stats hub. Bump cnet version_css_main after edits. */

.cubs-ts {
    --cubs-navy: #0E3386;
    --cubs-red: #D12325;
    --cubs-ink: #1d1d1f;
    --cubs-muted: #5a5a60;
    --cubs-line: rgba(14, 51, 134, 0.16);
    --cubs-card: #fff;
    color: var(--cubs-ink);
    padding: 0 0 32px;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

html.dark-mode .cubs-ts {
    --cubs-ink: var(--dm-text-primary, #f1f5f9);
    --cubs-muted: var(--dm-text-secondary, #bbb);
    --cubs-line: rgba(255, 255, 255, 0.14);
    --cubs-card: var(--dm-bg-elevated, #1c1f25);
    color: var(--dm-text-primary, #f1f5f9);
}

.cubs-ts__hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    background: linear-gradient(125deg, #0E3386 0%, #071a45 72%);
    color: #fff;
    border-radius: 12px;
    padding: 22px 20px 18px;
    margin-bottom: 14px;
}

.cubs-ts__kicker {
    margin: 0 0 6px;
    color: #ffb4b4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cubs-ts__hero h1 {
    margin: 0 0 8px;
    color: #fff;
    font: 400 clamp(26px, 4vw, 40px)/1.15 Georgia, "Times New Roman", serif;
}

html.dark-mode .cubs-ts__hero h1 {
    color: #fff;
}

.cubs-ts h2,
.cubs-ts__table th {
    color: #0E3386;
}

html.dark-mode .cubs-ts h2,
html.dark-mode .cubs-ts__table th {
    color: var(--dm-text-primary, #f1f5f9);
}

.cubs-ts__updated {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.cubs-ts__year-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    font-weight: 700;
}

.cubs-ts__year-nav a,
.cubs-ts__year-nav span {
    color: #fff;
    text-decoration: none;
}

.cubs-ts__year-nav a:hover {
    text-decoration: none;
}

.cubs-ts__year-nav .is-disabled {
    opacity: 0.45;
}

.cubs-ts__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.cubs-ts__year-pick,
.cubs-ts__month {
    position: relative;
    display: flex;
    align-items: center;
}

.cubs-ts__year-pick select {
    max-width: min(100%, 420px);
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.cubs-ts__bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--cubs-line);
    border-radius: 12px;
    background: var(--cubs-card);
}

.cubs-ts__seg {
    display: inline-flex;
    flex-wrap: wrap;
}

.cubs-ts__seg a {
    display: inline-block;
    padding: 7px 12px;
    margin-left: -1px;
    border: 1px solid var(--cubs-line);
    background: transparent;
    color: var(--cubs-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.cubs-ts__seg a:first-child {
    margin-left: 0;
    border-radius: 8px 0 0 8px;
}

.cubs-ts__seg a:last-child {
    border-radius: 0 8px 8px 0;
}

.cubs-ts__seg a:hover {
    text-decoration: none;
}

.cubs-ts__seg a.is-active {
    position: relative;
    z-index: 1;
    border-color: transparent;
    color: #fff;
}

html.dark-mode .cubs-ts__seg a {
    color: var(--dm-text-primary, #f1f5f9);
}

html.dark-mode .cubs-ts__seg a.is-active {
    color: #fff;
}

.cubs-ts__month {
    margin-left: auto;
}

.cubs-ts__month select {
    padding: 6px 10px;
    border: 1px solid var(--cubs-line);
    border-radius: 8px;
    background: var(--cubs-card);
    color: var(--cubs-ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

html.dark-mode .cubs-ts__month select {
    background: var(--dm-bg-elevated, #1c1f25);
    color: var(--dm-text-primary, #f1f5f9);
}

@media (max-width: 720px) {
    .cubs-ts__year-nav,
    .cubs-ts__year-pick,
    .cubs-ts__year-pick select,
    .cubs-ts__month,
    .cubs-ts__month select {
        width: 100%;
        max-width: 100%;
    }

    .cubs-ts__month {
        margin-left: 0;
    }
}

.cubs-ts__empty {
    margin: 0 0 12px;
    color: var(--cubs-muted);
    font-size: 14px;
}

html.dark-mode .cubs-ts__empty {
    color: var(--dm-text-secondary, #bbb);
}

.cubs-ts__scroll {
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid var(--cubs-line);
    border-radius: 12px;
    background: var(--cubs-card);
}

.cubs-ts__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 720px;
}

.cubs-ts__table th,
.cubs-ts__table td {
    padding: 7px 8px;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid var(--cubs-line);
}

.cubs-ts__table th {
    font-size: 11px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cubs-ts__table th a {
    color: inherit;
    text-decoration: none;
}

.cubs-ts__table th a.is-sort {
    text-decoration: underline;
}

.cubs-ts__name {
    text-align: left;
    position: sticky;
    left: 0;
    background: var(--cubs-card);
    font-weight: 600;
    z-index: 1;
}

.cubs-ts__table tbody tr.is-team td {
    font-weight: 800;
    background: rgba(14, 51, 134, 0.08);
}

html.dark-mode .cubs-ts__table tbody tr.is-team td {
    background: rgba(255, 255, 255, 0.08);
}

.cubs-ts__table tbody tr.is-team .cubs-ts__name {
    background: inherit;
}
