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

#cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: calc(100% - 32px);
    max-width: 620px;
    background: #0f172a;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: cb-slidein 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

#cookie-banner.cb-hiding {
    animation: cb-slideout 0.35s ease-in forwards;
}

@keyframes cb-slidein {
    from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0)     scale(1);    }
}

@keyframes cb-slideout {
    to { opacity: 0; transform: translateX(-50%) translateY(24px); }
}

.cb-body {
    padding: 24px 24px 0;
}

.cb-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cb-icon-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(40, 168, 75, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
}

.cb-text h2 {
    font-size: 17px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 6px;
    line-height: 1.3;
}

.cb-text p {
    font-size: 13.5px;
    color: #94a3b8;
    margin: 0 0 10px;
    line-height: 1.55;
}

.cb-privacy-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: #86efac;
    text-decoration: none;
    font-weight: 500;
}

.cb-privacy-link:hover { text-decoration: underline; }

.cb-privacy-link svg { flex-shrink: 0; }

/* ── Manage panel ──────────────────────────────────────────────────────── */
.cb-manage-panel {
    margin-top: 18px;
    border-top: 1px solid #1e293b;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cb-panel-hidden {
    display: none !important;
}

.cb-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #1e293b;
    border-radius: 10px;
    border: 1px solid #334155;
}

.cb-cat-info strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.cb-cat-info span {
    font-size: 11.5px;
    color: #94a3b8;
}

.cb-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.cb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cb-toggle-track {
    position: absolute;
    inset: 0;
    background: #334155;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}

.cb-toggle input:checked + .cb-toggle-track { background: #28a84b; }
.cb-toggle input:disabled + .cb-toggle-track { opacity: 0.6; cursor: not-allowed; }

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

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

.cb-save-prefs {
    margin-top: 4px;
    padding: 8px 16px;
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    align-self: flex-start;
    transition: background 0.15s;
}

.cb-save-prefs:hover { background: #2d3f54; }

/* ── Action buttons ────────────────────────────────────────────────────── */
.cb-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px 20px;
    border-top: 1px solid #1e293b;
    margin-top: 18px;
}

.cb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #334155;
    background: #1e293b;
    color: #e2e8f0;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
}

.cb-btn:hover { background: #273548; border-color: #4a5568; }
.cb-btn:active { transform: scale(0.97); }

.cb-btn-accept {
    background: #28a84b;
    color: #ffffff;
    border-color: #28a84b;
    flex: 1.4;
}

.cb-btn-accept:hover { background: #1e8038; border-color: #1e8038; }

@media (max-width: 520px) {
    #cookie-banner { bottom: 0; border-radius: 20px 20px 0 0; max-width: 100%; width: 100%; }
    .cb-footer { flex-wrap: wrap; }
    .cb-btn { flex: 1 1 calc(50% - 4px); }
    .cb-btn-accept { flex: 1 1 100%; order: -1; }
}
