.mcc-banner,
.mcc-modal,
.mcc-floating,
.mcc-inline-settings {
    font-family: inherit;
    box-sizing: border-box;
}

.mcc-banner *,
.mcc-modal *,
.mcc-floating,
.mcc-inline-settings {
    box-sizing: border-box;
}

.mcc-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99998;
    padding: 16px;
    pointer-events: none;
}

.mcc-banner.mcc-bottom { bottom: 0; }
.mcc-banner.mcc-top { top: 0; }

.mcc-card {
    width: min(1080px, calc(100vw - 32px));
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid rgba(0, 138, 99, 0.18);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 32, 48, 0.18);
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    pointer-events: auto;
}

.mcc-content h2,
.mcc-modal h2 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.2;
    color: #071733;
}

.mcc-content p,
.mcc-category p {
    margin: 0;
    color: #4d6078;
    line-height: 1.55;
    font-size: 15px;
}

.mcc-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--mcc-primary, #008a63);
    font-weight: 700;
    text-decoration: none;
}

.mcc-actions,
.mcc-modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.mcc-button,
.mcc-inline-settings,
.mcc-floating {
    appearance: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}

.mcc-button { min-height: 44px; padding: 0 18px; }
.mcc-button:hover,
.mcc-floating:hover,
.mcc-inline-settings:hover { transform: translateY(-1px); }

.mcc-button-primary {
    background: var(--mcc-primary, #008a63);
    color: #ffffff !important;
    box-shadow: 0 12px 28px rgba(0, 138, 99, 0.22);
}

.mcc-button-primary:hover,
.mcc-button-primary:focus {
    background: #006f51;
    color: #ffffff !important;
}

.mcc-button-secondary {
    background: #f4fbf8;
    color: #071733 !important;
    border: 1px solid rgba(0, 138, 99, 0.18);
}

.mcc-button-secondary:hover,
.mcc-button-secondary:focus {
    background: #e6f8f1;
    color: #071733 !important;
}

.mcc-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.mcc-modal[hidden],
.mcc-banner[hidden],
.mcc-floating[hidden] { display: none !important; }

.mcc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 23, 51, 0.44);
    backdrop-filter: blur(3px);
}

.mcc-modal-panel {
    position: relative;
    width: min(620px, 100%);
    max-height: min(720px, calc(100vh - 36px));
    overflow: auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(0, 20, 32, 0.28);
    padding: 22px;
}

.mcc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8f1ee;
    margin-bottom: 14px;
}

.mcc-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #dcebe7;
    background: #ffffff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #071733;
}

.mcc-category {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #edf4f2;
}

.mcc-category strong {
    display: block;
    margin-bottom: 5px;
    color: #071733;
    font-size: 16px;
}

.mcc-switch {
    position: relative;
    display: inline-flex;
    width: 54px;
    height: 32px;
}

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

.mcc-switch span {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #d7e1df;
    border-radius: 999px;
    transition: .2s;
}

.mcc-switch span:before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 4px;
    top: 4px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: .2s;
}

.mcc-switch input:checked + span { background: var(--mcc-primary, #008a63); }
.mcc-switch input:checked + span:before { transform: translateX(22px); }
.mcc-switch input:disabled + span { opacity: .7; cursor: not-allowed; }

.mcc-modal-actions { padding-top: 18px; }

.mcc-floating {
    position: fixed;
    bottom: 18px;
    z-index: 99970;
    min-height: 42px;
    padding: 0 16px;
    background: #ffffff;
    color: #071733 !important;
    -webkit-text-fill-color: #071733 !important;
    border: 1px solid rgba(0, 138, 99, 0.22);
    box-shadow: 0 12px 30px rgba(0, 32, 48, 0.16);
}

.mcc-floating-left {
    left: 18px;
    right: auto;
}

.mcc-floating-right {
    right: 18px;
    left: auto;
}

/* Gdy maly przycisk cookies zostanie ustawiony po prawej, odsuń go od przycisku „Do góry”. */
body.mcc-has-scroll-top .mcc-floating-right {
    bottom: 92px;
}

.mcc-inline-settings {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    background: #f4fbf8;
    color: #071733;
    border: 1px solid rgba(0, 138, 99, 0.22);
}

body.mcc-modal-open { overflow: hidden; }

@media (max-width: 760px) {
    .mcc-banner { padding: 12px; }
    .mcc-card { width: 100%; grid-template-columns: 1fr; padding: 16px; border-radius: 18px; }
    .mcc-actions,
    .mcc-modal-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
    .mcc-button { width: 100%; min-height: 46px; }
    .mcc-category { grid-template-columns: 1fr; gap: 10px; }
    .mcc-switch { justify-self: start; }
    .mcc-floating { bottom: 12px; min-height: 40px; padding: 0 12px; font-size: 12px; }
    .mcc-floating-left { left: 12px; right: auto; }
    .mcc-floating-right { right: 12px; left: auto; }
    body.mcc-has-scroll-top .mcc-floating-right { bottom: 78px; }
}


@supports (padding: max(0px)) {
    .mcc-floating {
        bottom: max(18px, env(safe-area-inset-bottom));
    }

    .mcc-floating-left {
        left: max(18px, env(safe-area-inset-left));
    }

    .mcc-floating-right {
        right: max(18px, env(safe-area-inset-right));
    }

    body.mcc-has-scroll-top .mcc-floating-right {
        bottom: max(92px, calc(env(safe-area-inset-bottom) + 92px));
    }

    @media (max-width: 760px) {
        .mcc-floating {
            bottom: max(12px, env(safe-area-inset-bottom));
        }

        .mcc-floating-left {
            left: max(12px, env(safe-area-inset-left));
        }

        .mcc-floating-right {
            right: max(12px, env(safe-area-inset-right));
        }

        body.mcc-has-scroll-top .mcc-floating-right {
            bottom: max(78px, calc(env(safe-area-inset-bottom) + 78px));
        }
    }
}
