/* =========================================================
   COOKIE CONSENT / RODO
   ========================================================= */

:root {
    --cc-navy: #061b34;
    --cc-navy-2: #0a2948;
    --cc-yellow: #ffc400;
    --cc-yellow-2: #ffd637;
    --cc-text: #152238;
    --cc-muted: #667085;
    --cc-border: #dde3ea;
}

.cookie-consent,
.cookie-preferences {
    font-family: "Poppins", sans-serif;
}

.cookie-consent[hidden],
.cookie-preferences[hidden] {
    display: none !important;
}

.cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 1000000;
    width: min(1180px, calc(100% - 32px));
}

.cookie-consent__box {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: rgba(6, 27, 52, .98);
    color: #fff;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 16px;
    box-shadow: 0 20px 55px rgba(0,0,0,.28);
    backdrop-filter: blur(12px);
}

.cookie-consent__icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--cc-navy);
    background: var(--cc-yellow);
    box-shadow: 0 0 0 5px rgba(255,196,0,.12);
}

.cookie-consent__icon iconify-icon {
    font-size: 29px;
}

.cookie-consent__content h2 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 650;
}

.cookie-consent__content p {
    margin: 0;
    max-width: 690px;
    color: rgba(255,255,255,.76);
    font-size: 11.5px;
    line-height: 1.6;
    font-weight: 400;
}

.cookie-consent__content a {
    color: var(--cc-yellow);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

.cookie-btn {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}

.cookie-btn--primary {
    color: #06182e;
    background: var(--cc-yellow);
}

.cookie-btn--primary:hover {
    background: var(--cc-yellow-2);
    transform: translateY(-1px);
}

.cookie-btn--secondary {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.24);
}

.cookie-btn--secondary:hover {
    background: rgba(255,255,255,.14);
}

.cookie-btn--ghost {
    color: rgba(255,255,255,.88);
    background: transparent;
    border-color: rgba(255,255,255,.18);
}

.cookie-btn--ghost:hover {
    border-color: var(--cc-yellow);
    color: var(--cc-yellow);
}

/* =========================================================
   MODAL USTAWIEŃ
   ========================================================= */

.cookie-preferences {
    position: fixed;
    inset: 0;
    z-index: 1000002;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(2, 12, 25, .78);
    backdrop-filter: blur(7px);
}

.cookie-preferences__dialog {
    position: relative;
    width: min(610px, 100%);
    max-height: min(760px, calc(100vh - 44px));
    overflow: auto;
    background: #fff;
    color: var(--cc-text);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,.32);
}

.cookie-preferences__header {
    padding: 25px 28px 18px;
    border-bottom: 1px solid #edf0f4;
}

.cookie-preferences__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #d99f00;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cookie-preferences__eyebrow::before {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--cc-yellow);
}

.cookie-preferences__header h2 {
    margin: 0 0 7px;
    color: var(--cc-navy);
    font-size: 25px;
    line-height: 1.18;
    font-weight: 700;
}

.cookie-preferences__header p {
    margin: 0;
    color: var(--cc-muted);
    font-size: 11.5px;
    line-height: 1.6;
}

.cookie-preferences__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 1px solid #e3e7ec;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--cc-navy);
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.cookie-preferences__body {
    padding: 18px 28px 8px;
}

.cookie-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 17px 0;
    border-bottom: 1px solid #edf0f4;
}

.cookie-category:last-child {
    border-bottom: 0;
}

.cookie-category h3 {
    margin: 0 0 4px;
    color: var(--cc-navy);
    font-size: 13px;
    font-weight: 650;
}

.cookie-category p {
    margin: 0;
    color: var(--cc-muted);
    font-size: 10.5px;
    line-height: 1.55;
}

.cookie-category__required {
    color: #8c6700;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    background: #fff6d6;
    padding: 7px 9px;
    border-radius: 999px;
}

.cookie-switch {
    position: relative;
    display: inline-flex;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cookie-switch__track {
    width: 100%;
    height: 100%;
    background: #d6dce4;
    border-radius: 999px;
    cursor: pointer;
    transition: .2s ease;
}

.cookie-switch__track::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    transition: .2s ease;
}

.cookie-switch input:checked + .cookie-switch__track {
    background: var(--cc-yellow);
}

.cookie-switch input:checked + .cookie-switch__track::after {
    transform: translateX(20px);
}

.cookie-switch input:focus-visible + .cookie-switch__track {
    outline: 3px solid rgba(255,196,0,.35);
    outline-offset: 2px;
}

.cookie-preferences__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 18px 28px 25px;
    border-top: 1px solid #edf0f4;
}

.cookie-preferences__footer a {
    color: #805f00;
    font-size: 10.5px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-preferences__footer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-preferences .cookie-btn--secondary {
    color: var(--cc-navy);
    background: #f5f7f9;
    border-color: #dfe4e9;
}

.cookie-preferences .cookie-btn--ghost {
    color: var(--cc-navy);
    background: #fff;
    border-color: #dfe4e9;
}

/* mały przycisk do ponownej zmiany zgody */
.cookie-settings-fab {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 999990;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    background: rgba(6,27,52,.94);
    box-shadow: 0 8px 24px rgba(0,0,0,.20);
    font: inherit;
    font-size: 9.5px;
    font-weight: 600;
    cursor: pointer;
}

.cookie-settings-fab iconify-icon {
    color: var(--cc-yellow);
    font-size: 16px;
}

.cookie-settings-fab[hidden] {
    display: none !important;
}

body.cookie-modal-open {
    overflow: hidden !important;
}

@media (max-width: 900px) {
    .cookie-consent {
        bottom: 12px;
        width: min(100% - 20px, 680px);
    }

    .cookie-consent__box {
        grid-template-columns: 48px 1fr;
        gap: 12px;
        padding: 15px;
    }

    .cookie-consent__icon {
        width: 48px;
        height: 48px;
    }

    .cookie-consent__actions {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: stretch;
    }

    .cookie-consent__actions .cookie-btn {
        flex: 1 1 150px;
    }
}

@media (max-width: 560px) {
    .cookie-consent {
        width: calc(100% - 16px);
        bottom: 8px;
    }

    .cookie-consent__box {
        display: block;
        padding: 16px;
        border-radius: 14px;
    }

    .cookie-consent__icon {
        width: 42px;
        height: 42px;
        margin-bottom: 12px;
    }

    .cookie-consent__content h2 {
        font-size: 15px;
    }

    .cookie-consent__content p {
        font-size: 10.5px;
    }

    .cookie-consent__actions {
        margin-top: 14px;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .cookie-consent__actions .cookie-btn {
        width: 100%;
        min-height: 41px;
        padding: 0 10px;
        font-size: 9.5px;
    }

    .cookie-consent__actions .cookie-btn--primary {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .cookie-preferences {
        padding: 10px;
        align-items: end;
    }

    .cookie-preferences__dialog {
        width: 100%;
        max-height: calc(100vh - 20px);
        border-radius: 16px 16px 10px 10px;
    }

    .cookie-preferences__header,
    .cookie-preferences__body,
    .cookie-preferences__footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .cookie-preferences__header h2 {
        font-size: 21px;
        padding-right: 34px;
    }

    .cookie-preferences__footer {
        display: block;
    }

    .cookie-preferences__footer-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin-top: 13px;
    }

    .cookie-preferences__footer-actions .cookie-btn--primary {
        grid-column: 1 / -1;
    }

    .cookie-settings-fab {
        left: 10px;
        bottom: 10px;
        padding: 0 10px;
    }
}
