/**
 * Szpurt Zgody — wygląd banera.
 *
 * Wszystko pod prefiksem .szz- i z jawnie ustawionymi wartościami, bo baner
 * wchodzi na strony na Betheme, Elementorze i Gutenbergu — nie może dziedziczyć
 * przypadkowych stylów motywu ani ich nadpisywać.
 */

.szz-baner,
.szz-baner * {
    box-sizing: border-box;
}

/* Atrybut [hidden] to tylko `display:none` z arkusza przeglądarki — przegrywa
   z KAŻDĄ własną regułą `display`, także naszą `.szz-wroc { display:inline-flex }`.
   Bez tego ikona powrotu wyświetlałaby się zawsze, również przy otwartym banerze. */
.szz-baner[hidden],
.szz-wroc[hidden],
.szz-ustawienia[hidden] {
    display: none !important;
}

.szz-baner {
    --szz-accent: #7c3aed;
    --szz-tlo: #ffffff;
    --szz-tekst: #1a1a1f;
    --szz-tekst-slaby: #55555f;
    --szz-linia: rgba(0, 0, 0, .10);
    --szz-cien: 0 -2px 12px rgba(0, 0, 0, .06), 0 12px 40px rgba(0, 0, 0, .14);

    position: fixed;
    z-index: 2147483000;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 16px 16px;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--szz-tekst);

    opacity: 0;
    transform: translateY(16px);
    transition: opacity .28s ease, transform .28s ease;
}

.szz-baner.szz-widoczny {
    opacity: 1;
    transform: translateY(0);
}

.szz-pos-center {
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 15, 20, .45);
}

.szz-pos-center .szz-panel {
    max-width: 560px;
}

.szz-panel {
    max-width: 1080px;
    margin: 0 auto;
    background: var(--szz-tlo);
    border: 1px solid var(--szz-linia);
    border-radius: 18px;
    box-shadow: var(--szz-cien);
    overflow: hidden;
}

/* ---------- część główna ---------- */

.szz-glowny {
    padding: 22px 24px;
}

.szz-tytul {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 650;
    line-height: 1.3;
    color: var(--szz-tekst);
}

.szz-opis {
    margin: 0 0 16px;
    max-width: 72ch;
    color: var(--szz-tekst-slaby);
    font-size: 14.5px;
}

.szz-link {
    color: var(--szz-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.szz-link:hover {
    text-decoration-thickness: 2px;
}

/* ---------- przyciski ---------- */

.szz-akcje {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.szz-akcje-dol {
    padding: 4px 24px 22px;
}

.szz-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, transform .06s ease;
}

.szz-btn:active {
    transform: translateY(1px);
}

.szz-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--szz-accent) 45%, transparent);
    outline-offset: 2px;
}

.szz-btn-glowny {
    background: var(--szz-accent);
    color: #fff;
}

.szz-btn-glowny:hover {
    background: color-mix(in srgb, var(--szz-accent) 88%, #000);
}

.szz-btn-drugi {
    background: transparent;
    border-color: var(--szz-linia);
    color: var(--szz-tekst);
}

.szz-btn-drugi:hover {
    background: rgba(0, 0, 0, .04);
}

.szz-btn-tekst {
    background: transparent;
    color: var(--szz-tekst-slaby);
    padding: 0 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.szz-btn-tekst:hover {
    color: var(--szz-tekst);
}

/* ---------- ustawienia szczegółowe ---------- */

.szz-ustawienia {
    border-top: 1px solid var(--szz-linia);
    max-height: min(52vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.szz-kat {
    padding: 16px 24px;
    border-bottom: 1px solid var(--szz-linia);
}

.szz-kat:last-of-type {
    border-bottom: 0;
}

.szz-kat-naglowek {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.szz-kat-nazwa {
    font-weight: 600;
    font-size: 15px;
}

.szz-kat-opis {
    margin: 6px 0 0;
    max-width: 70ch;
    font-size: 13.5px;
    color: var(--szz-tekst-slaby);
}

.szz-zawsze {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--szz-tekst-slaby);
    background: rgba(0, 0, 0, .05);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.szz-kat-stala .szz-kat-opis {
    opacity: .9;
}

/* ---------- przełącznik ---------- */

.szz-przelacznik {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.szz-przelacznik input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.szz-suwak {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #c9c9d2;
    transition: background-color .18s ease;
}

.szz-suwak::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .18s ease;
}

.szz-przelacznik input:checked + .szz-suwak {
    background: var(--szz-accent);
}

.szz-przelacznik input:checked + .szz-suwak::after {
    transform: translateX(18px);
}

.szz-przelacznik input:focus-visible + .szz-suwak {
    outline: 3px solid color-mix(in srgb, var(--szz-accent) 45%, transparent);
    outline-offset: 2px;
}

/* ---------- przycisk powrotu ---------- */

.szz-wroc {
    position: fixed;
    z-index: 2147482999;
    left: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .10);
    border-radius: 50%;
    background: #fff;
    color: #55555f;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
    cursor: pointer;
    opacity: .55;
    transition: opacity .15s ease, transform .15s ease;
}

.szz-wroc:hover {
    opacity: 1;
    transform: scale(1.06);
}

.szz-wroc:focus-visible {
    opacity: 1;
    outline: 3px solid rgba(124, 58, 237, .45);
    outline-offset: 2px;
}

/* ---------- telefon ---------- */

@media (max-width: 640px) {
    .szz-baner {
        padding: 0 10px 10px;
    }

    .szz-glowny {
        padding: 18px 18px 16px;
    }

    .szz-akcje {
        flex-direction: column;
        align-items: stretch;
    }

    .szz-akcje .szz-btn {
        width: 100%;
    }

    .szz-btn-tekst {
        order: 3;
    }

    .szz-kat,
    .szz-akcje-dol {
        padding-left: 18px;
        padding-right: 18px;
    }

    .szz-ustawienia {
        max-height: 46vh;
    }
}

/* ---------- ciemny motyw ---------- */

@media (prefers-color-scheme: dark) {
    .szz-baner {
        --szz-tlo: #1c1c22;
        --szz-tekst: #f2f2f5;
        --szz-tekst-slaby: #a8a8b4;
        --szz-linia: rgba(255, 255, 255, .12);
        --szz-cien: 0 -2px 12px rgba(0, 0, 0, .3), 0 12px 40px rgba(0, 0, 0, .5);
    }

    .szz-btn-drugi:hover {
        background: rgba(255, 255, 255, .07);
    }

    .szz-zawsze {
        background: rgba(255, 255, 255, .09);
    }

    .szz-suwak {
        background: #4a4a56;
    }

    .szz-wroc {
        background: #1c1c22;
        color: #a8a8b4;
        border-color: rgba(255, 255, 255, .12);
    }
}

/* ---------- ograniczone animacje ---------- */

@media (prefers-reduced-motion: reduce) {
    .szz-baner,
    .szz-btn,
    .szz-suwak,
    .szz-suwak::after,
    .szz-wroc {
        transition: none;
    }

    .szz-baner {
        transform: none;
    }
}
