﻿/* GEDIAN SPORTS | CompetitionDetails mobile-first adjustments, 2026-11-09.
   Scope: Details and Matches tabs; no changes to public calculations. */

/* Minimize nested spacing and remove wasted horizontal gutters. */
.competition-page #competition-panel-details,
.competition-page #competition-panel-details > .competition-content-card,
.competition-page #competition-panel-details .competition-smart-stages,
.competition-page #competition-panel-details .competition-smart-stage,
.competition-page #competition-panel-details .competition-smart-stage-body,
.competition-page #competition-panel-details .competition-smart-group {
    min-width: 0;
    max-width: 100%;
}

    .competition-page #competition-panel-details > .competition-content-card {
        padding-inline: 4px;
    }

    .competition-page #competition-panel-details .competition-smart-stage-body {
        padding-inline: 3px;
    }

    .competition-page #competition-panel-details .competition-smart-group {
        padding-inline: 0;
    }

    .competition-page #competition-panel-details .competition-stage-table-scroll {
        margin-inline: 0;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        border-radius: 6px;
        direction: rtl;
    }
        /* Rank scrolls naturally with the table and vanishes on the right.
   Club slides right until reaching 0, then stays pinned. Other cells
   move behind the opaque club cells. Only Detail-tab league/group tables. */
        .competition-page #competition-panel-details .competition-stage-table-scroll > .competition-table.is-stage-smart {
            --gs-fixed-rank-width: 39px;
            --gs-fixed-club-width: 164px;
            direction: rtl;
            border-collapse: separate;
            border-spacing: 0;
        }

            .competition-page #competition-panel-details .competition-stage-table-scroll > .competition-table.is-stage-smart :is(th,td):first-child {
                position: static !important;
                z-index: auto;
                width: var(--gs-fixed-rank-width);
                min-width: var(--gs-fixed-rank-width);
                max-width: var(--gs-fixed-rank-width);
                box-shadow: none;
            }

            .competition-page #competition-panel-details .competition-stage-table-scroll > .competition-table.is-stage-smart :is(th,td):nth-child(2) {
                position: sticky !important;
                right: 0 !important;
                left: auto !important;
                z-index: 5;
                width: var(--gs-fixed-club-width);
                min-width: var(--gs-fixed-club-width);
                max-width: var(--gs-fixed-club-width);
                background: #fff !important;
                box-shadow: -3px 0 5px rgba(40,70,35,.10);
                background-clip: padding-box;
            }

            .competition-page #competition-panel-details .competition-stage-table-scroll > .competition-table.is-stage-smart thead th:nth-child(2) {
                z-index: 7;
                background: #f4f8f2 !important;
            }

            .competition-page #competition-panel-details .competition-stage-table-scroll > .competition-table.is-stage-smart tbody tr:hover td:nth-child(2) {
                background: #fbfdf9 !important;
            }
    /* Place collapse control at the far physical LEFT in RTL, including mobile. */
    .competition-page #competition-panel-details .competition-smart-summary {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 8px;
        min-width: 0;
    }

    .competition-page #competition-panel-details .competition-stage-public-title {
        min-width: 0;
        flex: 1 1 auto;
    }

    .competition-page #competition-panel-details .competition-smart-summary-meta {
        margin-right: auto;
        margin-left: 0;
        flex: 0 0 auto;
        align-self: center;
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .competition-page #competition-panel-details .competition-smart-arrow {
        font-size: 20px;
        font-weight: 900;
        line-height: 1;
        transform: none !important;
    }

    .competition-page #competition-panel-details .competition-smart-stage:not([open]) .competition-smart-arrow::before {
        content: '+';
    }

    .competition-page #competition-panel-details .competition-smart-stage:not([open]) .competition-smart-arrow {
        font-size: 0;
    }

        .competition-page #competition-panel-details .competition-smart-stage:not([open]) .competition-smart-arrow::before {
            font-size: 20px;
        }
/* Match filters: 2 selectors and Reset on ONE row at small widths. */
.competition-page #competition-panel-fixtures .fixture-filters:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto !important;
    gap: 5px;
    padding: 7px 5px;
    align-items: end;
}

.competition-page #competition-panel-fixtures .fixture-filter-control {
    min-width: 0;
    gap: 2px;
}

    .competition-page #competition-panel-fixtures .fixture-filter-control select {
        width: 100%;
        min-width: 0;
        min-height: 34px;
        height: 34px;
        padding: 4px 5px;
        font-size: .70rem;
    }

    .competition-page #competition-panel-fixtures .fixture-filter-control > span {
        font-size: .64rem;
    }

.competition-page #competition-panel-fixtures .fixture-reset-button {
    grid-column: auto !important;
    width: auto;
    min-width: 44px;
    min-height: 34px;
    padding: 5px 7px;
    font-size: .72rem;
    white-space: nowrap;
    align-self: end;
}

@media (max-width: 600px) {
    .competition-page #competition-panel-details > .competition-content-card {
        padding: 0 1px !important;
    }

    .competition-page #competition-panel-details .competition-smart-stages {
        gap: 6px;
    }

    .competition-page #competition-panel-details .competition-smart-stage {
        border-radius: 9px;
    }

    .competition-page #competition-panel-details .competition-smart-summary {
        padding: 10px 8px !important;
        min-height: 48px;
    }

    .competition-page #competition-panel-details .competition-smart-stage-body {
        padding: 2px 1px 10px !important;
    }

    .competition-page #competition-panel-details .competition-smart-group {
        padding: 6px 0 !important;
    }

    .competition-page #competition-panel-details .competition-smart-kind {
        display: none; /* Prioritize the title and the far-left +/- control. */
    }

    .competition-page #competition-panel-details .competition-stage-table-scroll > .competition-table.is-stage-smart {
        --gs-fixed-club-width: 142px;
        --gs-fixed-rank-width: 35px;
    }

        .competition-page #competition-panel-details .competition-stage-table-scroll > .competition-table.is-stage-smart :is(th,td):nth-child(2) {
            padding-inline: 5px;
        }

        .competition-page #competition-panel-details .competition-stage-table-scroll > .competition-table.is-stage-smart td.club-column .table-club-link strong {
            overflow-wrap: anywhere;
            white-space: normal;
        }
}
