/* ─── Cookie Consent Banner ─── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-card, #1f2937);
    padding: 20px;
    border-top: 1px solid var(--border, #374151);
    z-index: 9999;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

.cookie-content h3 {
    color: var(--text-primary, #f3f4f6);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.cookie-content p {
    color: var(--text-secondary, #d1d5db);
    margin-bottom: 15px;
    line-height: 1.6;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    background-color: var(--blue-600, #2563eb);
    color: white;
    border: none;
    border-radius: var(--radius-xs, 6px);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all var(--transition, 0.2s ease);
    font-weight: 500;
    font-family: var(--font-family, inherit);
}

.cookie-btn:hover {
    background-color: var(--blue-500, #3b82f6);
    box-shadow: 0 0 20px var(--blue-glow, rgba(59, 130, 246, 0.25));
}

.cookie-btn-secondary {
    background-color: var(--border, #374151);
    color: var(--text-secondary, #d1d5db);
}

.cookie-btn-secondary:hover {
    background-color: var(--bg-elevated, #283548);
    box-shadow: none;
}

.cookie-btn-tertiary {
    background-color: var(--success, #10b981);
}

.cookie-btn-tertiary:hover {
    background-color: #059669;
    box-shadow: none;
}

/* ─── Cookie Category ─── */
.cookie-category {
    margin-bottom: 20px;
    padding: 20px;
    background-color: var(--bg-body, #111827);
    border-radius: var(--radius-sm, 10px);
    border: 1px solid var(--border, #374151);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-category h3 {
    color: var(--text-primary, #f3f4f6);
    margin: 0;
    font-size: 1.05rem;
}

.cookie-category p {
    color: var(--text-muted, #9ca3af);
    margin-bottom: 10px;
    line-height: 1.6;
}

.cookie-category ul {
    margin-left: 20px;
    margin-top: 10px;
}

.cookie-category li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--text-secondary, #d1d5db);
}

/* ─── Toggle Switch ─── */
.cookie-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: var(--border, #374151);
    border-radius: 100px;
    transition: all var(--transition, 0.2s ease);
    cursor: pointer;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all var(--transition, 0.2s ease);
}

input:checked + .cookie-slider {
    background-color: var(--blue-600, #2563eb);
}

input:checked + .cookie-slider:before {
    transform: translateX(20px);
}

input:disabled + .cookie-slider {
    background-color: var(--bg-elevated, #283548);
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-status {
    color: var(--text-muted, #9ca3af);
    font-size: 0.85rem;
    font-style: italic;
}

/* ─── Cookie Modal ─── */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    display: none;
    overflow-y: auto;
    padding: 24px;
}

.cookie-modal-content {
    background-color: var(--bg-card, #1f2937);
    border-radius: var(--radius, 16px);
    border: 1px solid var(--border, #374151);
    padding: 32px;
    max-width: 700px;
    width: 100%;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    color: var(--text-secondary, #d1d5db);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-modal-content h2 {
    color: var(--text-primary, #f3f4f6);
    margin-top: 0;
    margin-bottom: 16px;
}

.cookie-modal-content h3 {
    color: var(--text-primary, #f3f4f6);
    margin-top: 20px;
}

.cookie-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    transition: color var(--transition, 0.2s ease);
    line-height: 1;
    background: none;
    border: none;
}

.cookie-close:hover {
    color: var(--text-primary, #f3f4f6);
}

.cookie-modal.show {
    display: flex !important;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px;
    }

    .cookie-content h3 {
        font-size: 1.05rem;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-modal-content {
        padding: 24px;
        max-width: 95%;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-switch {
        width: 100%;
        justify-content: space-between;
    }
}
