/* ── Cookie Consent Banner ────────────────────────────────────────── */

[x-cloak] { display: none !important; }

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: #e2e8f0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* ── main bar ───────────────────────────────────────────────────── */

#cookie-banner-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.ccb-text {
    flex: 1 1 280px;
}

.ccb-text p {
    margin: 0;
    color: #cbd5e1;
}

.ccb-text a {
    color: #93c5fd;
    text-decoration: underline;
}

.ccb-text a:hover {
    color: #bfdbfe;
}

.ccb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ── preferences panel ──────────────────────────────────────────── */

#cookie-banner-prefs {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px;
}

.ccb-prefs-title {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 4px;
}

.ccb-prefs-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 16px;
}

.ccb-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.ccb-category {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ccb-category-info {
    flex: 1;
}

.ccb-category-name {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 13px;
    margin-bottom: 2px;
}

.ccb-category-desc {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

/* ── toggle switch ──────────────────────────────────────────────── */

.ccb-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.ccb-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ccb-toggle-track {
    display: block;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    transition: background 0.2s;
    cursor: pointer;
    position: relative;
}

/* off  – visible light gray */
.ccb-toggle-track.ccb-off {
    background: #cbd5e1;
}

/* on – lighter blue */
.ccb-toggle-track.ccb-on {
    background: #60a5fa;
}

.ccb-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.ccb-toggle input:checked + .ccb-toggle-track::after {
    transform: translateX(18px);
}

.ccb-toggle input:disabled + .ccb-toggle-track {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── always-on badge ────────────────────────────────────────────── */

.ccb-always-on {
    font-size: 11px;
    font-weight: 600;
    color: #6ee7b7;
    white-space: nowrap;
}

/* ── prefs actions ──────────────────────────────────────────────── */

.ccb-prefs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ── buttons ────────────────────────────────────────────────────── */

.ccb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, color 0.15s, opacity 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}

.ccb-btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.ccb-btn-primary {
    background: #2563eb;
    color: #fff;
}

.ccb-btn-primary:hover {
    background: #1d4ed8;
}

.ccb-btn-secondary {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.ccb-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

.ccb-btn-ghost {
    background: transparent;
    color: #94a3b8;
    padding-left: 4px;
    padding-right: 4px;
}

.ccb-btn-ghost:hover {
    color: #cbd5e1;
}

/* ── responsive ─────────────────────────────────────────────────── */

@media (max-width: 600px) {
    #cookie-banner-main,
    #cookie-banner-prefs {
        padding: 14px 16px;
    }

    .ccb-actions,
    .ccb-prefs-actions {
        width: 100%;
    }

    .ccb-btn {
        flex: 1;
        text-align: center;
    }
}
