.cookie-banner {
    position: fixed;
    z-index: 40;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    width: min(760px, calc(100% - 40px));
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 26px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 8px 32px #10182826;
}

.cookie-copy h2 {
    margin-bottom: 12px;
    font-size: 16px;
    letter-spacing: -.2px;
}

.cookie-copy p, .cookie-category p, .cookie-dialog-description {
    font-size: 13px;
    line-height: 1.6;
    color: #535862;
}

.cookie-actions {
    display: flex;
    gap: 8px;
}

.cookie-actions .button {
    white-space: nowrap;
    font-size: 12px;
    padding-inline: 14px;
}

.cookie-text-button {
    border: 0;
    padding: 0;
    margin-top: 12px;
    background: transparent;
    color: var(--brand);
    font-size: 12px;
    text-align: left;
}

.cookie-text-button:hover {
    text-decoration: underline;
}

.cookie-footer-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}

.cookie-footer-button:hover {
    color: var(--brand);
}

.cookie-dialog {
    width: min(560px, calc(100% - 32px));
    max-height: calc(100dvh - 40px);
    padding: 28px;
    margin: auto;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 20px 60px #10182826;
}

.cookie-dialog::backdrop {
    background: #10182866;
}

body:has(.cookie-dialog[open]) {
    overflow: hidden;
}

.cookie-dialog-heading, .cookie-category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-dialog-heading h2 {
    font-size: 22px;
    letter-spacing: -.5px;
}

.cookie-close {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
}

.cookie-close:hover {
    background: var(--surface-soft);
}

.cookie-dialog-description {
    margin-top: 14px;
    margin-bottom: 24px;
}

.cookie-category {
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.cookie-category h3, .cookie-category label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
}

.cookie-category p {
    margin-top: 10px;
}

.cookie-badge {
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.cookie-badge.muted {
    display: inline-block;
    margin-top: 10px;
    background: var(--surface-soft);
    color: var(--muted);
}

.cookie-toggle {
    appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 20px;
    margin: 0;
    border: 1px solid #d5d7da;
    border-radius: 99px;
    background: #e9eaeb;
}

.cookie-toggle::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px #10182826;
}

.cookie-storage-details {
    padding: 16px 0;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--ink-soft);
}

.cookie-storage-details summary {
    font-weight: 500;
}

.cookie-storage-details ul {
    margin: 12px 0 0;
    padding-left: 18px;
    color: #535862;
}

.cookie-storage-details li + li {
    margin-top: 8px;
}

.cookie-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.cookie-dialog-actions .button {
    font-size: 12px;
}

@media (max-width: 760px) {
    .cookie-banner {
        bottom: 16px;
        width: calc(100% - 32px);
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 22px;
    }
    .cookie-actions .button {
        flex: 1;
    }
    .cookie-dialog {
        padding: 22px;
    }
    .cookie-dialog-actions {
        flex-direction: column;
    }
    .onboarding-footer {
        flex-wrap: wrap;
    }
}
