/*
==========================================================
OUANAMINTHE FC — STANDINGS PAGE
Version: 2.0
==========================================================
*/


/* ==========================================
   PAGE SECTION
========================================== */

.standings.section{
    background: var(--color-background);
    padding-top: var(--space-32);
    padding-bottom: var(--space-64);
}


/* ==========================================
   PAGE HEADING
========================================== */

.standings-page-heading{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-12);
    margin-bottom: var(--space-32);
    text-align: center;
}

.standings-page-heading .section-title{
    margin: 0;
    color: var(--color-primary);
    font-size: var(--fs-32);
    font-weight: var(--fw-700);
}

.standings-eyebrow{
    display: block;
    margin-bottom: var(--space-8);
    color: var(--color-primary-dark);
    font-size: var(--fs-14);
    font-weight: var(--fw-700);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.standings-page-description{
    max-width: 620px;
    margin: 0 auto;
    color: var(--color-text-light);
    font-size: var(--fs-16);
    line-height: 1.7;
    text-align: center;
}


/* ==========================================
   FILTERS
========================================== */

.standings-filters{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-20);
    margin-bottom: var(--space-24);
    padding: var(--space-24);
    background: var(--color-surface);
    border: 1px solid rgba(0, 119, 204, 0.10);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.standings-filter-group{
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.standings-filter-group label{
    color: var(--color-primary-dark);
    font-size: var(--fs-14);
    font-weight: var(--fw-700);
}

.standings-select-wrapper{
    position: relative;
}

.standings-select-wrapper > i{
    position: absolute;
    top: 50%;
    left: var(--space-16);
    z-index: 2;
    color: var(--color-primary);
    font-size: var(--fs-18);
    pointer-events: none;
    transform: translateY(-50%);
}

.standings-select-wrapper select{
    width: 100%;
    min-height: 52px;
    padding: 0 46px 0 48px;
    color: var(--color-text);
    font-size: var(--fs-16);
    font-weight: var(--fw-600);
    background-color: var(--color-background-light);
    border: 1px solid rgba(0, 119, 204, 0.18);
    border-radius: var(--radius-md);
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.standings-select-wrapper select:hover{
    border-color: var(--color-primary);
}

.standings-select-wrapper select:focus{
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(51, 168, 255, 0.12);
}

.standings-select-wrapper select:disabled{
    cursor: not-allowed;
    opacity: 0.65;
}


/* ==========================================
   COMPETITION HEADER
========================================== */

.competition-header{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-16);
    margin-bottom: var(--space-24);
    padding: var(--space-24);
    background:
        linear-gradient(
            135deg,
            rgba(51, 168, 255, 0.12),
            rgba(255, 255, 255, 0.95)
        );
    border: 1px solid rgba(0, 119, 204, 0.14);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.competition-logo-wrapper{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    min-width: 110px;
    height: 110px;
    padding: var(--space-12);
    background: var(--color-surface);
    border: 1px solid rgba(0, 119, 204, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.competition-logo{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.competition-info{
    flex: 1;
    width: 100%;
    min-width: 0;
    text-align: center;
}

.competition-meta{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.competition-type,
.competition-country,
.competition-status{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 10px;
    font-size: var(--fs-13);
    font-weight: var(--fw-700);
    border-radius: 999px;
}

.competition-type{
    color: var(--color-primary-dark);
    background: rgba(51, 168, 255, 0.14);
}

.competition-country{
    color: var(--color-text-light);
    background: rgba(0, 0, 0, 0.05);
}

.competition-status{
    text-transform: capitalize;
}

.competition-status--active{
    color: #157347;
    background: rgba(25, 135, 84, 0.13);
}

.competition-status--completed{
    color: #6c757d;
    background: rgba(108, 117, 125, 0.13);
}

.competition-status--inactive{
    color: #842029;
    background: rgba(220, 53, 69, 0.13);
}

.competition-title{
    margin: 0 0 var(--space-8);
    color: var(--color-primary-dark);
    font-size: var(--fs-28);
    font-weight: var(--fw-700);
    line-height: 1.25;
}

.competition-short-name{
    margin: 0 0 var(--space-8);
    color: var(--color-text-light);
    font-size: var(--fs-15);
    font-weight: var(--fw-600);
}

.competition-season{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    margin: 0;
    color: var(--color-text-light);
    font-size: var(--fs-15);
}

.competition-season i{
    color: var(--color-primary);
}

.competition-season strong{
    color: var(--color-primary-dark);
}


/* ==========================================
   STANDINGS CARD
========================================== */

.standings-card{
    margin-bottom: var(--space-24);
    background: var(--color-surface);
    border: 1px solid rgba(0, 119, 204, 0.10);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.standings-group-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-16);
    padding: var(--space-20) var(--space-24);
    background: var(--color-background-light);
    border-bottom: 1px solid rgba(0, 119, 204, 0.10);
}

.standings-group-label{
    display: block;
    margin-bottom: 4px;
    color: var(--color-text-light);
    font-size: var(--fs-12);
    font-weight: var(--fw-700);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.standings-group-title{
    margin: 0;
    color: var(--color-primary-dark);
    font-size: var(--fs-22);
    font-weight: var(--fw-700);
}

.standings-team-count{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 12px;
    color: var(--color-primary-dark);
    font-size: var(--fs-13);
    font-weight: var(--fw-700);
    background: rgba(51, 168, 255, 0.12);
    border-radius: 999px;
}


/* ==========================================
   TABLE WRAPPER
========================================== */

.standings-table-wrapper{
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color:
        var(--color-primary)
        var(--color-background-light);
}

.standings-table-wrapper:focus{
    outline: 3px solid rgba(51, 168, 255, 0.18);
    outline-offset: -3px;
}

.standings-table-wrapper::-webkit-scrollbar{
    height: 8px;
}

.standings-table-wrapper::-webkit-scrollbar-track{
    background: var(--color-background-light);
}

.standings-table-wrapper::-webkit-scrollbar-thumb{
    background: var(--color-primary);
    border-radius: 999px;
}


/* ==========================================
   STANDINGS TABLE
========================================== */

.standings-table{
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
}

.standings-table thead{
    color: #ffffff;
    background: var(--color-primary);
}

.standings-table th{
    position: relative;
    padding: var(--space-16);
    color: #ffffff;
    font-size: var(--fs-14);
    font-weight: var(--fw-700);
    text-align: center;
    white-space: nowrap;
}

.standings-table th:not(:last-child)::after{
    content: "";
    position: absolute;
    top: 25%;
    right: 0;
    width: 1px;
    height: 50%;
    background: rgba(255, 255, 255, 0.20);
}

.standings-table td{
    padding: var(--space-16);
    color: var(--color-text);
    font-size: var(--fs-15);
    font-weight: var(--fw-500);
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 119, 204, 0.08);
}

.standings-table tbody tr{
    transition: var(--transition-fast);
}

.standings-table tbody tr:last-child td{
    border-bottom: none;
}

.standings-table tbody tr:nth-child(even){
    background: var(--color-background-light);
}

.standings-table tbody tr:hover{
    background: rgba(51, 168, 255, 0.08);
}

.standings-position-column{
    width: 72px;
}

.standings-team-column{
    min-width: 250px;
    text-align: left !important;
}

.standings-points-column{
    width: 90px;
}


/* ==========================================
   POSITION BADGES
========================================== */

.standings-position{
    font-weight: var(--fw-700);
}

.position-badge{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--color-primary-dark);
    font-size: var(--fs-14);
    font-weight: var(--fw-700);
    background: rgba(51, 168, 255, 0.12);
    border-radius: 50%;
}

.standings-position--1 .position-badge{
    color: #7a5a00;
    background: #ffe8a3;
}

.standings-position--2 .position-badge{
    color: #495057;
    background: #e9ecef;
}

.standings-position--3 .position-badge{
    color: #7a3e00;
    background: #f4c7a1;
}


/* ==========================================
   TEAM CELL
========================================== */

.standings-team-cell{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-12);
    min-width: 250px;
    text-align: left;
}

.standings-team-logo{
    width: 42px;
    min-width: 42px;
    height: 42px;
    object-fit: contain;
}

.standings-team-info{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-8);
    min-width: 0;
}

.standings-team-name{
    color: var(--color-primary-dark);
    font-size: var(--fs-15);
    font-weight: var(--fw-700);
    line-height: 1.35;
}

.standings-ofc-label{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    color: #ffffff;
    font-size: 11px;
    font-weight: var(--fw-700);
    letter-spacing: 0.04em;
    background: var(--color-primary);
    border-radius: 999px;
}



/* ==========================================
   OFC HIGHLIGHT
========================================== */

.standings-table tbody tr.standings-row--ofc{
    background: rgba(51, 168, 255, 0.13);
}

.standings-table tbody tr.standings-row--ofc td:first-child{
    border-left: 5px solid var(--color-primary);
}

.standings-table tbody tr.standings-row--ofc:hover{
    background: rgba(51, 168, 255, 0.20);
}

/* ==========================================
   LEADER ROW
========================================== */

.standings-table tbody tr.standings-row--leader{
    box-shadow: inset 0 2px 0 rgba(255, 193, 7, 0.75);
}

.standings-table tbody tr.standings-row--leader td{
    font-weight: var(--fw-600);
}


/* ==========================================
   GOAL DIFFERENCE
========================================== */

.standings-goal-difference{
    font-weight: var(--fw-700);
}

.standings-goal-difference--positive{
    color: #157347 !important;
}

.standings-goal-difference--negative{
    color: #bb2d3b !important;
}


/* ==========================================
   POINTS
========================================== */

.standings-points{
    color: var(--color-primary-dark) !important;
    font-size: var(--fs-18) !important;
    font-weight: var(--fw-700) !important;
}


/* ==========================================
   LEGEND
========================================== */

.standings-legend{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-16);
    padding: var(--space-20);
    background: var(--color-surface);
    border: 1px solid rgba(0, 119, 204, 0.10);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.standings-legend-item{
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    color: var(--color-text-light);
    font-size: var(--fs-14);
    font-weight: var(--fw-600);
}

.standings-legend-color{
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.standings-legend-color--leader{
    background: #ffe8a3;
    border: 1px solid rgba(122, 90, 0, 0.22);
}

.standings-legend-color--ofc{
    background: rgba(51, 168, 255, 0.22);
    border-left: 4px solid var(--color-primary);
}

.standings-abbreviations{
    flex-basis: 100%;
    margin: 0;
    padding-top: var(--space-12);
    color: var(--color-text-light);
    font-size: var(--fs-13);
    line-height: 1.7;
    border-top: 1px solid rgba(0, 119, 204, 0.10);
}


/* ==========================================
   EMPTY STATE
========================================== */

.standings-empty-state{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    padding: var(--space-32);
    background: var(--color-surface);
    border: 1px solid rgba(0, 119, 204, 0.10);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.standings-empty-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    margin-bottom: var(--space-20);
    color: var(--color-primary);
    font-size: 38px;
    background: rgba(51, 168, 255, 0.12);
    border-radius: 50%;
}

.standings-empty-label{
    display: inline-block;
    margin-bottom: var(--space-8);
    color: var(--color-primary);
    font-size: var(--fs-13);
    font-weight: var(--fw-700);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.standings-empty-state h2,
.standings-empty-state h3{
    margin: 0 0 var(--space-12);
    color: var(--color-primary-dark);
    font-size: var(--fs-26);
    font-weight: var(--fw-700);
}

.standings-empty-state p{
    max-width: 620px;
    margin: 0;
    color: var(--color-text-light);
    font-size: var(--fs-16);
    line-height: 1.7;
}

.standings-empty-actions{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-12);
    margin-top: var(--space-24);
}

.standings-empty-actions .btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
}


/* ==========================================
   RESPONSIVE — TABLET
========================================== */

@media(max-width: 992px){

    .standings-page-heading{
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .standings-page-description{
        max-width: 680px;
        text-align: center;
    }

    .competition-title{
        font-size: var(--fs-24);
    }

    .competition-logo-wrapper{
        width: 95px;
        min-width: 95px;
        height: 95px;
    }

    .standings-table{
        min-width: 850px;
    }
}


/* ==========================================
   RESPONSIVE — MOBILE
========================================== */

@media(max-width: 768px){

    .standings.section{
        padding-top: var(--space-24);
        padding-bottom: var(--space-48);
    }

    .standings-page-heading{
        margin-bottom: var(--space-24);
    }

    .standings-page-heading .section-title{
        font-size: var(--fs-28);
    }

    .standings-filters{
        grid-template-columns: 1fr;
        padding: var(--space-20);
    }

    .competition-header{
        align-items: center;
        padding: var(--space-20);
        text-align: center;
    }

    .competition-logo-wrapper{
        width: 82px;
        min-width: 82px;
        height: 82px;
    }

    .competition-title{
        font-size: var(--fs-22);
    }

    .competition-meta{
        align-items: center;
        justify-content: center;
    }

    .standings-group-header{
        padding: var(--space-16);
    }

    .standings-group-title{
        font-size: var(--fs-20);
    }

    .standings-table{
        min-width: 800px;
    }

    .standings-table th,
    .standings-table td{
        padding: var(--space-12);
        font-size: var(--fs-13);
    }

    .standings-team-logo{
        width: 36px;
        min-width: 36px;
        height: 36px;
    }

    .standings-team-name{
        font-size: var(--fs-14);
    }

    .standings-points{
        font-size: var(--fs-16) !important;
    }

    .position-badge{
        width: 30px;
        height: 30px;
        font-size: var(--fs-13);
    }

    .standings-legend{
        align-items: flex-start;
        flex-direction: column;
    }

    .standings-abbreviations{
        width: 100%;
    }
}


/* ==========================================
   RESPONSIVE — SMALL MOBILE
========================================== */

@media(max-width: 480px){

    .standings-page-heading .section-title{
        font-size: var(--fs-24);
    }

    .standings-page-description{
        font-size: var(--fs-14);
    }

    .standings-filters{
        padding: var(--space-16);
    }

    .standings-select-wrapper select{
        min-height: 48px;
        font-size: var(--fs-14);
    }

    .competition-header{
        flex-direction: column;
    }

    .competition-logo-wrapper{
        width: 88px;
        min-width: 88px;
        height: 88px;
    }

    .competition-info{
        width: 100%;
    }

    .competition-title{
        font-size: var(--fs-20);
    }

    .competition-season{
        font-size: var(--fs-14);
    }

    .standings-group-header{
        align-items: flex-start;
        flex-direction: column;
    }

    .standings-table{
        min-width: 760px;
    }

    .standings-empty-state{
        min-height: 320px;
        padding: var(--space-24);
    }

    .standings-empty-state h2,
    .standings-empty-state h3{
        font-size: var(--fs-22);
    }

    .standings-empty-state p{
        font-size: var(--fs-14);
    }

    .standings-empty-actions{
        width: 100%;
        flex-direction: column;
    }

    .standings-empty-actions .btn{
        width: 100%;
    }
}