/* === FILTRY === */
#sz-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: space-between;
}

#sz-filters input,
#sz-filters select {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #ccc;
    flex: 1;
    min-width: 180px;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

#sz-filters input:focus,
#sz-filters select:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 8px rgba(26, 115, 232, 0.3);
    outline: none;
}

/* === LISTA SZKÓŁ === */
#sz-results .sz-school {
    background: linear-gradient(135deg, #ffffff, #f0f8ff);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#sz-results .sz-school:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.sz-details {
    display: none;
    padding-top: 12px;
    font-size: 0.9em;
    color: #444;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
}

.sz-details a {
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sz-details a:hover {
    color: #155ab6;
}

.sz-school i {
    margin-right: 8px;
    color: #666;
    vertical-align: middle;
}

.sz-label {
    font-weight: 600;
    color: #333;
}

/* === KOLORY OKRĘGÓW === */
.sz-okreg-limanowski {
    border-left: 5px solid #1abc9c;
}

.sz-okreg-starosadecki {
    border-left: 5px solid #3498db;
}

.sz-okreg-krynicki {
    border-left: 5px solid #9b59b6;
}

.sz-okreg-nowosadecki {
    border-left: 5px solid #e67e22;
}

.sz-okreg-ciezkowicki {
    border-left: 5px solid #e74c3c;
}

.sz-okreg-brzeski {
    border-left: 5px solid #f1c40f;
}

.sz-okreg-bochenski {
    border-left: 5px solid #2ecc71;
}

.sz-okreg-tarnowski {
    border-left: 5px solid #34495e;
}

.sz-okreg-debicki {
    border-left: 5px solid #16a085;
}

.sz-okreg-mielecki {
    border-left: 5px solid #8e44ad;
}

.sz-okreg-dabrowski {
    border-left: 5px solid #d35400;
}

/* === LICZBA UCZESTNIKÓW === */
.sz-participants {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 1.8em;
    font-weight: 700;
    text-align: right;
}

.sz-participants small {
    display: block;
    font-size: 0.55em;
    font-weight: normal;
}

/* Kolory liczby uczestników wg okręgu */
.sz-okreg-limanowski .sz-participants {
    color: #1abc9c;
}

.sz-okreg-starosadecki .sz-participants {
    color: #3498db;
}

.sz-okreg-krynicki .sz-participants {
    color: #9b59b6;
}

.sz-okreg-nowosadecki .sz-participants {
    color: #e67e22;
}

.sz-okreg-ciezkowicki .sz-participants {
    color: #e74c3c;
}

.sz-okreg-brzeski .sz-participants {
    color: #f1c40f;
}

.sz-okreg-bochenski .sz-participants {
    color: #2ecc71;
}

.sz-okreg-tarnowski .sz-participants {
    color: #34495e;
}

.sz-okreg-debicki .sz-participants {
    color: #16a085;
}

.sz-okreg-mielecki .sz-participants {
    color: #8e44ad;
}

.sz-okreg-dabrowski .sz-participants {
    color: #d35400;
}

/* === PRZYCISK SZCZEGÓŁÓW === */
.sz-toggle-details {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #1a73e8;
    color: #fff;
    font-size: 0.85em;
    text-decoration: none;
    transition: background 0.3s ease;
}

.sz-toggle-details:hover {
    background: #155ab6;
}

/* === PAGINACJA === */
.sz-pagination {
    text-align: center;
    margin-top: 20px;
}

.sz-pagination .sz-page-link,
.sz-pagination .sz-ellipsis {
    display: inline-block;
    margin: 0 4px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sz-pagination .sz-page-link:hover,
.sz-pagination .sz-page-link.active {
    background: #1a73e8;
    color: #fff;
}

.sz-pagination .sz-ellipsis {
    background: transparent;
    color: #999;
    cursor: default;
}

/* === STATYSTYKI === */
.sz-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.sz-stat-card {
    background: #fff;
    background: linear-gradient(135deg, #ffffff, #f0f8ff);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 5px solid #1a73e8;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sz-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.sz-stat-card h3 {
    font-size: 1em;
    margin-bottom: 10px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sz-stat-card p {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0;
    color: #1a73e8;
    word-wrap: break-word;
}

.sz-stat-card small {
    margin-top: 8px;
    font-size: 0.8em;
    color: #777;
}

/* === WYKRESY I TABELA === */
.sz-stat-card.chart-card {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 1 / -1;
}

.sz-stat-card.chart-card canvas {
    width: 100% !important;
    max-width: 320px !important;
    height: 240px !important;
    margin: 0 auto;
}

.sz-stat-card.table-card {
    grid-column: 1 / -1;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.sz-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.sz-ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 320px;
    font-size: 0.95em;
}

.sz-ranking-table th {
    background: #f0f8ff;
    font-weight: 600;
    text-align: left;
    padding: 8px;
}

.sz-ranking-table td {
    border-top: 1px solid #eee;
    padding: 8px;
    color: #444;
}

.sz-ranking-table tr:hover td {
    background: #f9fbff;
}

/* === UKŁAD DWUKOLUMNOWY === */
.sz-stats.sz-desktop-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.sz-left-col,
.sz-right-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.sz-right-col .sz-stat-card.text-card {
    flex: 1;
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 1024px) {
    #sz-filters {
        flex-direction: column;
    }

    .sz-stats.sz-desktop-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    #sz-results .sz-school {
        padding: 15px 12px;
        position: relative;
        padding-bottom: 50px;
    }

    .sz-toggle-details {
        padding: 5px 10px;
        font-size: 0.8em;
    }

    .sz-participants {
        font-size: 1.4em;
        bottom: 8px;
        right: 10px;
    }

    .sz-pagination .prev,
    .sz-pagination .next {
        display: none;
    }

    .sz-pagination {
        display: flex;
        overflow-x: auto;
        gap: 2px;
        justify-content: center;
        padding: 4px 0;
    }

    .sz-pagination::-webkit-scrollbar {
        display: none;
    }
}