.cookie-banner {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 200;
    padding: 16px;
    pointer-events: none;
}

.cookie-banner:not([hidden]) {
    pointer-events: auto;
}

.cookie-banner__panel {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}

.cookie-banner__main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.cookie-banner__heading {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.cookie-banner__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #475569;
}

.cookie-banner__text a {
    color: #2563eb;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner__text a:hover {
    color: #1d4ed8;
}

/* Single accordion wrapping Essential + Analytics */
.cookie-banner__accordion {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}

.cookie-banner__accordion-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.cookie-banner__accordion-trigger::-webkit-details-marker {
    display: none;
}

.cookie-banner__accordion-trigger-label {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
}

.cookie-banner__chevron {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.2s ease;
}

.cookie-banner__accordion[open] .cookie-banner__chevron {
    transform: rotate(-135deg);
    margin-top: 3px;
}

.cookie-banner__accordion-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #e2e8f0;
}

.cookie-banner__category {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
}

.cookie-banner__category + .cookie-banner__category {
    border-top: 1px solid #e2e8f0;
}

.cookie-banner__category--locked {
    background: #f8fafc;
}

.cookie-banner__toggle {
    display: flex;
    align-items: center;
    padding-top: 2px;
    cursor: pointer;
}

.cookie-banner__category--locked .cookie-banner__toggle {
    cursor: default;
}

.cookie-banner__toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.cookie-banner__category--locked .cookie-banner__toggle input[type="checkbox"] {
    cursor: not-allowed;
}

.cookie-banner__category-content {
    min-width: 0;
}

.cookie-banner__category-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cookie-banner__category-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
}

.cookie-banner__category-badge {
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    background: #e2e8f0;
    border-radius: 999px;
}

.cookie-banner__category-desc {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #64748b;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-banner__btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 9px 16px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.cookie-banner__btn--primary {
    background: #2563eb;
    color: #fff;
}

.cookie-banner__btn--primary:hover {
    background: #1d4ed8;
}

.cookie-banner__btn--secondary {
    background: #fff;
    color: #0f172a;
    border-color: #cbd5e1;
}

.cookie-banner__btn--secondary:hover {
    background: #f8fafc;
}

.cookie-banner__btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .cookie-banner__actions {
        flex-direction: column;
    }

    .cookie-banner__btn {
        width: 100%;
        text-align: center;
    }

    .cookie-banner__category-badge {
        display: none;
    }
}
