.ce-cookie,
.ce-cookie-modal {
    --ce-ck-bg: rgb(17 17 27 / .92);
    --ce-ck-fg: #ededf4;
    --ce-ck-muted: #a0a0b8;
    --ce-ck-dim: #6c6c84;
    --ce-ck-border: rgb(255 255 255 / .1);
    --ce-ck-border-strong: rgb(255 255 255 / .16);
    --ce-ck-grad: linear-gradient(100deg, #b56ce6 0%, #e50073 100%);

    color: var(--ce-ck-fg);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

/* Banner */
.ce-cookie {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1060;
    width: 380px;
    max-width: calc(100vw - 40px);
    padding: 20px;
    border: 1px solid var(--ce-ck-border);
    border-radius: 20px;
    background: var(--ce-ck-bg);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 30px 70px -20px rgb(0 0 0 / .7), inset 0 1px 0 rgb(255 255 255 / .06);
}

.ce-cookie .ce-cookie__title {
    margin: 0 0 8px;
    color: var(--ce-ck-fg);
    font-size: 15px;
    font-weight: 600;
}

.ce-cookie__text {
    max-height: 132px;
    overflow-y: auto;
    padding-right: 6px;
    color: var(--ce-ck-muted);
    font-size: 12.5px;
    line-height: 1.55;
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
    mask-image: linear-gradient(180deg, #000 78%, transparent);
    scrollbar-width: thin;
    scrollbar-color: rgb(255 255 255 / .2) transparent;
}

.ce-cookie__text a {
    color: var(--ce-ck-fg);
    text-decoration: underline;
    text-decoration-color: rgb(255 255 255 / .35);
    text-underline-offset: 2px;
}

.ce-cookie__text a:hover {
    color: #fff;
    text-decoration-color: #fff;
}

.ce-cookie__actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.ce-cookie__actions .ce-cookie__btn--primary {
    order: -1;
}

/* Buttons */
.ce-cookie__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background-color .2s, border-color .2s;
}

.ce-cookie__btn--primary {
    background: var(--ce-ck-grad);
    color: #fff;
    box-shadow: 0 8px 26px -10px rgb(229 0 115 / .65), inset 0 1px 0 rgb(255 255 255 / .25);
}

.ce-cookie__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 34px -10px rgb(229 0 115 / .8);
}

.ce-cookie__btn--ghost {
    border-color: var(--ce-ck-border-strong);
    background: rgb(255 255 255 / .04);
    color: var(--ce-ck-fg);
}

.ce-cookie__btn--ghost:hover {
    border-color: rgb(255 255 255 / .28);
    background: rgb(255 255 255 / .09);
}

.ce-cookie__btn:focus-visible,
.ce-switch:focus-visible,
.ce-cookie-modal__close:focus-visible {
    outline: 2px solid #b56ce6;
    outline-offset: 2px;
}

/* Loading */
.ce-cookie__loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.ce-cookie__loading p {
    margin: 0;
    color: var(--ce-ck-muted);
    font-size: 13px;
}

.ce-cookie__spinner {
    flex: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgb(255 255 255 / .15);
    border-top-color: #e50073;
    border-radius: 50%;
    animation: ce-cookie-spin .8s linear infinite;
}

@keyframes ce-cookie-spin {
    to { transform: rotate(360deg); }
}

/* Settings modal */
.ce-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 1070;
    display: grid;
    place-items: center;
    padding: 20px;
}

.ce-cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(5 5 10 / .6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.ce-cookie-modal__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    padding: 24px;
    border: 1px solid var(--ce-ck-border);
    border-radius: 24px;
    background: rgb(17 17 27 / .97);
    box-shadow: 0 40px 90px -20px rgb(0 0 0 / .8), inset 0 1px 0 rgb(255 255 255 / .06);
}

.ce-cookie-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ce-cookie-modal .ce-cookie-modal__title {
    margin: 0;
    color: var(--ce-ck-fg);
    font-size: 17px;
    font-weight: 600;
    text-transform: lowercase;
}

.ce-cookie-modal .ce-cookie-modal__title::first-letter {
    text-transform: uppercase;
}

.ce-cookie-modal__close {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--ce-ck-border-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--ce-ck-muted);
    cursor: pointer;
    transition: color .2s, border-color .2s;
}

.ce-cookie-modal__close:hover {
    border-color: rgb(255 255 255 / .3);
    color: var(--ce-ck-fg);
}

.ce-cookie-modal__close svg {
    width: 16px;
    height: 16px;
}

.ce-cookie-modal__intro {
    margin: 10px 0 16px;
    color: var(--ce-ck-muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.ce-cookie-modal__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    margin: 0 -6px;
    padding: 0 6px;
    scrollbar-width: thin;
    scrollbar-color: rgb(255 255 255 / .2) transparent;
}

.ce-cookie-pref {
    padding: 14px 16px;
    border: 1px solid var(--ce-ck-border);
    border-radius: 16px;
    background: rgb(255 255 255 / .03);
}

.ce-cookie-pref__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    font-weight: 600;
}

.ce-cookie-pref__head small {
    color: var(--ce-ck-dim);
    font-size: 12px;
    font-weight: 500;
}

.ce-cookie-pref p {
    margin: 8px 0 0;
    color: var(--ce-ck-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.ce-switch {
    position: relative;
    flex: none;
    width: 44px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--ce-ck-border-strong);
    border-radius: 999px;
    background: rgb(255 255 255 / .08);
    cursor: pointer;
    transition: background-color .25s, border-color .25s;
}

.ce-switch i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgb(0 0 0 / .35);
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}

.ce-switch.is-on {
    border-color: transparent;
    background: var(--ce-ck-grad);
}

.ce-switch.is-on i {
    transform: translateX(18px);
}

.ce-switch:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.ce-cookie-modal__foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 18px;
}

/* Transitions */
.ce-cookie-fade-enter-active,
.ce-cookie-fade-leave-active {
    transition: opacity .3s ease, transform .3s ease;
}

.ce-cookie-fade-enter,
.ce-cookie-fade-leave-to {
    opacity: 0;
}

.ce-cookie.ce-cookie-fade-enter,
.ce-cookie.ce-cookie-fade-leave-to {
    transform: translateY(12px);
}

@media (prefers-reduced-motion: reduce) {
    .ce-cookie-fade-enter-active,
    .ce-cookie-fade-leave-active,
    .ce-switch,
    .ce-switch i {
        transition: none;
    }
}

@media (max-width: 575.98px) {
    .ce-cookie {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
        padding: 16px;
    }

    .ce-cookie-modal__foot {
        grid-template-columns: 1fr;
    }

    .ce-cookie-modal__foot .ce-cookie__btn--primary {
        order: -1;
    }

    .ce-cookie-modal {
        align-items: end;
        padding: 12px;
    }

    .ce-cookie-modal__panel {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 18px;
    }
}
