/* =============================================
   SHARED THREE-COLUMN LAYOUT — SINGLE SOURCE OF TRUTH
   Reference: scores.html (Score page)
   Applied to ALL pages for consistent grid.
   Uses !important to override per-page inline styles.
   ============================================= */

/* --- Wrapper --- */
.three-col,
.player-three-col,
.coach-three-col,
.team-det-three-col,
.comp-det-three-col,
.ref-det-three-col,
.profile-three-col {
    display: flex !important;
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* --- Left Column --- */
.left-col,
.player-left-col,
.coach-left-col,
.team-det-left,
.comp-det-left,
.ref-det-left,
.profile-left-col {
    width: 30% !important;
    min-width: 280px !important;
    max-width: 440px !important;
    background: #0e0e18 !important;
    border-right: 1px solid var(--border) !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
    flex-shrink: 0 !important;
    display: block !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    z-index: auto !important;
    transform: none !important;
    transition: none !important;
}
.left-col::-webkit-scrollbar,
.player-left-col::-webkit-scrollbar,
.coach-left-col::-webkit-scrollbar,
.team-det-left::-webkit-scrollbar,
.comp-det-left::-webkit-scrollbar,
.ref-det-left::-webkit-scrollbar,
.profile-left-col::-webkit-scrollbar { width: 4px; }

.left-col::-webkit-scrollbar-track,
.player-left-col::-webkit-scrollbar-track,
.coach-left-col::-webkit-scrollbar-track,
.team-det-left::-webkit-scrollbar-track,
.comp-det-left::-webkit-scrollbar-track,
.ref-det-left::-webkit-scrollbar-track,
.profile-left-col::-webkit-scrollbar-track { background: transparent; }

.left-col::-webkit-scrollbar-thumb,
.player-left-col::-webkit-scrollbar-thumb,
.coach-left-col::-webkit-scrollbar-thumb,
.team-det-left::-webkit-scrollbar-thumb,
.comp-det-left::-webkit-scrollbar-thumb,
.ref-det-left::-webkit-scrollbar-thumb,
.profile-left-col::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* --- Centre Column --- */
.centre-col,
.center-col,
.player-centre-col,
.coach-centre-col,
.team-det-centre,
.comp-det-centre,
.ref-det-centre,
.profile-centre-col {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-dark) !important;
    border-right: 1px solid var(--border) !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
    width: auto !important;
}
.centre-col::-webkit-scrollbar,
.center-col::-webkit-scrollbar,
.player-centre-col::-webkit-scrollbar,
.coach-centre-col::-webkit-scrollbar,
.team-det-centre::-webkit-scrollbar,
.comp-det-centre::-webkit-scrollbar,
.ref-det-centre::-webkit-scrollbar,
.profile-centre-col::-webkit-scrollbar { width: 4px; }

.centre-col::-webkit-scrollbar-track,
.center-col::-webkit-scrollbar-track,
.player-centre-col::-webkit-scrollbar-track,
.coach-centre-col::-webkit-scrollbar-track,
.team-det-centre::-webkit-scrollbar-track,
.comp-det-centre::-webkit-scrollbar-track,
.ref-det-centre::-webkit-scrollbar-track,
.profile-centre-col::-webkit-scrollbar-track { background: transparent; }

.centre-col::-webkit-scrollbar-thumb,
.center-col::-webkit-scrollbar-thumb,
.player-centre-col::-webkit-scrollbar-thumb,
.coach-centre-col::-webkit-scrollbar-thumb,
.team-det-centre::-webkit-scrollbar-thumb,
.comp-det-centre::-webkit-scrollbar-thumb,
.ref-det-centre::-webkit-scrollbar-thumb,
.profile-centre-col::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* --- Right Column --- */
.right-col,
.player-right-col,
.coach-right-col,
.team-det-right,
.comp-det-right,
.ref-det-right,
.profile-right-col {
    width: 27% !important;
    min-width: 260px !important;
    max-width: 400px !important;
    background: #0e0e18 !important;
    border-left: 1px solid var(--border) !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
    flex-shrink: 0 !important;
    display: block !important;
}
.right-col::-webkit-scrollbar,
.player-right-col::-webkit-scrollbar,
.coach-right-col::-webkit-scrollbar,
.team-det-right::-webkit-scrollbar,
.comp-det-right::-webkit-scrollbar,
.ref-det-right::-webkit-scrollbar,
.profile-right-col::-webkit-scrollbar { width: 4px; }

.right-col::-webkit-scrollbar-track,
.player-right-col::-webkit-scrollbar-track,
.coach-right-col::-webkit-scrollbar-track,
.team-det-right::-webkit-scrollbar-track,
.comp-det-right::-webkit-scrollbar-track,
.ref-det-right::-webkit-scrollbar-track,
.profile-right-col::-webkit-scrollbar-track { background: transparent; }

.right-col::-webkit-scrollbar-thumb,
.player-right-col::-webkit-scrollbar-thumb,
.coach-right-col::-webkit-scrollbar-thumb,
.team-det-right::-webkit-scrollbar-thumb,
.comp-det-right::-webkit-scrollbar-thumb,
.ref-det-right::-webkit-scrollbar-thumb,
.profile-right-col::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* =============================================
   RESPONSIVE — same breakpoints everywhere
   ============================================= */

/* Tablet landscape (1024–1279): tighten widths */
@media (min-width: 1024px) and (max-width: 1279px) {
    .left-col, .player-left-col, .coach-left-col,
    .team-det-left, .comp-det-left, .ref-det-left,
    .profile-left-col {
        width: 24% !important;
        min-width: 240px !important;
        max-width: 320px !important;
        display: block !important;
    }
    .right-col, .player-right-col, .coach-right-col,
    .team-det-right, .comp-det-right, .ref-det-right,
    .profile-right-col {
        width: 22% !important;
        min-width: 220px !important;
        max-width: 280px !important;
        display: block !important;
    }
}

/* Hide right column below 1024px */
@media (max-width: 1023px) {
    .right-col, .player-right-col, .coach-right-col,
    .team-det-right, .comp-det-right, .ref-det-right,
    .profile-right-col {
        display: none !important;
    }
}

/* Tablet portrait (768–1023): 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .left-col, .player-left-col, .coach-left-col,
    .team-det-left, .comp-det-left, .ref-det-left,
    .profile-left-col {
        width: 28% !important;
        min-width: 240px !important;
        max-width: 300px !important;
        display: block !important;
        position: static !important;
    }
    .centre-col, .center-col, .player-centre-col,
    .coach-centre-col, .team-det-centre, .comp-det-centre,
    .ref-det-centre, .profile-centre-col {
        flex: 1 !important;
    }
}

/* Mobile (<768px): left col as slide-out panel */
@media (max-width: 767px) {
    .left-col, .player-left-col, .coach-left-col,
    .team-det-left, .comp-det-left, .ref-det-left,
    .profile-left-col {
        position: fixed !important;
        left: -320px !important;
        top: 60px !important;
        z-index: 50 !important;
        width: 320px !important;
        min-width: 320px !important;
        max-width: 320px !important;
        transition: left 0.25s ease !important;
        height: calc(100vh - 60px) !important;
        display: block !important;
        transform: none !important;
    }
    .left-col.open, .player-left-col.open, .coach-left-col.open,
    .team-det-left.open, .comp-det-left.open, .ref-det-left.open,
    .profile-left-col.open {
        left: 0 !important;
    }
    .centre-col, .center-col, .player-centre-col,
    .coach-centre-col, .team-det-centre, .comp-det-centre,
    .ref-det-centre, .profile-centre-col {
        width: 100% !important;
        border-right: none !important;
    }
}
