/* ── Tighter top padding on the page section ── */
.site-section:has(.pr-sidebar) {
    padding-top: 1.5em;
}

/* ── Sidebar (competition cards) ── */
.pr-sidebar {
    position: sticky;
    top: 90px;
}

.pr-sidebar-label {
    color: #64748B;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.pr-comp-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pr-comp-card {
    text-align: left;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #E5E7EB;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s, border-color 0.15s;
}

.pr-comp-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.pr-comp-card.active {
    background: rgba(238, 30, 70, 0.16);
    border-color: #ee1e46;
    box-shadow: 0 0 0 1px rgba(238, 30, 70, 0.35);
}

.pr-comp-emblem {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.pr-comp-emblem-fallback {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.pr-comp-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pr-comp-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pr-comp-meta {
    font-size: 12px;
    color: #64748B;
}

.pr-comp-card.active .pr-comp-meta {
    color: #ee1e46;
}

/* ── Matches panel ── */
.pr-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    margin-top: 16px;
}

.pr-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.pr-filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pr-filter-btn {
    background: transparent;
    border: none;
    color: #94A3B8;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, color 0.15s;
}

.pr-filter-btn:hover {
    color: #E5E7EB;
}

.pr-filter-btn.active {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.pr-filter-count {
    font-size: 11px;
    font-weight: 700;
    color: #64748B;
    background: transparent;
    padding: 1px 6px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

.pr-filter-btn.active .pr-filter-count {
    background: rgba(255, 255, 255, 0.06);
    color: #94A3B8;
}

.pr-filter-btn[data-filter="open"].active .pr-filter-count {
    color: #ee1e46;
}

/* ── Stage section header ── */
.pr-stage-header {
    padding: 12px 18px;
    font-size: 11px;
    font-weight: 700;
    color: #64748B;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.015);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pr-stage-header-count {
    color: #475569;
    font-weight: 500;
}

/* ── Match row ── */
.pr-match-row {
    display: grid;
    grid-template-columns: 150px 1fr 220px 1fr 160px;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.pr-match-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.pr-match-date-line {
    font-size: 13px;
    color: #E5E7EB;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.pr-match-round {
    font-size: 11px;
    color: #64748B;
    margin-top: 2px;
}

.pr-team {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pr-team-home {
    justify-content: flex-end;
    text-align: right;
}

.pr-team-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pr-team-name.dim {
    color: #94A3B8;
}

.pr-team-crest {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.pr-team-crest-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.pr-score-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.pr-score-box.placed {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.pr-score-box.empty {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    color: #475569;
}

/* ── Pick zone ── */
.pr-pick-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* 1/X/2 buttons */
.pr-pick-btns {
    display: flex;
    gap: 6px;
}

.pr-pick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 42px;
    padding: 0 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #94A3B8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    font-family: inherit;
}

.pr-pick-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: #E5E7EB;
}

.pr-pick-btn[disabled] {
    cursor: default;
}

.pr-pick-btn.selected {
    background: rgba(238, 30, 70, 0.18);
    color: #fff;
    border-color: rgba(238, 30, 70, 0.6);
}

.pr-pick-btn.correct {
    background: rgba(16, 185, 129, 0.18);
    color: #34D399;
    border-color: rgba(16, 185, 129, 0.55);
}

.pr-pick-btn.correct-unselected {
    background: rgba(16, 185, 129, 0.06);
    color: #34D399;
    border: 1px dashed rgba(16, 185, 129, 0.35);
    opacity: 0.7;
}

.pr-pick-btn.wrong {
    background: rgba(245, 158, 11, 0.12);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.45);
}

.pr-pick-btn.dim {
    opacity: 0.4;
}

.pr-pick-letter {
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
}

.pr-pick-sublabel {
    font-size: 9px;
    font-weight: 600;
    margin-top: 2px;
    opacity: 0.7;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Score inputs (exact mode) */
.pr-score-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pr-score-sep {
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.pr-score-input {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    outline: none;
    font-variant-numeric: tabular-nums;
    font-family: inherit;
    appearance: textfield;
    -moz-appearance: textfield;
}

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

.pr-score-input:focus {
    border-color: rgba(238, 30, 70, 0.55);
}

.pr-score-input[disabled] {
    background: rgba(255, 255, 255, 0.025);
    color: #94A3B8;
}

.pr-score-input.correct {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.45);
    color: #34D399;
}

.pr-score-input.wrong {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.35);
    color: #FBBF24;
}

/* ── Status chip (right column) ── */
.pr-status-cell {
    text-align: right;
}

.pr-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.pr-status-chip.open {
    background: rgba(238, 30, 70, 0.12);
    color: #ee1e46;
}

.pr-status-chip.open .pr-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ee1e46;
    box-shadow: 0 0 0 3px rgba(238, 30, 70, 0.22);
    animation: pr-pulse 1.6s ease-in-out infinite;
}

@keyframes pr-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(238, 30, 70, 0.22); }
    50% { box-shadow: 0 0 0 5px rgba(238, 30, 70, 0.08); }
}

.pr-status-chip.locked {
    background: rgba(148, 163, 184, 0.10);
    color: #94A3B8;
}

.pr-status-chip.live {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.pr-status-chip.live .pr-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.22);
    animation: pr-pulse-live 1.6s ease-in-out infinite;
}

@keyframes pr-pulse-live {
    0%, 100% { box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.22); }
    50% { box-shadow: 0 0 0 5px rgba(251, 146, 60, 0.08); }
}

.pr-status-chip.correct {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.pr-status-chip.bullseye {
    background: rgba(16, 185, 129, 0.20);
    color: #34D399;
}

.pr-status-chip.wrong {
    background: rgba(148, 163, 184, 0.08);
    color: #94A3B8;
}

/* ── Empty filter state ── */
.pr-empty {
    padding: 60px 18px;
    text-align: center;
    color: #64748B;
}

/* ── Mobile tweaks ── */
@media (max-width: 640px) {

    .pr-match-row {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "meta   meta   status"
            "home   pick   away";
        gap: 8px 6px;
        padding: 12px 14px;
        align-items: center;
    }

    .pr-match-meta {
        grid-area: meta;
        display: flex;
        align-items: baseline;
        gap: 6px;
        flex-wrap: wrap;
    }

    .pr-status-cell {
        grid-area: status;
        text-align: right;
        white-space: nowrap;
    }

    .pr-team-home {
        grid-area: home;
        justify-content: flex-end;
        text-align: right;
        min-width: 0;
    }

    .pr-pick-zone {
        grid-area: pick;
        flex-shrink: 0;
    }

    .pr-team-away {
        grid-area: away;
        justify-content: flex-start;
        text-align: left;
        min-width: 0;
    }

    .pr-score-box {
        width: 30px;
        height: 30px;
        font-size: 14px;
        border-radius: 6px;
    }

    .pr-score-input {
        width: 34px;
        height: 34px;
        font-size: 15px;
        border-radius: 8px;
    }

    .pr-team-crest,
    .pr-team-crest-placeholder {
        width: 20px;
        height: 20px;
    }

    .pr-team-name { font-size: 12px; }
    .pr-match-date-line { font-size: 12px; }
    .pr-match-round { font-size: 10px; margin-top: 0; }

    .pr-pick-btns {
        flex-direction: column;
        gap: 4px;
    }

    .pr-pick-btn {
        min-width: 44px;
        height: 32px;
        padding: 0 6px;
        border-radius: 8px;
    }

    .pr-pick-letter { font-size: 12px; }
    .pr-pick-sublabel { display: none; }

    .pr-status-chip {
        font-size: 10px;
        padding: 4px 8px;
    }
}
