/* Live Scores: the line on every page, the list, a match's page and the form that starts one. */

/* The notice banner's look, with the words themselves as the link: a competition's name can be
   long, and .notice-banner__link does not wrap. */
.notice-banner .live-score-alert__link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Holds what the page's script draws again, without taking part in the page's layout. The hidden
   attribute loses to a display rule, so a match that has gone needs its own. */
.live-score-refresh {
    display: contents;
}

.live-score-refresh[hidden] {
    display: none;
}

.live-score-list {
    display: grid;
    gap: 1rem;
}

.live-score-card {
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--club-line);
    border-radius: var(--club-radius);
}

.live-score-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.live-score-card__title {
    margin: 0;
    font-size: 1.1rem;
}

.live-score-card__meta {
    margin: 0.15rem 0 0;
    color: var(--club-muted);
    font-weight: 600;
}

.live-score-status {
    flex: 0 0 auto;
    color: var(--club-muted);
    font-weight: 700;
}

.live-score-status--live {
    color: var(--club-fixed-green);
}

/* A best of 7 can need the room sideways. The hidden caption, positioned outside the table, would
   otherwise put a scroll bar down the side. */
.live-score-table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

.live-score-table {
    width: 100%;
    font-variant-numeric: tabular-nums;
}

.live-score-table th,
.live-score-table td {
    padding: 0.4rem 0.3rem;
    border-top: 1px solid var(--club-line);
}

.live-score-table thead th {
    border-top: 0;
    color: var(--club-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.live-score-table tbody th {
    font-weight: 600;
    overflow-wrap: break-word;
}

.live-score-table td {
    width: 3.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.live-score-table__winner th {
    font-weight: 800;
}

@media (max-width: 575.98px) {
    .live-score-table td {
        width: 2.75rem;
    }

    .live-score-table thead th {
        font-size: 0.72rem;
    }
}

.live-score-card__action {
    margin: 0 0 0.65rem;
}

/* Below the card on a match's page. What the script redraws takes no part in the page's spacing. */
.live-score-match-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.live-score-match-actions .alert {
    margin: 0;
}

/* The buttons a scorer presses every few seconds with the other hand holding a racket. */
.live-score-scoring {
    display: grid;
    gap: 1rem;
}

.live-score-scoring .alert {
    margin: 0;
}

.live-score-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.live-score-point {
    display: grid;
    gap: 0.15rem;
    place-content: center;
    width: 100%;
    min-height: 110px;
    padding: 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    touch-action: manipulation;
}

.live-score-point small {
    font-size: 0.85rem;
    font-weight: 600;
    overflow-wrap: break-word;
}

.live-score-undo .btn {
    width: 100%;
    min-height: 44px;
    touch-action: manipulation;
}

.live-score-controls__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.live-score-table--form td {
    width: 4rem;
}

.live-score-table--form .form-control {
    min-width: 3rem;
    padding: 0.3rem;
    text-align: center;
}

.live-score-away {
    margin-top: 0.75rem;
}

/* The two ways a match is played, of which the form's script shows one. */
.live-score-format {
    margin-top: 1rem;
}

.live-score-format[hidden] {
    display: none;
}

.live-score-away summary {
    margin-bottom: 0.65rem;
    font-weight: 600;
    cursor: pointer;
}

.live-score-players {
    display: grid;
    gap: 0.75rem;
}
