/* =========================================================
   Statistiky hráčů / scoped override pro nový web
   Cíl: nepouštět globální styly šablony do statistik
   Autor: Deight.eu
   ========================================================= */

/* základ wrapperu */
.stat-tab {
    --stat-gap: 18px;
    --stat-radius: 12px;
    --stat-dark-1: #4a4a64;
    --stat-dark-2: #2a2a3d;
    --stat-border: #2a2a3d;
    --stat-text-dark: #2a2a3d;
    --stat-text-light: #ffffff;
    --stat-shadow: 0 10px 20px rgb(0 0 0 / 20%), 0 6px 6px rgb(0 0 0 / 25%);
    --stat-shadow-hover: 0 5px 10px rgba(0, 0, 0, .15), 0 6px 6px rgba(0, 0, 0, .17);
    width: 100%;
    margin: 2rem auto 6rem;
}

/* zrušení vlivu obecných WP/Neve flex marginů */
.stat-tab .wp-block-columns,
.stat-tab .is-layout-flex {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--stat-gap);
    margin: 0 0 12px 0 !important;
    align-items: stretch;
}

/* jednotlivé sloupce */
.stat-tab .wp-block-column {
    flex: 1 1 0;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

/* první sloupec je širší pro jméno */
.stat-tab .wp-block-column.first {
    flex: 0 0 28%;
    min-width: 28%;
}

/* reset button stylů šablony a sjednocení vzhledu */
.stat-tab .button,
.stat-tab a.button,
.stat-tab .button.stat,
.stat-tab .button.jmeno {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    border-radius: var(--stat-radius);
    text-decoration: none !important;
    text-align: center;
    line-height: 1.25;
    box-shadow: var(--stat-shadow);
    transform: none !important;
    transition: box-shadow .2s ease, transform .2s ease, color .2s ease, background .2s ease;
    border: 0;
    outline: 0;
    white-space: normal;
}

/* tmavé boxy s hodnotami a jmény */
.stat-tab .button.stat,
.stat-tab .button.jmeno,
.stat-tab a.button.jmeno {
    background: linear-gradient(to right, var(--stat-dark-1) 0, var(--stat-dark-2) 100%) !important;
    color: var(--stat-text-light) !important;
    font-weight: 700;
}

/* hover pouze pro odkazy/jméno */
.stat-tab a.button:hover,
.stat-tab .button:hover {
    box-shadow: var(--stat-shadow-hover);
    transform: translateY(2px);
}

/* u statistických boxů nechceme “poskakování” */
.stat-tab .button.stat:hover {
    box-shadow: var(--stat-shadow);
    transform: none !important;
}

/* jméno hráče */
.stat-tab .button.jmeno,
.stat-tab a.button.jmeno {
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* vnitřní span s číslem */
.stat-tab .button.stat span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
}

/* sticky hlavička tabulky */
.stat-tab .topovka,
.stat-tab .is-layout-flex.topovka {
    position: sticky;
    top: 2.5%;
    z-index: 50;
    padding: 32px 0 16px;
    margin: 0 0 18px 0 !important;
}

/* světlé header boxy */
.stat-tab .topovka .button {
    background: #ffffff !important;
    color: var(--stat-text-dark) !important;
    border: 3px solid var(--stat-border) !important;
    box-shadow: var(--stat-shadow);
    font-weight: 700;
    text-transform: none;
}

/* ať se v top řádku nezobrazují prázdné spany */
.stat-tab .topovka .button span:empty {
    display: none;
}

/* ikony v top řádku */
.stat-tab .topovka .button i {
    margin-right: 6px;
}

/* ikony ve výpisu desktop skryté, jako v původním vzhledu */
.stat-tab .wp-block-column span i,
.stat-tab .wp-block-column a i,
.stat-tab .phone-legend {
    display: none;
}

/* barva odkazu se jménem */
.stat-tab .wp-block-column.first a {
    color: #f0f0f0 !important;
}

.stat-tab .wp-block-column.first a:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* trochu větší mezera mezi řádky */
.stat-tab>.wp-block-columns:not(.topovka) {
    margin-bottom: 12px !important;
}

/* při prázdném řádku držet výšku */
.stat-tab .button:empty::before {
    content: "";
    display: inline-block;
    min-height: 1em;
}

/* mobilní legenda */
.stat-tab .phone-legend {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 16px 0;
    font-weight: 700;
    color: var(--stat-text-dark);
}

.stat-tab .phone-legend div {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 2px solid rgba(42, 42, 61, .15);
    border-radius: 999px;
    padding: 8px 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .06);
}

/* ===== Tablet / mobile ===== */
@media (max-width: 1080px) {

    .stat-tab .topovka,
    .stat-tab .is-layout-flex.topovka {
        display: none;
    }

    .stat-tab .phone-legend {
        display: flex;
    }

    .stat-tab .wp-block-columns,
    .stat-tab .is-layout-flex {
        flex-direction: column;
        gap: 8px;
        margin: 0 0 22px 0 !important;
    }

    .stat-tab .wp-block-column,
    .stat-tab .wp-block-column.first {
        width: 100%;
        min-width: 100%;
        flex: 1 1 100%;
    }

    .stat-tab .button,
    .stat-tab a.button,
    .stat-tab .button.stat,
    .stat-tab .button.jmeno {
        min-height: 46px;
        padding: 12px 14px;
    }

    .stat-tab .wp-block-column span,
    .stat-tab .wp-block-column a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
    }

    .stat-tab .wp-block-column span i,
    .stat-tab .wp-block-column a i {
        display: inline-block;
        margin: 0;
    }
}

/* menší mobily */
@media (max-width: 640px) {
    .stat-tab {
        --stat-gap: 10px;
    }

    .stat-tab .button,
    .stat-tab a.button,
    .stat-tab .button.stat,
    .stat-tab .button.jmeno {
        font-size: 14px;
        border-radius: 10px;
    }

    .stat-tab .phone-legend {
        font-size: 13px;
    }
}