.nozi-consent[hidden],
.nozi-consent__summary[hidden],
.nozi-consent__details[hidden] {
    display: none !important;
}

.nozi-consent {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 20, 20, .38);
    box-sizing: border-box;
}

.nozi-consent *,
.nozi-consent *::before,
.nozi-consent *::after {
    box-sizing: border-box;
}

.nozi-consent-open {
    overflow: hidden;
}

.nozi-consent__card {
    width: min(860px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 30px;
    color: #242424;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 20px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
    outline: 0;
}

.nozi-consent__title {
    margin: 0 0 10px;
    color: #242424;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.12;
    font-weight: 600;
}

.nozi-consent__intro {
    max-width: 720px;
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.55;
}

.nozi-consent__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.nozi-consent__button,
.nozi-consent__back,
.nozi-consent-change {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.nozi-consent__button {
    min-height: 46px;
    padding: 11px 21px;
    border: 1px solid #292929;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1.2;
}

.nozi-consent__button--primary {
    color: #fff;
    background: #242424;
}

.nozi-consent__button--ghost {
    color: #242424;
    background: #fff;
}

.nozi-consent__button:focus-visible,
.nozi-consent__back:focus-visible,
.nozi-consent-change:focus-visible,
.nozi-consent__switch input:focus-visible + span {
    outline: 3px solid #b8873b;
    outline-offset: 3px;
}

.nozi-consent__details-head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.nozi-consent__details-head .nozi-consent__title {
    margin: 0;
}

.nozi-consent__back {
    padding: 7px 0;
    color: #555;
    background: transparent;
    white-space: nowrap;
}

.nozi-consent__option {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 22px;
    align-items: center;
    padding: 17px 0;
    border-top: 1px solid #e6e6e6;
}

.nozi-consent__option-title {
    display: inline-block;
    margin-bottom: 4px;
    color: #242424;
    font-weight: 600;
}

.nozi-consent__option p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.45;
}

.nozi-consent__switch {
    position: relative;
    display: inline-flex;
    width: 50px;
    height: 28px;
    flex: 0 0 50px;
}

.nozi-consent__switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.nozi-consent__switch span {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: #c9c9c9;
    transition: background .18s ease;
}

.nozi-consent__switch span::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    transition: transform .18s ease;
}

.nozi-consent__switch input:checked + span {
    background: #242424;
}

.nozi-consent__switch input:checked + span::after {
    transform: translateX(22px);
}

.nozi-consent__switch input:disabled + span {
    background: #7d7d7d;
    cursor: not-allowed;
}

.nozi-consent-change {
    padding: 0;
    color: inherit;
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 700px) {
    .nozi-consent {
        padding: 0;
    }

    .nozi-consent__card {
        width: 100%;
        max-height: min(88vh, 760px);
        padding: 23px 18px calc(20px + env(safe-area-inset-bottom));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 18px 18px 0 0;
    }

    .nozi-consent__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .nozi-consent__button {
        width: 100%;
    }

    .nozi-consent__actions .nozi-consent__button--primary {
        grid-row: 1;
    }

    .nozi-consent__details-head {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .nozi-consent__option {
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nozi-consent__switch span,
    .nozi-consent__switch span::after {
        transition: none;
    }
}

