
.ngc-banner[hidden],
.ngc-modal[hidden] {
    display: none !important;
}

.ngc-banner,
.ngc-modal,
.ngc-banner *,
.ngc-modal * {
    box-sizing: border-box;
}

.ngc-banner {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 100000;

    width: min(400px, calc(100vw - 36px));
    max-height: min(430px, calc(100dvh - 36px));
    overflow-y: auto;

    padding: 18px;

    color: #151714;
    background: #fffaf1;

    border: 1px solid rgba(21, 23, 20, 0.16);
    border-radius: 20px;

    box-shadow:
        0 22px 60px rgba(21, 23, 20, 0.18);

    font-family:
        "DM Sans",
        system-ui,
        sans-serif;
}

.has-site-bottom-nav .ngc-banner {
    bottom: calc(
        84px + env(safe-area-inset-bottom, 0px)
    );
}

.ngc-banner-copy strong {
    display: block;

    margin-bottom: 6px;

    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
}

.ngc-banner-copy p {
    margin: 0;

    color: #5f5b52;

    font-size: 13px;
    line-height: 1.45;
}

.ngc-banner-copy a,
.ngc-dialog-privacy a {
    display: inline-block;

    margin-top: 8px;

    color: #151714;

    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ngc-banner-actions {
    display: grid;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, 0.85fr)
        minmax(0, 1.1fr);

    gap: 6px;
    margin-top: 14px;
}

.ngc-banner-actions .ngc-button {
    width: 100%;
    min-width: 0;
    min-height: 40px;

    padding: 8px 5px;

    font-size: 11px;
    white-space: nowrap;
}

.ngc-button {
    min-height: 42px;
    padding: 10px 13px;

    border: 1px solid transparent;
    border-radius: 999px;

    font-family:
        "DM Sans",
        system-ui,
        sans-serif;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;

    cursor: pointer;
}

.ngc-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ngc-button-primary {
    color: #fffaf1;
    background: #151714;
    border-color: #151714;
}

.ngc-button-secondary {
    color: #151714;
    background: #ffffff;
    border-color: rgba(21, 23, 20, 0.19);
}

.ngc-button-link {
    color: #151714;
    background: transparent;
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ngc-accept-button {
    grid-column: auto;
}

.ngc-message {
    min-height: 0;
    margin: 10px 0 0;

    color: #a13b30;

    font-size: 12px;
    line-height: 1.4;
}

.ngc-message:empty {
    display: none;
}

/* Preferences overlay */
.ngc-modal {
    position: fixed;
    inset: 0;
    z-index: 100001;

    display: grid;
    place-items: center;

    padding: 18px;

    background: rgba(10, 11, 10, 0.56);
    backdrop-filter: blur(4px);
}

.ngc-dialog {
    width: min(600px, 100%);
    max-height: min(760px, calc(100dvh - 36px));
    overflow-y: auto;

    padding: 24px;

    color: #151714;
    background: #fffaf1;

    border: 1px solid rgba(21, 23, 20, 0.16);
    border-radius: 24px;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.3);

    font-family:
        "DM Sans",
        system-ui,
        sans-serif;
}

.ngc-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.ngc-eyebrow {
    display: block;

    margin-bottom: 5px;

    color: #aa8425;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ngc-dialog h2 {
    margin: 0;

    color: #151714;

    font-size: clamp(25px, 5vw, 38px);
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1;
}

.ngc-close {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;

    padding: 0;

    color: #151714;
    background: #ffffff;

    border: 1px solid rgba(21, 23, 20, 0.12);
    border-radius: 50%;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.ngc-dialog-description {
    margin: 14px 0 18px;

    color: #5f5b52;

    font-size: 14px;
    line-height: 1.5;
}

.ngc-category-list {
    display: grid;
    gap: 9px;
}

.ngc-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 14px;

    background: #ffffff;

    border: 1px solid rgba(21, 23, 20, 0.12);
    border-radius: 16px;

    cursor: pointer;
}

.ngc-category-locked {
    background: #f1eadc;
    cursor: default;
}

.ngc-category-copy {
    display: block;
}

.ngc-category-copy strong {
    display: block;

    margin-bottom: 3px;

    font-size: 14px;
    font-weight: 850;
}

.ngc-category-copy small {
    display: block;

    color: #6b675e;

    font-size: 12px;
    line-height: 1.4;
}

.ngc-switch {
    position: relative;

    flex: 0 0 44px;
    width: 44px;
    height: 25px;
}

.ngc-switch input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
}

.ngc-switch span {
    position: absolute;
    inset: 0;

    background: #c8c3b9;

    border-radius: 999px;

    transition: 0.18s ease;
}

.ngc-switch span::after {
    content: "";

    position: absolute;
    top: 3px;
    left: 3px;

    width: 19px;
    height: 19px;

    background: #ffffff;

    border-radius: 50%;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);

    transition: 0.18s ease;
}

.ngc-switch input:checked + span {
    background: #151714;
}

.ngc-switch input:checked + span::after {
    transform: translateX(19px);
}

.ngc-switch input:focus-visible + span {
    outline: 3px solid rgba(201, 162, 66, 0.5);
    outline-offset: 3px;
}

.ngc-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 18px;
}

.ngc-dialog-actions .ngc-button {
    flex: 1 1 150px;
}

.ngc-dialog-privacy {
    margin: 16px 0 0;

    color: #6b675e;

    font-size: 11px;
    line-height: 1.45;
}

body.ngc-modal-open {
    overflow: hidden;
}

.ngc-footer-trigger {
    padding: 0;

    color: inherit;
    background: transparent;

    border: 0;

    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;

    cursor: pointer;
}

@media (max-width: 600px) {
    .ngc-banner {
        right: 10px;
        bottom: calc(
            10px + env(safe-area-inset-bottom, 0px)
        );
        left: 10px;

        width: auto;
        max-height: 42dvh;

        padding: 14px;

        border-radius: 16px;
    }

    .ngc-banner-actions {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 0.85fr)
            minmax(0, 1.1fr);

        gap: 5px;
        margin-top: 10px;
    }

    .ngc-banner-actions .ngc-button {
        min-height: 36px;
        padding: 7px 3px;
        font-size: 10.5px;
    }

    .has-site-bottom-nav .ngc-banner {
        bottom: calc(
            72px + env(safe-area-inset-bottom, 0px)
        );
    }

    .ngc-banner-copy strong {
        font-size: 16px;
    }

    .ngc-banner-copy p {
        font-size: 12px;
        line-height: 1.4;
    }

    .ngc-banner-actions {
        margin-top: 11px;
    }

    .ngc-button {
        min-height: 38px;
        padding: 8px 10px;

        font-size: 12px;
    }

    .ngc-modal {
        align-items: end;

        padding: 0;
    }

    .ngc-dialog {
        width: 100%;
        max-height: 72dvh;

        padding:
            18px
            14px
            calc(
                18px + env(safe-area-inset-bottom, 0px)
            );

        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 22px 22px 0 0;
    }

    .ngc-dialog h2 {
        font-size: 27px;
    }

    .ngc-dialog-description {
        margin: 10px 0 14px;

        font-size: 12px;
    }

    .ngc-category {
        gap: 12px;
        padding: 11px;
    }

    .ngc-category-copy small {
        font-size: 11px;
    }

    .ngc-dialog-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .ngc-dialog-actions .ngc-button:last-child {
        grid-column: 1 / -1;
    }
}
