/* Homepage scoreboard layout v1.0.2.
 * Fully scoped component: intentionally does NOT reuse .team, .team-logo,
 * .team-score, .gradient or .game-page-* from the legacy box-score theme.
 * No changes to the rest of the homepage, box-score pages or Game Program.
 */
#online_scoring {
    --hs-ink: #292e30;
    --hs-panel: #303638;
    --hs-top: #24292b;
    --hs-line: #535b5e;
    --hs-paper: #f7f8f6;
    --hs-text: #f6f7f5;
    --hs-muted: #d1d7d7;
    --hs-gold: #f3ae1c;
}
#online_scoring [hidden] { display: none !important; }
#online_scoring .home-score-card,
#online_scoring .home-score-card *,
#online_scoring .home-score-tools,
#online_scoring .home-score-tools *,
#online_scoring .home-score-previous { box-sizing: border-box; }
#online_scoring [data-home-score-content] { min-width: 0; width: 100%; }
#online_scoring .home-score-tools {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px; width: 100%; max-width: 980px; margin: 0 auto 12px; padding: 0;
    color: var(--hs-ink); font-family: inherit; line-height: 1.5;
}
#online_scoring .home-score-status {
    flex: 1 1 220px; margin: 0; padding: 0;
    color: var(--hs-ink); font-size: 13px; line-height: 1.5;
}
#online_scoring .home-score-status[data-delayed="true"] {
    padding: 8px 10px; border-left: 3px solid #b77c24; border-radius: 3px;
    background: #fff7e8; color: #634610;
}
#online_scoring .home-score-alerts {
    position: static; display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; margin: 0; padding: 8px 13px; border: 1px solid #626b6e;
    border-radius: 6px; background: #fff; color: var(--hs-ink);
    font: inherit; font-size: 13px; font-weight: 600; line-height: 1.4;
    text-decoration: none; white-space: normal; cursor: pointer;
}
#online_scoring .home-score-alerts:hover { background: #edf0ed; color: var(--hs-ink); }
#online_scoring .home-score-card {
    position: relative; display: block; float: none; clear: both;
    width: 100%; max-width: 980px; min-width: 0; height: auto;
    margin: 0 auto; padding: 0; overflow: hidden;
    border: 1px solid #444d50; border-radius: 10px;
    background: var(--hs-panel); color: var(--hs-text);
    font-family: inherit; font-size: 16px; line-height: 1.5; text-align: left;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
#online_scoring .home-score-header {
    position: static; display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 6px 18px;
    margin: 0; padding: 14px 22px; width: auto; height: auto;
    background: var(--hs-top); color: var(--hs-muted);
    border: 0; border-bottom: 1px solid #475052; font-size: 13px; line-height: 1.5;
}
#online_scoring .home-score-date { color: var(--hs-text); font-weight: 600; }
#online_scoring .home-score-caption { color: var(--hs-muted); font-size: 12px; }
#online_scoring .home-score-body { display: block; position: static; margin: 0; padding: 18px 22px 24px; }
#online_scoring .home-score-phase {
    display: block; position: static; margin: 0 0 20px; padding: 0;
    color: var(--hs-gold); font-size: 15px; line-height: 1.5; font-weight: 700;
    text-align: center; overflow-wrap: anywhere;
}
#online_scoring .home-score-phase > span {
    display: inline-block; max-width: 100%; padding: 4px 16px;
    border: 1px solid #657072; border-radius: 20px; color: inherit;
    background: var(--hs-top); line-height: inherit;
}
#online_scoring .home-score-teams {
    display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    align-items: stretch; gap: 22px; width: 100%; margin: 0; padding: 0;
}
#online_scoring .home-score-team {
    position: static; float: none; display: grid;
    grid-template-columns: 124px minmax(0,1fr) 72px;
    grid-template-areas: "logo info score"; align-items: center; gap: 14px;
    min-width: 0; width: 100%; height: auto; margin: 0; padding: 0;
    color: var(--hs-text); text-align: left;
}
#online_scoring .home-score-team--home {
    grid-template-columns: 72px minmax(0,1fr) 124px;
    grid-template-areas: "score info logo"; text-align: right;
}
#online_scoring .home-score-card .home-score-logo {
    grid-area: logo; display: flex; position: relative; float: none;
    align-items: center; justify-content: center; align-self: center;
    width: 124px; height: 124px; min-width: 0; min-height: 0; max-width: 100%;
    margin: 0; padding: 9px; overflow: hidden; transform: none;
    border: 1px solid #d5dcda; border-radius: 9px;
    background: var(--hs-paper); color: var(--hs-ink);
}
#online_scoring .home-score-card .home-score-logo img[data-home-score-logo] {
    display: block; position: static; float: none; flex: 0 1 auto;
    width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%;
    margin: 0; padding: 0; border: 0; border-radius: 0;
    object-fit: contain; object-position: center center;
    transform: none; filter: none; opacity: 1; visibility: visible;
}
#online_scoring .home-score-logo .home-score-logo-unavailable {
    display: block; margin: 0; padding: 5px; width: 100%;
    color: var(--hs-ink); font-size: 12px; line-height: 1.4; font-weight: 500;
    text-align: center; white-space: normal; overflow-wrap: anywhere;
}
#online_scoring .home-score-team-info { grid-area: info; min-width: 0; margin: 0; padding: 0; }
#online_scoring .home-score-side-label {
    display: block; margin: 0 0 5px; padding: 0; color: var(--hs-muted);
    font-size: 11px; line-height: 1.4; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
#online_scoring .home-score-card .home-score-team-name {
    position: static; display: block; float: none; width: auto; height: auto;
    margin: 0; padding: 0; border: 0; background: none; color: var(--hs-text);
    font-family: inherit; font-size: 20px; line-height: 1.2; font-weight: 700;
    letter-spacing: 0; text-transform: uppercase; text-shadow: none;
    white-space: normal; overflow-wrap: anywhere; word-break: normal;
}
#online_scoring .home-score-number {
    grid-area: score; display: flex; position: static; float: none;
    align-items: center; justify-content: center; align-self: center;
    width: 72px; min-width: 0; height: 88px; margin: 0; padding: 4px;
    border: 1px solid #c8d0cf; border-radius: 8px;
    background: var(--hs-paper); color: var(--hs-ink);
    font-family: inherit; font-size: 44px; line-height: 1; font-weight: 700;
    font-variant-numeric: tabular-nums; text-align: center;
}
#online_scoring .home-score-footer {
    position: static; display: block; margin: 0; padding: 16px 18px 18px;
    background: var(--hs-top); color: var(--hs-muted); border: 0; border-top: 1px solid #475052;
    text-align: center; font-size: 13px; line-height: 1.5;
}
#online_scoring .home-score-location { margin: 0 0 9px; color: var(--hs-muted); font-size: 13px; line-height: 1.5; }
#online_scoring .home-score-card .home-score-boxlink,
#online_scoring .home-score-card .home-score-boxlink:visited {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    position: static; min-height: 42px; margin: 0; padding: 8px 20px;
    border: 1px solid var(--hs-gold); border-radius: 6px;
    background: transparent; color: var(--hs-gold);
    font-size: 15px; line-height: 1.4; font-weight: 700; text-decoration: none;
}
#online_scoring .home-score-card .home-score-boxlink:hover { background: var(--hs-gold); color: #24292b; }
#online_scoring .home-score-card .home-score-result-note {
    position: static; display: block; margin: 12px auto 10px; padding: 0; max-width: 660px;
    color: var(--hs-muted); font-size: 13px; line-height: 1.5; font-weight: 400; text-align: center;
}
#online_scoring .home-score-sponsor { display: block; margin: 12px 0 0; padding: 0; text-align: center; }
#online_scoring .home-score-card .home-score-sponsor img {
    display: block; position: static; float: none; width: auto; height: auto;
    max-width: min(260px,80%); max-height: 90px; margin: 0 auto; padding: 0;
    object-fit: contain; transform: none; border: 0; filter: none;
}
#online_scoring .home-score-previous {
    display: block; max-width: 980px; margin: 12px auto 0; padding: 12px 15px;
    border: 1px solid #c8cfcc; border-radius: 7px;
    background: #f6f7f4; color: var(--hs-ink); font-size: 14px; line-height: 1.6;
    overflow-wrap: anywhere;
}
#online_scoring .home-score-previous a { color: #6c260f; text-decoration: underline; }
#online_scoring .home-score-alerts:focus-visible,
#online_scoring .home-score-boxlink:focus-visible,
#online_scoring .home-score-previous a:focus-visible { outline: 3px solid #648fb6; outline-offset: 3px; }

/* Narrow cards (tablet/phone): same-height name rows and centered logos, not
 * leftover absolute positioning from the original game's box-score layout. */
@media (max-width: 860px) {
    #online_scoring .home-score-team {
        grid-template-columns: 104px minmax(0,1fr) 64px; gap: 10px;
    }
    #online_scoring .home-score-team--home { grid-template-columns: 64px minmax(0,1fr) 104px; }
    #online_scoring .home-score-card .home-score-logo { width: 104px; height: 104px; padding: 8px; }
    #online_scoring .home-score-card .home-score-team-name { font-size: 18px; }
    #online_scoring .home-score-number { width: 64px; height: 80px; font-size: 38px; }
}
@media (max-width: 720px) {
    #online_scoring .home-score-header { padding: 12px 14px; }
    #online_scoring .home-score-body { padding: 16px 12px 20px; }
    #online_scoring .home-score-phase { margin-bottom: 18px; font-size: 14px; }
    #online_scoring .home-score-teams { gap: 14px; }
    #online_scoring .home-score-team,
    #online_scoring .home-score-team--home {
        grid-template-columns: minmax(0,1fr); grid-template-rows: 104px minmax(82px,auto) 64px;
        grid-template-areas: "logo" "info" "score";
        justify-items: center; align-items: center; row-gap: 12px; text-align: center;
    }
    #online_scoring .home-score-team-info { align-self: center; width: 100%; }
    #online_scoring .home-score-card .home-score-team-name { font-size: 16px; line-height: 1.22; }
    #online_scoring .home-score-side-label { margin-bottom: 5px; font-size: 10px; }
    #online_scoring .home-score-number { width: 78px; height: 64px; font-size: 38px; }
    #online_scoring .home-score-footer { padding: 14px 12px 16px; }
    #online_scoring .home-score-location { font-size: 13px; }
}
@media (max-width: 360px) {
    #online_scoring .home-score-header { display: block; }
    #online_scoring .home-score-caption { display: block; margin-top: 4px; }
    #online_scoring .home-score-teams { gap: 12px; }
    #online_scoring .home-score-card .home-score-logo { width: 92px; height: 92px; }
    #online_scoring .home-score-team,
    #online_scoring .home-score-team--home { grid-template-rows: 92px minmax(90px,auto) 62px; }
    #online_scoring .home-score-card .home-score-team-name { font-size: 15px; }
}
