/* layout komt uit player-scores.css (ps-layout, ps-main), het filterpaneel uit filters.css */

.rs-title {
    margin: 0 0 12px !important;
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.rs-description {
    max-width: 900px;
    margin-bottom: 28px;
}

.rs-table {
    overflow-x: auto;
}

.rs-table .mud-table-cell {
    white-space: nowrap;
}

.filter-panel {
    --panel-h: 458px;

    width: 280px;
    flex-shrink: 0;
    padding: 16px;

    position: sticky;
    top: max(24px, calc((100vh - var(--panel-h)) / 2));
    align-self: flex-start;

    max-height: calc(100vh - 48px);
    overflow-y: auto;
    scrollbar-width: none;
}

@media (max-width: 768px) {
    .ps-layout--filters-open > .ps-main {
        display: none;
    }

    .ps-layout {
        display: block;
        min-height: 0;
        margin: 24px 16px 0;
        overflow-x: clip;
    }

    .filter-panel {
        position: static;
        width: 100%;
        max-height: min(60vh, 560px);
        margin-bottom: 20px;
        box-sizing: border-box;
    }

    .ps-main {
        width: 100%;
        min-width: 0;
    }

    .ps-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .rs-title {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.05;
    }

    .rs-description {
        margin-bottom: 20px;
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .rs-table {
        max-width: 100%;
        min-width: 0;
    }

    .rs-table .mud-table-container {
        max-width: 100%;
        min-width: 0;
        overflow-x: clip;
    }

    .rs-table .mud-table-root {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .rs-table .mud-table-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .rs-table .mud-table-cell {
        padding: 8px 10px;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .rs-table .mud-table-body .mud-table-row > .mud-table-cell {
        border-bottom: 1px solid #EDF2F6;
    }

    .rs-table .mud-table-body .mud-table-row > .mud-table-cell:last-child {
        border-bottom: 3px solid #B8C9D8;
    }

    .rs-table .mud-table-body .mud-table-row > .comparison-action-cell {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .ps-layout {
        margin: 16px 12px 0;
    }

    .filter-panel {
        padding: 12px;
    }

    .rs-title {
        font-size: 2rem;
    }

    .rs-table .mud-table-toolbar {
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .rs-ratio-filter {
        display: none;
    }

    .rs-table .mud-table-smalldevices-sortselect .mud-input {
        height: auto;
        min-height: 48px;
    }

    .rs-table .mud-table-smalldevices-sortselect .mud-select-input .mud-input-slot {
        display: block;
        overflow: visible;
        white-space: normal;
        text-overflow: clip;
    }

    .rs-table .mud-table-smalldevices-sortselect .mud-select-input .mud-input-slot .mud-typography {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .rs-filter-panel-wrapper {
        width: 100%;
        min-width: 0;
    }

    .rs-filter-panel-wrapper .filter-panel {
        position: static;
        width: 100%;
        height: auto;
        min-height: calc(100dvh - 120px);
        max-height: none;
        margin-bottom: 20px;
        box-sizing: border-box;
        overflow-y: visible;
    }
}