/* SerSeo.pl - Baner zgód v3.2.1 */

.klaro {
    --green1: var(--serseo-consent-action, var(--serseo-consent-brand, #1f6b4f));
    --green2: var(--serseo-consent-action, var(--serseo-consent-brand, #1f6b4f));
    --button-text-color: var(--serseo-consent-brand-text, #fff);
}

.klaro .cm-powered-by,
.klaro .cn-powered-by {
    display: none !important;
}

/* Pierwsza warstwa - czytelny baner bez dark patterns. */
.klaro .cookie-notice:not(.cookie-modal-notice) {
    position: fixed !important;
    left: 20px !important;
    right: auto !important;
    bottom: 20px !important;
    top: auto !important;
    width: min(560px, calc(100vw - 40px)) !important;
    max-width: 560px !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .22) !important;
    background: var(--serseo-consent-bg, #fff) !important;
    color: var(--serseo-consent-text, #171a1f) !important;
    border: 1px solid rgba(20, 25, 32, .14) !important;
    border-color: color-mix(in srgb, var(--serseo-consent-text, #171a1f) 18%, transparent) !important;
    z-index: 2147483000 !important;
    transform: none !important;
}

html.serseo-consent-pos-center .klaro .cookie-notice:not(.cookie-modal-notice) {
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
}

html.serseo-consent-pos-bottom-right .klaro .cookie-notice:not(.cookie-modal-notice) {
    left: auto !important;
    right: 20px !important;
    top: auto !important;
    bottom: 20px !important;
    transform: none !important;
}

html.serseo-consent-pos-bottom-center .klaro .cookie-notice:not(.cookie-modal-notice) {
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: 20px !important;
    transform: translateX(-50%) !important;
}

.klaro .cookie-notice .cn-body {
    padding: 22px !important;
}

.klaro .cookie-notice h2,
.klaro .cookie-notice p {
    color: var(--serseo-consent-text, #171a1f) !important;
}

.klaro .cookie-notice h2 {
    margin: 0 0 8px !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
}

.klaro .cookie-notice p {
    margin: 0 0 16px !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
}

.klaro .cookie-notice .cn-buttons,
.klaro .cookie-notice .cn-ok {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: stretch !important;
}

/* Klaro renderuje „Ustawienia” jako link .cn-learn-more, a nie .cm-btn.
   Dlatego stylujemy go osobno jak pełnoprawny trzeci przycisk. */
.klaro .cookie-notice .cm-btn,
.klaro .cookie-notice .cn-learn-more {
    min-height: 44px !important;
    margin: 0 !important;
    border-radius: 9px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

/* Akceptacja i odmowa mają podobną wagę wizualną. */
.klaro .cookie-notice .cm-btn-success {
    background: var(--serseo-consent-action, var(--serseo-consent-brand, #1f6b4f)) !important;
    border: 2px solid var(--serseo-consent-action, var(--serseo-consent-brand, #1f6b4f)) !important;
    color: var(--serseo-consent-brand-text, #fff) !important;
}

.klaro .cookie-notice .cn-decline,
.klaro .cookie-notice .cm-btn-danger {
    background: var(--serseo-consent-reject, #303741) !important;
    border: 2px solid var(--serseo-consent-reject, #303741) !important;
    color: var(--serseo-consent-reject-text, #fff) !important;
}

.klaro .cookie-notice .cm-btn-info,
.klaro .cookie-notice .cn-learn-more {
    color: var(--serseo-consent-secondary, #1f6b4f) !important;
    background: var(--serseo-consent-bg, #fff) !important;
    border: 2px solid var(--serseo-consent-secondary, #1f6b4f) !important;
    font-weight: 700 !important;
}

.klaro .cookie-notice a:not(.cn-learn-more) {
    color: var(--serseo-consent-secondary, #1f6b4f) !important;
}

/* Modal szczegółowych ustawień. */
.klaro .cookie-modal .cm-modal {
    border-radius: 16px !important;
    overflow: hidden !important;
    background: var(--serseo-consent-bg, #fff) !important;
    color: var(--serseo-consent-text, #171a1f) !important;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .34) !important;
}

/* Modal ma własną bezpieczną powierzchnię. Breakdance dostarcza Brand,
   ale tekst/tło nie są kopiowane 1:1, więc zawsze zachowujemy czytelność. */
.klaro .cookie-modal .cm-modal .cm-header,
.klaro .cookie-modal .cm-modal .cm-body,
.klaro .cookie-modal .cm-modal .cm-footer,
.klaro .cookie-modal .cm-modal .cm-services,
.klaro .cookie-modal .cm-modal .cm-service {
    background: var(--serseo-consent-bg, #fff) !important;
    color: var(--serseo-consent-text, #171a1f) !important;
    border-color: color-mix(in srgb, var(--serseo-consent-text, #171a1f) 16%, transparent) !important;
}

.klaro .cookie-modal .cm-modal h1,
.klaro .cookie-modal .cm-modal h2,
.klaro .cookie-modal .cm-modal h3,
.klaro .cookie-modal .cm-modal p,
.klaro .cookie-modal .cm-modal .cm-list-title,
.klaro .cookie-modal .cm-modal .cm-list-description,
.klaro .cookie-modal .cm-modal .cm-required {
    color: var(--serseo-consent-text, #171a1f) !important;
}

.klaro .cookie-modal .cm-modal .cm-required,
.klaro .cookie-modal .cm-modal .cm-list-description {
    opacity: .74;
}

.klaro .cookie-modal .cm-modal a {
    color: var(--serseo-consent-secondary, #1f6b4f) !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.klaro .cookie-modal .cm-modal .cm-switch-container {
    border-color: color-mix(in srgb, var(--serseo-consent-text, #171a1f) 16%, transparent) !important;
}

.klaro .cookie-modal .cm-modal .cm-btn-close {
    background: transparent !important;
    color: var(--serseo-consent-text, #171a1f) !important;
}

.klaro .cookie-modal .cm-btn {
    min-height: 42px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
}

.klaro .cookie-modal .cm-btn.cm-btn-success,
.klaro .cookie-modal .cm-list-input:checked + .cm-list-label .slider,
.klaro .cookie-modal .cm-list-input.required:checked + .cm-list-label .slider {
    background: var(--serseo-consent-action, var(--serseo-consent-brand, #1f6b4f)) !important;
}

.klaro .cookie-modal .cm-btn.cm-btn-danger {
    background: var(--serseo-consent-reject, #303741) !important;
    color: var(--serseo-consent-reject-text, #fff) !important;
}

.klaro button:focus-visible,
.klaro a:focus-visible,
#serseo-cookie-settings-btn:focus-visible {
    outline: 3px solid var(--serseo-consent-secondary, #2b79c2) !important;
    outline-offset: 3px !important;
}

/* Branding tylko w panelu szczegółowym. */
.serseo-consent-brand {
    clear: both;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--serseo-consent-text, #171a1f) 18%, transparent);
    color: var(--serseo-consent-text, #b8bdc5);
    opacity: .72;
    font-size: 11px;
    line-height: 1.4;
    text-align: right;
}

.serseo-consent-brand a {
    color: var(--serseo-consent-secondary, #e1bd75) !important;
    font-weight: 700;
    opacity: 1;
    text-decoration: none;
}

.serseo-consent-brand a:hover {
    text-decoration: underline;
}

/* Stały, lokalny przycisk ustawień prywatności.
   Kółko = Brand, sam znak ciasteczka = zawsze biały. */
#serseo-cookie-settings-btn {
    position: fixed;
    left: 18px;
    bottom: 18px;
    width: 54px;
    height: 54px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .52);
    border-radius: 50%;
    background: var(--serseo-consent-brand, #1f6b4f);
    box-shadow: 0 7px 24px rgba(0, 0, 0, .26);
    cursor: pointer;
    z-index: 2147482990;
    transition: transform .18s ease, box-shadow .18s ease;
    overflow: hidden;
    display: grid;
    place-items: center;
}

#serseo-cookie-settings-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .32);
}

#serseo-cookie-settings-btn img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

/* JS ustawia dokładny offset ikonki nad banerem tylko przy pozycji lewy dół. */
#serseo-cookie-settings-btn.serseo-cookie-btn-raised {
    bottom: var(--serseo-cookie-button-bottom, 18px);
}

@media (max-width: 640px) {
    .klaro .cookie-notice:not(.cookie-modal-notice),
    html.serseo-consent-pos-bottom-right .klaro .cookie-notice:not(.cookie-modal-notice),
    html.serseo-consent-pos-bottom-center .klaro .cookie-notice:not(.cookie-modal-notice) {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        top: auto !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
        border-radius: 14px !important;
    }

    html.serseo-consent-pos-center .klaro .cookie-notice:not(.cookie-modal-notice) {
        left: 10px !important;
        right: 10px !important;
        top: 50% !important;
        bottom: auto !important;
        width: auto !important;
        max-width: none !important;
        transform: translateY(-50%) !important;
    }

    .klaro .cookie-notice .cn-body {
        padding: 17px !important;
    }

    .klaro .cookie-notice .cn-buttons,
    .klaro .cookie-notice .cn-ok {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .klaro .cookie-notice .cm-btn,
    .klaro .cookie-notice .cn-learn-more {
        width: 100% !important;
    }

    #serseo-cookie-settings-btn {
        left: 12px;
        bottom: 12px;
        width: 48px;
        height: 48px;
    }

    #serseo-cookie-settings-btn img {
        width: 36px;
        height: 36px;
    }
}

