/* ============================================================
   Cookie Banner — GDPR consent popup
   Dark theme, bottom-left fixed position
   ============================================================ */

/* Banner container */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: 360px;
    z-index: 9999;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    padding: 20px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 300ms ease, transform 300ms ease;
}

.cookie-banner.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Header */
.cookie-banner__header {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-banner__header span {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
}

/* Body text */
.cookie-banner__text {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 16px;
}

.cookie-banner__link {
    color: #60a5fa;
    text-decoration: underline;
    cursor: pointer;
}

/* Preferences panel */
.cookie-banner__preferences {
    margin-bottom: 8px;
}

/* Category card */
.cookie-banner__category {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.cookie-banner__category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-banner__category-name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.cookie-banner__category-desc {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.cookie-banner__badge {
    background: #334155;
    border-radius: 10px;
    padding: 2px 10px;
    font-size: 10px;
    color: #94a3b8;
}

/* Toggle switch */
.cookie-banner__toggle {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    cursor: pointer;
    position: relative;
    transition: background 200ms;
    border: none;
    padding: 0;
}

.cookie-banner__toggle[aria-checked="true"] {
    background: #3b82f6;
}

.cookie-banner__toggle[aria-checked="false"] {
    background: #475569;
}

.cookie-banner__toggle-knob {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 200ms;
}

.cookie-banner__toggle[aria-checked="true"] .cookie-banner__toggle-knob {
    transform: translateX(18px);
}

/* Buttons */
.cookie-banner__buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.cookie-banner__btn {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.cookie-banner__btn--primary {
    background: #3b82f6;
    color: white;
}

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

.cookie-banner__btn--secondary {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
}

.cookie-banner__btn--secondary:hover {
    border-color: #60a5fa;
    color: #e2e8f0;
}

/* Accessibility — focus styles */
.cookie-banner__btn:focus-visible,
.cookie-banner__toggle:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .cookie-banner {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
}
