/*
Purpose:
    Provide Live Games component styling for the shared normal site.

Inputs:
    Live Games content rendered through base.html.

Outputs:
    Approved Scorekeeper, timer, timer repeater, and mobile presentation.

Requirements:
    site.css and components.css loaded first.

Goal:
    Preserve the approved Live Games UI without page-local CSS.

Section:
    Shared normal-site Live Games styling.
*/

.live-heading {
    display: grid;
    grid-template-columns:
        minmax(0,1fr)
        auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 28px;
}

.live-heading-copy {
    min-width: 0;
}

.timer-repeater {
    min-width: 112px;
    padding: 10px 12px;
    border:
        1px solid var(--border);
    border-left:
        3px solid var(--red);
    border-radius: 11px;
    background:
        rgba(25,25,30,.78);
    text-align: right;
}

.timer-repeater span {
    display: block;
    margin-bottom: 3px;
    color: var(--gold);
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.timer-repeater strong {
    display: block;
    color: var(--text);
    font-size: 1.9rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -.045em;
    font-variant-numeric:
        tabular-nums;
}

.utility {
    width: 100%;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 14px;
}

.button,
.timer-button {
    min-height: 48px;
    padding: 11px 16px;
    border:
        1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: var(--panel2);
    font-weight: 900;
}

.button.primary {
    border-color:
        rgba(214,58,58,.55);
    background:
        linear-gradient(
            135deg,
            var(--red),
            var(--red-dark)
        );
}

.players {
    display: grid;
    gap: 12px;
}

.empty {
    padding: 30px 18px;
    border:
        1px dashed var(--border);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
}

.player {
    padding: 16px;
    border:
        1px solid var(--border);
    border-radius: 16px;
    background:
        rgba(25,25,30,.94);
}

.player-top {
    display: grid;
    grid-template-columns:
        minmax(0,1fr)
        auto;
    gap: 9px;
}

.player-name {
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    border:
        1px solid transparent;
    border-radius: 9px;
    outline: none;
    color: var(--text);
    background: transparent;
    font-size: 1.2rem;
    font-weight: 900;
}

.player-name:focus,
.score:focus,
.custom-time input:focus {
    border-color:
        rgba(224,170,68,.7);
    background:
        rgba(255,255,255,.04);
}

.remove-player {
    width: 44px;
    min-height: 44px;
    border:
        1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: 1.3rem;
    font-weight: 900;
}

.score-row {
    display: grid;
    grid-template-columns:
        78px
        minmax(90px,1fr)
        78px;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.score-button {
    min-height: 66px;
    border:
        1px solid var(--border);
    border-radius: 12px;
    background: var(--panel2);
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 950;
}

.score-button.minus {
    border-color:
        rgba(214,58,58,.45);
}

.score-button.plus {
    border-color:
        rgba(83,182,109,.45);
}

.score {
    width: 100%;
    min-width: 0;
    padding: 3px;
    border:
        1px solid transparent;
    border-radius: 10px;
    outline: none;
    background: transparent;
    color: var(--text);
    text-align: center;
    font-size:
        clamp(
            2.8rem,
            12vw,
            4.8rem
        );
    font-weight: 950;
    line-height: 1;
    appearance: textfield;
}

.score::-webkit-inner-spin-button,
.score::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.timer-display-wrap {
    margin-bottom: 18px;
    padding: 20px 10px;
    border:
        1px solid var(--border);
    border-radius: 16px;
    background:
        rgba(25,25,30,.78);
    text-align: center;
}

.timer-display {
    font-size:
        clamp(
            4.8rem,
            23vw,
            9rem
        );
    font-weight: 950;
    line-height: .88;
    letter-spacing: -.065em;
    font-variant-numeric:
        tabular-nums;
}

.timer-status {
    min-height: 22px;
    margin-top: 12px;
    color: var(--muted);
    font-weight: 800;
}

.timer-status.running {
    color: var(--green);
}

.timer-controls {
    display: grid;
    grid-template-columns:
        repeat(
            5,
            minmax(0,1fr)
        );
    gap: 6px;
    margin-top: 9px;
}

.timer-controls .timer-button {
    min-width: 0;
    padding-inline: 6px;
    white-space: nowrap;
}

.start {
    border-color:
        rgba(83,182,109,.48);
    background:
        rgba(83,182,109,.12);
}

.pause {
    border-color:
        rgba(224,170,68,.48);
}

.reset {
    border-color:
        rgba(214,58,58,.48);
}

.custom-time {
    display: grid;
    grid-template-columns:
        minmax(0,1fr)
        minmax(0,1fr)
        auto;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top:
        1px solid var(--border);
}

.custom-time label span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.custom-time input {
    width: 100%;
    min-height: 48px;
    padding: 9px 10px;
    border:
        1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: var(--panel2);
    color: var(--text);
    font-weight: 900;
}

.set-time {
    align-self: end;
    border-color:
        rgba(214,58,58,.55);
}

@media (max-width: 470px) {
    .live-heading {
        gap: 8px;
    }

    .timer-repeater {
        min-width: 100px;
        padding: 8px 9px;
    }

    .timer-repeater strong {
        font-size: 1.65rem;
    }

    .timer-controls {
        gap: 4px;
    }

    .timer-controls .timer-button {
        min-height: 48px;
        padding: 8px 2px;
        font-size:
            clamp(
                .64rem,
                2.8vw,
                .82rem
            );
    }

    .custom-time {
        grid-template-columns:
            minmax(0,1fr)
            minmax(0,1fr)
            auto;
        gap: 5px;
    }

    .custom-time input {
        padding-inline: 7px;
    }

    .set-time {
        padding-inline: 6px;
        font-size: .8rem;
        white-space: nowrap;
    }
}
