/* =========================================================
   GLOBAL
========================================================= */

html, body {
    height: 100%;
    margin: 0;
}

    body.layout {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

main.content {
    flex: 1;
    padding-bottom: 40px;
}

footer.footer {
    background-color: #f8f9fa;
    padding: 12px 0;
    font-size: 14px;
}


h4, h5 {
    margin-top: 20px;
    margin-bottom: 10px;
}
main {
    padding-bottom: 40px;
}
.footer {
    position: static !important;
    width: 100%;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 12px 0;
    font-size: 14px;
}
/* =========================================================
   KAFLE (MISJE / WSKAŹNIKI)
========================================================= */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.tile {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid #ddd;
    margin: 5px;
}

    .tile:hover {
        background: #e9e9e9;
        transform: translateY(-3px);
    }

a.tile {
    text-decoration: none;
    color: inherit;
}

/* =========================================================
   PRZYCISK "WRÓĆ"
========================================================= */

.back-btn {
    margin-bottom: 20px;
    cursor: pointer;
    color: #0d6efd;
}

/* =========================================================
   OCENA – PYTANIA
========================================================= */

.pytanie {
    margin-bottom: 14px;
}

/* Cała skala / kategoria */
.skala {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

/* Nagłówek skali */
.skala-title {
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

    .pytanie .tresc {
        font-weight: 500;
    }

/* =========================================================
   RADIO JAK PRZYCISKI (0 / 1 / 2)
========================================================= */

/* chowamy prawdziwe radio */
.punkt input[type="radio"] {
    display: none;
}

/* wygląd przycisku */
.punkt span {
    display: inline-block;
    min-width: 36px;
    padding: 6px 12px;
    margin-right: 6px;
    text-align: center;
    font-weight: 500;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

    /* hover */
    .punkt span:hover {
        background-color: #f1f3f5;
    }

/* ZAZNACZONE */
.punkt input[type="radio"]:checked + span {
    background-color: #ffbf00;
    color: #fff;
    border-color: #ffbf00;
}

/* focus (klawiatura) */
.punkt input[type="radio"]:focus + span {
    outline: 2px solid rgba(13,110,253,.25);
}

/* =========================================================
   PRZYCISK "NASTĘPNE DZIECKO"
========================================================= */

.btn-next {
    margin-top: 20px;
    padding: 10px 24px;
    font-size: 16px;
    border-radius: 6px;
    border: none;
    background-color: #ffbf00;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-next:hover:not(:disabled) {
        background-color: #0b5ed7;
    }

    .btn-next:disabled {
        background-color: #adb5bd;
        color: #6c757d;
        cursor: not-allowed;
        opacity: 0.7;
    }

/* =========================================================
   TABELA – OCENIONE GRUPY (OcenGrupe)
========================================================= */

.ocen-grupy table {
    width: 100%;
    border-collapse: collapse;
}

.ocen-grupy th,
.ocen-grupy td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.ocen-grupy th {
    background-color: #f1f3f5;
    font-weight: 600;
}


    table th,
    table td {
        padding: 10px;
        border-bottom: 1px solid #dee2e6;
    }

    table th {
        background-color: #f1f3f5;
        font-weight: 600;
    }

/* =========================================================
   PRZYCISKI AKCJI (EXCEL)
========================================================= */

.btn-success,
.btn-secondary {
    margin-right: 6px;
}

/* =========================================================
   UKRYWANIE ELEMENTÓW
========================================================= */

.hidden {
    display: none;
}

/* ===============================
   ADMIN PANEL – GRID FILTRÓW
   =============================== */

.admin-filters-grid {
    max-width: 900px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* kolumny */
.filter-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* pełna szerokość */
.filter-full {
    grid-column: 1 / -1;
}

/* wspólne */
.filter-group {
    display: flex;
    flex-direction: column;
}

    .filter-group label {
        font-size: 13px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 6px;
    }

    .filter-group select {
        width: 100%;
        height: 42px;
        padding: 8px 36px 8px 12px;
        font-size: 14px;
        font-weight: 500;
        color: #111827;
        background-color: #ffffff;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'><path fill='%236b7280' d='M5.25 7.5l4.75 5 4.75-5z'/></svg>");
        background-repeat: no-repeat;
        background-position: right 12px center;
    }

        .filter-group select:hover {
            border-color: #9ca3af;
        }

        .filter-group select:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
        }

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
    .admin-filters-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   PROFIL
   =============================== */
.profile-box {
    max-width: 600px;
}

.profile-section {
    margin-bottom: 16px;
}

.profile-row {
    margin-bottom: 6px;
}

.form-group {
    margin-bottom: 12px;
}
/* ===== HOME ===== */

.home-container {
    min-height: calc(100vh - var(--layout-offset));
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}


.home-card {
    background: #ffffff;
    padding: 48px;
    max-width: 800px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.home-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: #212529;
}

.home-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 32px;
}

.home-btn {
    padding: 12px 36px;
    border-radius: 30px;
}
.layout-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}
/* ===== LOGO W NAVBAR ===== */

.logo-wrapper {
    display: flex;
    align-items: center;
    max-width: 420px;
}

.logo-img {
    width: 100%;
    max-height: 56px;
    object-fit: contain;
}

/* TABLET */
@media (max-width: 992px) {
    .logo-wrapper {
        max-width: 320px;
    }

    .logo-img {
        max-height: 48px;
    }
}

/* TELEFON */
@media (max-width: 576px) {
    .logo-wrapper {
        max-width: 220px;
    }

    .logo-img {
        max-height: 40px;
    }
}
/* =========================================================
   WYBÓR LICZBY DZIECI I SPOSOBU OCENY
========================================================= */

.question {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.numbers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.number-btn {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.number-btn:hover {
    background-color: #f1f3f5;
}

.number-btn.selected {
    background-color: #ffbf00;
    color: #ffffff;
    border-color: #ffbf00;
}

.choices{
     display: grid;
}

/* przycisk Dalej */
.actions {
    margin-top: 20px;
}

.actions .btn-primary {
    padding: 10px 28px;
    font-size: 16px;
    border-radius: 6px;
}

/* =========================================================
   WCAG – TRYB DOSTĘPNOŚCI
   AKTYWOWANY KLASAMI:
   body.wcag-contrast
   body.wcag-font
========================================================= */

/* =========================================================
   1. FOCUS – KLAWIATURA (OBOWIĄZKOWE WCAG)
========================================================= */

:focus-visible {
    outline: 4px solid #ffbf00 !important;
    outline-offset: 3px;
}

/* =========================================================
   2. WIĘKSZA CZCIONKA
========================================================= */

/* punkt odniesienia */
html {
    font-size: 100%;
}

/* globalne powiększenie */
body.wcag-font {
    font-size: 120%;
    line-height: 1.8;
}

    /* formularze */
    body.wcag-font input,
    body.wcag-font select,
    body.wcag-font textarea,
    body.wcag-font button {
        font-size: 1em;
    }

    /* HOME */
    body.wcag-font .home-title {
        font-size: 2.6rem;
    }

    body.wcag-font .home-description {
        font-size: 1.2rem;
    }

    /* HEADER */
    body.wcag-font .navbar,
    body.wcag-font .navbar * {
        font-size: 1em;
    }


    /* FOOTER */
    body.wcag-font footer,
    body.wcag-font footer a {
        font-size: 1rem;
    }

/* =========================================================
   3. ELEMENTY KLIKALNE (WCAG 2.4.x)
========================================================= */

/* linki */
a {
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

    a:hover,
    a:focus-visible {
        background-color: rgba(13,110,253,0.15);
        border-radius: 4px;
    }

/* przyciski i elementy interaktywne */
button,
.btn,
.tile,
.number-btn {
    position: relative;
}

    button:hover,
    .btn:hover,
    .tile:hover,
    .number-btn:hover {
        outline: 4px solid #ffbf00;
        outline-offset: 2px;
    }

/* =========================================================
   4. WYSOKI KONTRAST
========================================================= */

body.wcag-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

    /* tekst */
    body.wcag-contrast p,
    body.wcag-contrast span,
    body.wcag-contrast label,
    body.wcag-contrast h1,
    body.wcag-contrast h2,
    body.wcag-contrast h3,
    body.wcag-contrast h4,
    body.wcag-contrast h5 {
        color: #fff !important;
    }

    /* HEADER + FOOTER */
    body.wcag-contrast header,
    body.wcag-contrast footer,
    body.wcag-contrast .navbar {
        background-color: #000 !important;
        border-color: #fff !important;
    }

        body.wcag-contrast .navbar a,
        body.wcag-contrast footer a {
            color: #00ffff !important;
            text-decoration: underline;
        }

    /* HOME */
    body.wcag-contrast .home-card {
        background-color: #000 !important;
        border: 2px solid #fff !important;
    }

    /* PRZYCISKI */
    body.wcag-contrast button,
    body.wcag-contrast .btn,
    body.wcag-contrast .tile,
    body.wcag-contrast .number-btn {
        background-color: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }

        body.wcag-contrast button:hover,
        body.wcag-contrast .btn:hover {
            background-color: #fff !important;
            color: #000 !important;
        }

    /* RADIO JAK PRZYCISKI */
    body.wcag-contrast .punkt span {
        background-color: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }

    body.wcag-contrast .punkt input[type="radio"]:checked + span {
        background-color: #fff !important;
        color: #000 !important;
    }

    /* SELECT / INPUT */
    body.wcag-contrast select,
    body.wcag-contrast input,
    body.wcag-contrast textarea {
        background-color: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }

    /* TABELA */
    body.wcag-contrast table,
    body.wcag-contrast th,
    body.wcag-contrast td {
        background-color: #000 !important;
        color: #fff !important;
        border-color: #fff !important;
    }

/* =========================================================
   5. MNIEJ RUCHU
========================================================= */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================================================
   6. PRZYCISKI WCAG (IKONY)
========================================================= */

.wcag-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wcag-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

    .wcag-btn:hover {
        background-color: #f1f3f5;
    }

/* kontrast */
.wcag-contrast-btn {
    background-image: url("/img/wcag-contrast.svg");
}

/* czcionka */
.wcag-font-btn {
    background-image: url("/img/wcag-font.svg");
}
/* ===============================
   WCAG – STOPKA (NAPRAWKA)
================================ */

body.wcag-contrast footer,
body.wcag-contrast footer *,
body.wcag-contrast .footer,
body.wcag-contrast .footer *,
body.wcag-contrast .text-muted {
    color: #ffffff !important;
}

    body.wcag-contrast footer a {
        color: #00ffff !important;
        text-decoration: underline !important;
    }
