/* ── Score inputs ────────────────────────────────────────── */
.form-fields {
    display: grid;
}

.form-fields > .section-header,
.form-fields > .section-title,
.form-fields > .section-text {
    justify-self: center;
    margin-bottom: 4px;
}

/* ── Team header ─────────────────────────────────────────── */
.team-header {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--q-color-text-secondary);
    justify-self: center;
}

.team-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.team-divider {
    border-top: 1px solid var(--q-color-border-primary);
    display: none;
    margin-bottom: 8px;
}

.actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 8px;
}

.ranked-label {
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    padding: 7px 14px;
    border: 1px solid var(--q-color-border-secondary);
    background: none;
    color: var(--q-color-text-primary);
    display: flex;
    margin-bottom: 0;
}

#ranked-hint {
    display: none;
    position: absolute;
    transform: translate(0, 20px);
    background: var(--q-color-background-primary);
    border: var(--q-color-border-primary) solid 1px;
    border-radius: 4px;
    padding: 8px;
    z-index: 1;
}

#ranked-toggle:hover + #ranked-hint {
    display: block;
}

.match-list-container {
    position: relative;
}

#ranked-filter-btn {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(0, -100%);
}

/* ── Responsive (Tablet) ─────────────────────────────────── */
@media (max-width: 768px) {
    .live-counter-wrapper {
        gap: 10px;
    }

    /* Team wrap becomes single column */
    .team-wrap {
        grid-template-columns: 1fr;
    }
    .team-divider {
        display: block;
    }
}

/* ── Responsive (Mobile) ────────────────────────────────── */
@media (max-width: 500px) {

    /* Forms stack vertically */
    .form-player,
    .field,
    .form-score {
        flex: 1 1 100%;
    }

    .name-fieldset {
        flex-wrap: wrap;
    }

    .team-wrap {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Score inputs smaller */
    .score-in {
        width: 48px;
        font-size: 18px;
    }

    .score-row {
        gap: 8px;
    }

    .actions {
        gap: 6px;
    }

    .ranked-label {
        font-size: 16px;
        padding: 6px 12px;
    }
}