/* ══════════════════════════════════════════════════════════════════
   Špacír 2 – Statistiky shortcode  v1.1
   ══════════════════════════════════════════════════════════════════ */

.spacir-stats-card {
    --ss-blue:   #1d4ed8;
    --ss-pink:   #be185d;
    --ss-green:  #15803d;
    --ss-orange: #ea580c;
    --ss-violet: #7c3aed;
    --ss-radius: 14px;
    --ss-shadow: 0 2px 18px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.05);

    max-width: 900px;
    margin: 0 auto 3rem;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: #1e293b;
}

/* ── Hlavička ročníku ────────────────────────────────────────────── */
.spacir-year-hdr {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e2e8f0;
}
.spacir-year-hdr__num {
    font-size: 2rem;
    font-weight: 900;
    color: #c2410c;
    letter-spacing: -.03em;
}
.spacir-year-hdr__lbl {
    font-size: .9rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ── Dlaždice ────────────────────────────────────────────────────── */
.spacir-tiles {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.spacir-tile {
    border-radius: var(--ss-radius);
    padding: 18px 10px 16px;
    text-align: center;
    color: #fff;
    box-shadow: var(--ss-shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 116px;
}
.spacir-tile::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    pointer-events: none;
}

.spacir-tile--total   { background: linear-gradient(135deg, #334155 0%, #475569 100%); }
.spacir-tile--men     { background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%); }
.spacir-tile--women   { background: linear-gradient(135deg, #be185d 0%, #ec4899 100%); }
.spacir-tile--lezunu  { background: linear-gradient(135deg, #15803d 0%, #22c55e 100%); }
.spacir-tile--plazuni { background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%); }
.spacir-tile--zombie  { background: linear-gradient(135deg, #6d28d9 0%, #a855f7 100%); }

.spacir-tile__ico,
.spacir-tile__num,
.spacir-tile__lbl,
.spacir-tile__sub {
    color: #fff;
    position: relative;
    z-index: 1;
}

.spacir-tile__ico {
    font-size: 20px;
    margin-bottom: 6px;
    opacity: .8;
    line-height: 1;
}
.spacir-tile__num {
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.03em;
}
.spacir-tile__lbl {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    opacity: .85;
    margin-top: 6px;
    line-height: 1.3;
}
.spacir-tile__sub {
    margin-top: 5px;
    font-size: .8rem;
    font-weight: 800;
    background: rgba(0,0,0,.18);
    padding: 2px 9px;
    border-radius: 99px;
    letter-spacing: .01em;
}

/* ── Genderový grid ──────────────────────────────────────────────── */
.spacir-gender-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.spacir-gcol {
    background: #fff;
    border-radius: var(--ss-radius);
    box-shadow: var(--ss-shadow);
    padding: 18px 16px 16px;
    border-top: 4px solid;
}
.spacir-gcol--men   { border-color: var(--ss-blue); }
.spacir-gcol--women { border-color: var(--ss-pink); }

.spacir-gcol__head {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.spacir-gcol--men   .spacir-gcol__head { color: var(--ss-blue); }
.spacir-gcol--women .spacir-gcol__head { color: var(--ss-pink); }

.spacir-gcol__head span {
    font-size: .82rem;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 2px;
}

/* ── Řádky statistik ─────────────────────────────────────────────── */
.spacir-srow {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto 6px;
    column-gap: 8px;
    row-gap: 5px;
    margin-bottom: 12px;
}

.spacir-srow__lbl {
    grid-column: 1;
    font-size: .82rem;
    color: #64748b;
    font-weight: 500;
    align-self: center;
}
.spacir-srow__val {
    grid-column: 2;
    font-size: 1.15rem;
    font-weight: 900;
    color: #1e293b;
    text-align: right;
    align-self: center;
    min-width: 28px;
}
.spacir-srow__pct {
    grid-column: 3;
    font-size: .8rem;
    font-weight: 600;
    color: #94a3b8;
    min-width: 50px;
    text-align: right;
    align-self: center;
}

.spacir-srow__bar {
    grid-column: 1 / -1;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    height: 6px;
}
.spacir-srow__fill {
    height: 100%;
    border-radius: 99px;
    width: var(--w, 0%);
    transition: width .85s cubic-bezier(.22,1,.36,1);
}
.spacir-srow--lezun  .spacir-srow__fill { background: var(--ss-green); }
.spacir-srow--plazun .spacir-srow__fill { background: var(--ss-orange); }
.spacir-srow--zombie .spacir-srow__fill { background: var(--ss-violet); }

/* Nulový zombie řádek – trochu potlačený */
.spacir-srow--zombie.spacir-srow--zero .spacir-srow__lbl,
.spacir-srow--zombie.spacir-srow--zero .spacir-srow__val,
.spacir-srow--zombie.spacir-srow--zero .spacir-srow__pct { opacity: .45; }

/* ── TOP 3 ──────────────────────────────────────────────────────── */
.spacir-top3 {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}
.spacir-top3__head {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #94a3b8;
    margin-bottom: 10px;
}
.spacir-top3__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f8fafc;
}
.spacir-top3__row:last-child { border-bottom: none; }
.spacir-top3__medal { font-size: 17px; flex-shrink: 0; }
.spacir-top3__name  {
    flex: 1;
    font-size: .875rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spacir-top3__time  {
    font-size: .875rem;
    font-weight: 700;
    color: #475569;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    flex-shrink: 0;
}

/* ── Responzivita ─────────────────────────────────────────────────── */
@media (max-width: 780px) {
    .spacir-tiles { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 540px) {
    .spacir-gender-grid { grid-template-columns: 1fr; }
    .spacir-tiles       { grid-template-columns: repeat(2, 1fr); }
    .spacir-tile--total { grid-column: 1 / -1; }
    .spacir-tile__num   { font-size: 1.7rem; }
    .spacir-tile        { padding: 14px 8px 12px; min-height: 100px; }
}

/* ══════════════════════════════════════════════════════════════════
   Archív ročníků  [spacir_archiv]
   ══════════════════════════════════════════════════════════════════ */

.spacir-archiv-wrap {
    max-width: 1040px;
    margin: 0 auto 3rem;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.spacir-archiv-scroll {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
}

.spacir-archiv-tbl {
    border-collapse: collapse;
    width: 100%;
    min-width: 780px;
    font-size: .875rem;
}

.spacir-archiv-tbl thead tr {
    background: #1e293b;
    color: #f8fafc;
}
.spacir-archiv-tbl th {
    padding: 12px 10px;
    text-align: left;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.4;
    white-space: nowrap;
    border-right: 1px solid #334155;
}
.spacir-archiv-tbl th:last-child { border-right: none; }
.sa-th-rok { min-width: 80px; }

.spacir-archiv-tbl tbody tr { border-bottom: 1px solid #e2e8f0; }
.spacir-archiv-tbl tbody tr:nth-child(even) { background: #f8fafc; }
.spacir-archiv-tbl tbody tr:hover { background: #eff6ff; transition: background .15s; }

.spacir-archiv-tbl td {
    padding: 10px 10px;
    vertical-align: top;
    color: #1e293b;
    border-right: 1px solid #e2e8f0;
    line-height: 1.45;
}
.spacir-archiv-tbl td:last-child { border-right: none; }

.sa-rok strong {
    font-size: 1.15rem;
    font-weight: 900;
    color: #c2410c;
    letter-spacing: -.02em;
    display: block;
}
.sa-smer {
    font-size: .72rem;
    color: #64748b;
    font-weight: 500;
}
.sa-sub {
    font-size: .7rem;
    opacity: .7;
    font-weight: 400;
}

.sa-celkem {
    font-weight: 700;
    color: #15803d;
}

.sa-row--cancelled td { opacity: .45; }

.sa-best { min-width: 160px; }
.sa-best-m {
    font-size: .82rem;
    color: #1d4ed8;
    font-weight: 500;
    margin-bottom: 4px;
}
.sa-best-z {
    font-size: .82rem;
    color: #be185d;
    font-weight: 500;
}

@media (max-width: 600px) {
    .spacir-archiv-tbl { font-size: .78rem; }
    .spacir-archiv-tbl th,
    .spacir-archiv-tbl td { padding: 8px 6px; }
}
