/* =========================================================
   CMM Consent Manager
   ========================================================= */

.cmm-consent-banner,
.cmm-consent-banner * {
    box-sizing: border-box;
}

.cmm-consent-banner {
    display: none;
    position: fixed;
    left: 22px;
    bottom: 22px;

    width: 370px;
    max-width: calc(100vw - 44px);

    z-index: 99990;

    background: #ffffff;
    border: 1px solid #dce8ed;
    border-radius: 16px;

    box-shadow: 0 12px 35px rgba(18, 62, 82, .17);

    font-family: Arial, Helvetica, sans-serif;
    color: #29445f;
}

.cmm-consent-banner.cmm-consent-visible {
    display: block;
    animation: cmmConsentShow .22s ease;
}

@keyframes cmmConsentShow {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   Treść bannera
   ========================================================= */

.cmm-consent-banner-inner {
    padding: 15px;
}

.cmm-consent-text strong {
    display: block;
    margin: 0 0 4px;

    color: #18374f;

    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.cmm-consent-text p {
    margin: 0;

    color: #71818a;

    font-size: 12.5px;
    line-height: 1.4;
}


/* =========================================================
   Przyciski
   ========================================================= */

.cmm-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.15fr;

    gap: 6px;

    margin-top: 12px;
}

.cmm-consent-btn {
    min-height: 35px;

    border-radius: 8px;

    padding: 8px 9px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 11.5px;
    font-weight: 600;

    cursor: pointer;

    transition: .15s ease;
}


/* Odrzuć */

.cmm-consent-btn-secondary {
    background: #f6f8fb;

    border: 1px solid #dce8ed;

    color: #29445f;
}

.cmm-consent-btn-secondary:hover {
    background: #edf3f7;
    border-color: #c9dce5;
}


/* Dostosuj */

.cmm-consent-btn-settings {
    background: #ffffff;

    border: 1px solid #b9dce9;

    color: #0878ad;
}

.cmm-consent-btn-settings:hover {
    background: #edf8fc;
    border-color: #63b6d5;
}


/* Akceptuję */

.cmm-consent-btn-primary {
    background: #168bc4;

    border: 1px solid #168bc4;

    color: #ffffff;

    box-shadow: 0 3px 9px rgba(9, 120, 173, .14);
}

.cmm-consent-btn-primary:hover {
    background: #0874ad;
    border-color: #0874ad;
}


/* =========================================================
   Modal
   ========================================================= */

.cmm-consent-modal,
.cmm-consent-modal * {
    box-sizing: border-box;
}

.cmm-consent-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 99999;

    background: rgba(24, 55, 79, .30);

    align-items: center;
    justify-content: center;

    padding: 20px;

    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.cmm-consent-modal.cmm-consent-modal-visible {
    display: flex;
}

.cmm-consent-modal-box {
    position: relative;

    width: 100%;
    max-width: 620px;
    max-height: 90vh;

    overflow-y: auto;

    background: #ffffff;

    border: 1px solid #dce8ed;
    border-radius: 20px;

    padding: 28px;

    box-shadow: 0 20px 55px rgba(18, 62, 82, .22);

    color: #29445f;

    animation: cmmConsentModalShow .2s ease;
}

@keyframes cmmConsentModalShow {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.cmm-consent-modal-box h2 {
    margin: 0 40px 10px 0;

    color: #18374f;

    font-size: 22px;
    line-height: 1.25;
}

.cmm-consent-modal-intro {
    margin: 0 0 22px;

    color: #607482;

    font-size: 13.5px;
    line-height: 1.55;
}

.cmm-consent-modal-intro a {
    color: #0878ad;
    font-weight: 600;
    text-decoration: none;
}

.cmm-consent-modal-intro a:hover {
    text-decoration: underline;
}


/* =========================================================
   Zamknięcie modala
   ========================================================= */

.cmm-consent-close {
    position: absolute;

    right: 15px;
    top: 15px;

    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 50%;

    background: #f6f8fb;

    color: #607482;

    font-size: 23px;
    line-height: 30px;

    cursor: pointer;
}

.cmm-consent-close:hover {
    background: #edf3f7;
}


/* =========================================================
   Kategorie
   ========================================================= */

.cmm-consent-option {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding: 17px 0;

    border-top: 1px solid #e2e8ef;
}

.cmm-consent-option-text {
    flex: 1;
}

.cmm-consent-option-text strong {
    display: block;

    color: #29445f;

    font-size: 15px;
}

.cmm-consent-option-text p {
    margin: 5px 0 0;

    color: #71818a;

    font-size: 12.5px;
    line-height: 1.5;
}

.cmm-consent-always {
    padding: 6px 9px;

    border-radius: 8px;

    background: #edf8fc;

    color: #0878ad;

    font-size: 11px;
    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   Switch
   ========================================================= */

.cmm-consent-switch {
    position: relative;

    display: inline-block;

    width: 46px;
    height: 24px;

    flex-shrink: 0;
}

.cmm-consent-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cmm-consent-slider {
    position: absolute;

    cursor: pointer;

    inset: 0;

    background: #cbd6dc;

    border-radius: 24px;

    transition: .2s;
}

.cmm-consent-slider:before {
    content: "";

    position: absolute;

    width: 18px;
    height: 18px;

    left: 3px;
    top: 3px;

    background: #ffffff;

    border-radius: 50%;

    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);

    transition: .2s;
}

.cmm-consent-switch input:checked + .cmm-consent-slider {
    background: #168bc4;
}

.cmm-consent-switch input:checked + .cmm-consent-slider:before {
    transform: translateX(22px);
}


/* =========================================================
   Przyciski modala
   ========================================================= */

.cmm-consent-modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 9px;

    padding-top: 20px;

    border-top: 1px solid #e2e8ef;
}

.cmm-consent-modal-actions .cmm-consent-btn {
    min-width: 145px;
}

/* =========================================================
   Zakładki
   ========================================================= */

.cmm-consent-tabs {
    display: flex;

    margin: 20px 0 22px;

    border-bottom: 1px solid #e2e8ef;
}

.cmm-consent-tab {
    position: relative;

    border: 0;
    background: transparent;

    padding: 10px 16px;

    color: #71818a;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.cmm-consent-tab:hover {
    color: #0878ad;
}

.cmm-consent-tab-active {
    color: #0878ad;
}

.cmm-consent-tab-active:after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: -1px;

    height: 2px;

    background: #168bc4;
}


/* =========================================================
   Zawartość zakładek
   ========================================================= */

.cmm-consent-tab-content {
    display: none;
}

.cmm-consent-tab-content-active {
    display: block;
}


/* =========================================================
   Dokumenty
   ========================================================= */

.cmm-consent-documents {
    border-top: 1px solid #e2e8ef;
}

.cmm-consent-document {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 16px 8px;

    border-bottom: 1px solid #e2e8ef;

    color: #29445f;
    text-decoration: none;

    transition: background .15s ease;
}

.cmm-consent-document:hover {
    background: #f6f8fb;
}

.cmm-consent-document-text {
    display: block;
}

.cmm-consent-document-text strong {
    display: block;

    margin-bottom: 4px;

    color: #29445f;

    font-size: 14px;
}

.cmm-consent-document-text small {
    display: block;

    color: #71818a;

    font-size: 12px;
    line-height: 1.45;
}

.cmm-consent-document-arrow {
    flex-shrink: 0;

    color: #168bc4;

    font-size: 27px;
    font-weight: 300;
}


/* =========================================================
   Telefon
   ========================================================= */

@media (max-width: 600px) {

    .cmm-consent-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;

        width: auto;
        max-width: none;

        border-radius: 14px;
    }

    .cmm-consent-banner-inner {
        padding: 14px;
    }

    .cmm-consent-actions {
        grid-template-columns: 1fr 1fr 1.15fr;
    }

    .cmm-consent-btn {
        padding-left: 5px;
        padding-right: 5px;

        font-size: 11px;
    }

    .cmm-consent-modal {
        padding: 12px;
    }

    .cmm-consent-modal-box {
        padding: 23px 18px 18px;

        border-radius: 17px;
    }

    .cmm-consent-option {
        gap: 15px;
    }

    .cmm-consent-modal-actions {
        flex-direction: column-reverse;
    }

    .cmm-consent-modal-actions .cmm-consent-btn {
        width: 100%;
    }

}

@media (max-width: 380px) {

    .cmm-consent-actions {
        grid-template-columns: 1fr 1fr;
    }

    .cmm-consent-btn-primary {
        grid-column: 1 / -1;
    }

}

/* =========================================================
   Produkcyjne uzupełnienia dostępności
   ========================================================= */

html.cmm-consent-modal-open {
    overflow: hidden;
}

.cmm-consent-btn:focus-visible,
.cmm-consent-tab:focus-visible,
.cmm-consent-close:focus-visible,
.cmm-consent-document:focus-visible,
.cmm-consent-switch input:focus-visible + .cmm-consent-slider {
    outline: 3px solid rgba(22, 139, 196, .28);
    outline-offset: 2px;
}

.cmm-consent-switch input:focus-visible + .cmm-consent-slider {
    box-shadow: 0 0 0 3px rgba(22, 139, 196, .18);
}

@media (prefers-reduced-motion: reduce) {
    .cmm-consent-banner.cmm-consent-visible,
    .cmm-consent-modal-box {
        animation: none;
    }

    .cmm-consent-btn,
    .cmm-consent-slider,
    .cmm-consent-slider:before,
    .cmm-consent-document {
        transition: none;
    }
}
