.cookie-banner,
.cookie-dialog {
    box-sizing: border-box;
    border: 1px solid rgb(170 195 255 / 26%);
    border-radius: 18px;
    background: #10182c;
    color: #f4f7ff;
    box-shadow: 0 18px 48px rgb(5 12 31 / 28%), inset 0 1px rgb(255 255 255 / 8%);
    line-height: 1.45;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .cookie-banner,
    .cookie-dialog {
        background: linear-gradient(135deg, rgb(25 42 78 / 78%), rgb(10 16 34 / 82%));
        -webkit-backdrop-filter: saturate(160%) blur(20px);
        backdrop-filter: saturate(160%) blur(20px);
    }
}

@media (prefers-reduced-transparency: reduce) {
    .cookie-banner,
    .cookie-dialog {
        background: #10182c;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

.cookie-banner {
    position: fixed;
    z-index: 10000;
    inset-inline-end: clamp(12px, 2.5vw, 28px);
    bottom: max(clamp(12px, 2.5vw, 28px), env(safe-area-inset-bottom));
    width: min(440px, calc(100% - 24px));
    max-height: calc(100dvh - 28px);
    overflow: auto;
    padding: 14px 16px;
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner:has(+ .cookie-dialog[open]) {
    visibility: hidden;
}

.cookie-dialog {
    position: fixed;
    inset: 0;
    width: min(470px, calc(100% - 24px));
    max-height: calc(100dvh - 28px);
    overflow: auto;
    margin: auto;
    padding: clamp(16px, 4vw, 24px);
}

.cookie-dialog::backdrop {
    background: rgb(5 12 31 / 30%);
}

.cookie-banner h2,
.cookie-dialog h2 {
    margin: 0 0 4px;
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 700;
    color: inherit;
}

.cookie-dialog h2 {
    font-size: 1.25rem;
}

.cookie-banner p,
.cookie-dialog p {
    margin: 0;
    font-size: .875rem;
    color: #dce6f9;
}

.cookie-banner a,
.cookie-dialog a {
    color: #bdd7ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.cookie-actions button {
    border: 1px solid rgb(198 218 255 / 38%);
    border-radius: 999px;
    background: rgb(172 200 255 / 12%);
    color: #fff;
    min-height: 40px;
    padding: 6px 12px;
    font: inherit;
    font-size: .8125rem;
    font-weight: 650;
}

.cookie-actions button:hover {
    background: rgb(172 200 255 / 24%);
}

.cookie-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding-inline: 5px;
    font-size: .8125rem;
}

.cookie-banner :focus-visible,
.cookie-dialog :focus-visible {
    outline: 2px solid #9defff;
    outline-offset: 3px;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-block: 10px;
    border-bottom: 1px solid rgb(198 218 255 / 20%);
}

.cookie-option label {
    display: block;
    font-weight: 700;
    cursor: pointer;
}

.cookie-option span {
    flex: none;
    font-size: .8125rem;
    color: #bdd7ff;
}

.cookie-option input {
    flex: none;
    inline-size: 22px;
    block-size: 22px;
    accent-color: #216fed;
}
