.statistics-portal-shell.is-header-width-synchronized {
    position: relative;
    max-width: none;
    transition:
        width 120ms ease,
        transform 120ms ease;
}

.statistics-server-workspace {
    height: auto;
    min-height: 180px;
    max-height: calc(100vh - 245px);
}

.statistics-server-table-scroll {
    height: auto;
    max-height: calc(100vh - 245px);
}

#statistics-server-table {
    min-width: 100%;
}

#statistics-server-table th,
#statistics-server-table td {
    height: 27px;
    padding-right: 7px;
    padding-left: 7px;
    font-size: 0.61rem;
}

/*
 * Die ersten vier Spalten bilden den kompakten
 * Identifikationsblock des Panzers.
 */
#statistics-server-table th:nth-child(1),
#statistics-server-table td:nth-child(1) {
    position: sticky;
    z-index: 15;
    left: 0;
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    text-align: center;
}

#statistics-server-table th:nth-child(2),
#statistics-server-table td:nth-child(2) {
    position: sticky;
    z-index: 15;
    left: 54px;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    text-align: center;
}

#statistics-server-table th:nth-child(3),
#statistics-server-table td:nth-child(3) {
    position: sticky;
    z-index: 15;
    left: 96px;
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    text-align: center;
}

#statistics-server-table th:nth-child(4),
#statistics-server-table td:nth-child(4) {
    position: sticky;
    z-index: 15;
    left: 144px;
    width: 172px;
    min-width: 172px;
    max-width: 172px;
    text-align: left;
    box-shadow:
        1px 0 0 rgba(148, 163, 184, 0.14);
}

#statistics-server-table thead th:nth-child(-n + 4) {
    z-index: 30;
    background: #10263b;
}

#statistics-server-table tbody tr:nth-child(odd)
td:nth-child(-n + 4) {
    background: rgba(8, 20, 33, 0.995);
}

#statistics-server-table tbody tr:nth-child(even)
td:nth-child(-n + 4) {
    background: rgba(12, 27, 43, 0.995);
}

#statistics-server-table tbody tr:hover
td:nth-child(-n + 4) {
    background: #10283d;
}

#statistics-server-table
.statistics-sticky-tank {
    position: sticky;
    left: 144px;
    width: 172px;
    min-width: 172px;
    max-width: 172px;
}

.statistics-nation-badge {
    display: inline-flex;
    min-width: 38px;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.78rem;
    line-height: 1;
    white-space: nowrap;
}

.statistics-nation-badge small {
    color: #8195a7;
    font-size: 0.45rem;
    font-weight: 850;
}

.statistics-vehicle-type-badge {
    display: inline-grid;
    width: 24px;
    height: 22px;
    place-items: center;
    color: #dbe7ee;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
}

.statistics-tier-badge {
    display: inline-flex;
    min-width: 30px;
    justify-content: center;
    color: #efc66e;
    font-size: 0.64rem;
    font-weight: 950;
    line-height: 1;
}

.statistics-server-tank-open {
    font-size: 0.62rem;
}

.statistics-server-detail {
    /*
     * Beim Öffnen bleiben Nation, Typ, Stufe und
     * der Panzername vollständig sichtbar.
     */
    max-width: calc(100% - 316px);
}

@media (max-width: 1100px) {
    .statistics-portal-shell.is-header-width-synchronized {
        width: calc(100vw - 24px) !important;
        transform: none !important;
        margin-right: auto;
        margin-left: auto;
    }

    #statistics-server-table th:nth-child(1),
    #statistics-server-table td:nth-child(1) {
        min-width: 48px;
        width: 48px;
    }

    #statistics-server-table th:nth-child(2),
    #statistics-server-table td:nth-child(2) {
        left: 48px;
        min-width: 38px;
        width: 38px;
    }

    #statistics-server-table th:nth-child(3),
    #statistics-server-table td:nth-child(3) {
        left: 86px;
        min-width: 44px;
        width: 44px;
    }

    #statistics-server-table th:nth-child(4),
    #statistics-server-table td:nth-child(4),
    #statistics-server-table
    .statistics-sticky-tank {
        left: 130px;
        min-width: 150px;
        width: 150px;
        max-width: 150px;
    }
}

/* CIR_STATISTICS_DENSE_REFINEMENT_START */

.statistics-portal-shell.is-header-width-synchronized {
    max-width: none;
    transition:
        width 100ms ease,
        transform 100ms ease;
}

#statistics-server-table th,
#statistics-server-table td {
    height: 30px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.66rem;
}

#statistics-server-table th {
    font-size: 0.59rem;
}

.statistics-server-tank-open {
    font-size: 0.66rem;
}

.statistics-nation-badge {
    min-width: 30px;
    font-size: 0.82rem;
}

.statistics-nation-badge small {
    display: none;
}

.statistics-vehicle-type-badge {
    font-size: 0.88rem;
}

.statistics-tier-badge {
    font-size: 0.68rem;
}

/*
 * Die Identifikationsspalten bleiben kompakt.
 */
#statistics-server-table th:nth-child(1),
#statistics-server-table td:nth-child(1) {
    width: 46px;
    min-width: 46px;
    max-width: 46px;
}

#statistics-server-table th:nth-child(2),
#statistics-server-table td:nth-child(2) {
    left: 46px;
    width: 38px;
    min-width: 38px;
    max-width: 38px;
}

#statistics-server-table th:nth-child(3),
#statistics-server-table td:nth-child(3) {
    left: 84px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
}

#statistics-server-table th:nth-child(4),
#statistics-server-table td:nth-child(4),
#statistics-server-table .statistics-sticky-tank {
    left: 128px;
    width: 178px;
    min-width: 178px;
    max-width: 178px;
}

.statistics-server-detail {
    /*
     * Nation, Typ, Stufe und Panzername bleiben
     * beim geöffneten Detailpanel sichtbar.
     */
    max-width: calc(100% - 306px);
}

/* CIR_STATISTICS_DENSE_REFINEMENT_END */

/* CIR_STATISTICS_HEADER_ALIGNMENT_START */

@media (min-width: 1101px) {
    .statistics-portal-shell.is-header-width-synchronized {
        position: relative;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
        transform: none;
    }
}

@media (max-width: 1100px) {
    .statistics-portal-shell,
    .statistics-portal-shell.is-header-width-synchronized {
        position: relative;
        left: auto !important;
        width: calc(100vw - 24px) !important;
        max-width: none;
        margin-right: auto !important;
        margin-left: auto !important;
        transform: none !important;
    }
}

/* CIR_STATISTICS_HEADER_ALIGNMENT_END */

/* CIR_TANK_PERFORMANCE_REFINEMENT_START */

.statistics-server-toolbar {
    grid-template-columns:
        minmax(190px, 1.25fr)
        minmax(130px, 0.75fr)
        minmax(115px, 0.65fr)
        minmax(115px, 0.65fr)
        minmax(145px, 0.75fr);
}

.statistics-period-buttons {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.statistics-period-buttons button {
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 6px;
    color: #91a6b8;
    background: rgba(148, 163, 184, 0.035);
    font: inherit;
    font-size: 0.62rem;
    font-weight: 850;
    cursor: pointer;
}

.statistics-period-buttons button:hover {
    border-color: rgba(101, 216, 239, 0.28);
    color: #d8e9f1;
}

.statistics-period-buttons button.is-active {
    border-color: rgba(239, 185, 87, 0.34);
    color: #efc771;
    background: rgba(239, 185, 87, 0.09);
}

#statistics-server-table th,
#statistics-server-table td {
    height: 31px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.69rem;
}

#statistics-server-table th {
    font-size: 0.61rem;
}

.statistics-server-tank-open {
    font-size: 0.69rem;
}

#statistics-server-table tbody tr {
    cursor: pointer;
}

#statistics-server-table tbody tr:focus-visible td {
    outline: 1px solid rgba(101, 216, 239, 0.55);
    outline-offset: -1px;
}

/*
 * Nation nur so breit wie die Flagge.
 */
#statistics-server-table th:nth-child(1),
#statistics-server-table td:nth-child(1) {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    padding-right: 5px;
    padding-left: 5px;
}

#statistics-server-table th:nth-child(2),
#statistics-server-table td:nth-child(2) {
    left: 34px;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
}

#statistics-server-table th:nth-child(3),
#statistics-server-table td:nth-child(3) {
    left: 68px;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}

#statistics-server-table th:nth-child(4),
#statistics-server-table td:nth-child(4),
#statistics-server-table .statistics-sticky-tank {
    left: 108px;
    width: 178px;
    min-width: 178px;
    max-width: 178px;
}

.statistics-nation-flag {
    display: block;
    width: 24px;
    height: 14px;
    margin: 0 auto;
    border-radius: 1px;
    object-fit: cover;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.13);
}

.statistics-nation-fallback {
    display: inline-grid;
    width: 24px;
    height: 14px;
    place-items: center;
    color: #8297aa;
    font-size: 0.55rem;
}

/*
 * Das Detailpanel erhält mehr Raum.
 * Der kleine Minimierrand entfällt vollständig.
 */
.statistics-server-detail-rail {
    display: none;
}

.statistics-server-table-scroll {
    padding-right: 0;
}

.statistics-server-detail {
    right: 0;
    width: clamp(620px, 47vw, 840px);
    max-width: calc(100% - 286px);
}

.statistics-detail-actions button {
    width: 31px;
    height: 31px;
    font-size: 1rem;
}

@media (max-width: 1100px) {
    .statistics-server-toolbar {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .statistics-period-buttons {
        grid-column: 1 / -1;
    }

    .statistics-server-detail {
        width: 100%;
        max-width: 100%;
    }
}

/* CIR_TANK_PERFORMANCE_REFINEMENT_END */
