/* ==========================================================================
   wOsiedle – okno zgody na pliki cookie (assets/js/cookie-consent.js)
   Kolorystyka zgodna z site-chrome.css. Wszystko w obrębie .wcc.
   ========================================================================== */

.wcc {
    --wcc-indigo: #2e3191;
    --wcc-indigo-deep: #1b1d5c;
    --wcc-indigo-soft: #eceefb;
    --wcc-green: #1eab4b;
    --wcc-green-hover: #178f3e;
    --wcc-ink: #1a1b33;
    --wcc-muted: #5d6080;
    --wcc-line: #e2e4f0;
    --wcc-paper: #f5f6fb;
    --wcc-display: "Bricolage Grotesque", "Open Sans", system-ui, sans-serif;

    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: "Open Sans", system-ui, sans-serif;
    color: var(--wcc-ink);
}

.wcc[hidden],
.wcc .wcc__view[hidden] {
    display: none !important;
}

.wcc *,
.wcc *::before,
.wcc *::after {
    box-sizing: border-box;
}

html.wcc-lock,
html.wcc-lock body {
    overflow: hidden !important;
}

/* tło */
.wcc__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(27, 29, 92, .45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .3s ease;
}

/* okno */
.wcc__dialog {
    position: relative;
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 36px 40px 32px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 40px 80px -30px rgba(27, 29, 92, .55);
    opacity: 0;
    transform: translateY(16px) scale(.98);
    transition: opacity .3s ease, transform .3s ease;
    outline: none;
}

.wcc--in .wcc__backdrop {
    opacity: 1;
}

.wcc--in .wcc__dialog {
    opacity: 1;
    transform: none;
}

/* nagłówek okna */
.wcc__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.wcc__logo {
    display: block;
    width: auto;
    height: 40px;
}

.wcc .wcc__eyebrow {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--wcc-indigo-soft);
    color: var(--wcc-indigo);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.wcc .wcc__title {
    margin: 0 0 14px;
    font-family: var(--wcc-display);
    font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--wcc-indigo-deep);
}

.wcc .wcc__text,
.wcc .wcc__text p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--wcc-muted);
}

.wcc .wcc__text p + p {
    margin-top: 12px;
}

.wcc .wcc__text .wcc__small {
    font-size: 13.5px;
}

.wcc .wcc__text a,
.wcc .wcc__text a:visited {
    font-weight: 600;
    color: var(--wcc-indigo);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* przyciski */
.wcc__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--wcc-line);
}

.wcc__actions-main {
    display: flex;
    gap: 12px;
}

.wcc .wcc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin: 0;
    padding: 12px 22px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.wcc .wcc__btn--accent {
    background: var(--wcc-green);
    color: #fff;
}

.wcc .wcc__btn--accent:hover {
    background: var(--wcc-green-hover);
    color: #fff;
}

.wcc .wcc__btn--outline {
    border-color: var(--wcc-indigo);
    color: var(--wcc-indigo);
}

.wcc .wcc__btn--outline:hover {
    background: var(--wcc-indigo);
    color: #fff;
}

.wcc .wcc__btn--link,
.wcc .wcc__btn--link:visited {
    padding-inline: 4px;
    color: var(--wcc-indigo);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wcc .wcc__btn--link:hover {
    color: var(--wcc-indigo-deep);
}

.wcc .wcc__btn:focus-visible,
.wcc .wcc__back:focus-visible,
.wcc a:focus-visible,
.wcc__switch input:focus-visible + .wcc__switch-track {
    outline: 3px solid #8f93ff;
    outline-offset: 3px;
}

/* przycisk "wróć" */
.wcc .wcc__back {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--wcc-line);
    border-radius: 12px;
    background: #fff;
    color: var(--wcc-ink);
    cursor: pointer;
    transition: background-color .2s ease;
}

.wcc .wcc__back:hover {
    background: var(--wcc-paper);
}

/* kategorie */
.wcc .wcc__text--lead {
    margin-bottom: 20px;
}

.wcc .wcc__cats {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wcc__cat {
    padding: 18px 20px;
    border: 1px solid var(--wcc-line);
    border-radius: 16px;
    background: var(--wcc-paper);
}

.wcc__cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wcc .wcc__cat-name {
    margin: 0;
    font-family: var(--wcc-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--wcc-ink);
    cursor: pointer;
}

.wcc .wcc__cat-desc {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--wcc-muted);
}

.wcc .wcc__always {
    font-size: 13px;
    font-weight: 700;
    color: var(--wcc-green);
    white-space: nowrap;
}

.wcc__sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* przełącznik */
.wcc__switch {
    position: relative;
    flex: none;
    width: 48px;
    height: 28px;
}

.wcc__switch input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.wcc__switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #c9cce3;
    transition: background-color .2s ease;
}

.wcc__switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(27, 29, 92, .25);
    transition: transform .2s ease;
}

.wcc__switch input:checked + .wcc__switch-track {
    background: var(--wcc-green);
}

.wcc__switch input:checked + .wcc__switch-track::after {
    transform: translateX(20px);
}

/* ---------- telefon: okno wysuwa się od dołu ---------- */

@media (max-width: 640px) {
    .wcc {
        align-items: flex-end;
        padding: 0;
    }

    .wcc__dialog {
        max-width: none;
        max-height: 88vh;
        max-height: 88dvh;
        padding: 28px 20px 20px;
        border-radius: 24px 24px 0 0;
        transform: translateY(40px);
    }

    .wcc__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .wcc__actions-main {
        flex-direction: column-reverse;
    }

    .wcc .wcc__btn {
        width: 100%;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wcc__backdrop,
    .wcc__dialog,
    .wcc__switch-track,
    .wcc__switch-track::after {
        transition: none;
    }
}
