/* ============================================
   COOKIE CONSENT BANNER & MODAL
   ============================================ */

/* Banner — bottom bar */
.cb-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    border-top: 1px solid #e4e4e7;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    padding: 20px 24px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    pointer-events: none;
}

.cb-banner.cb-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cb-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.cb-banner-text {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #3f3f46;
}

.cb-banner-text strong {
    color: #09090b;
    font-weight: 600;
}

.cb-banner-text a {
    color: #09090b;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cb-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cb-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cb-btn-accept {
    background: #09090b;
    color: #fff;
}
.cb-btn-accept:hover {
    background: #27272a;
}

.cb-btn-refuse {
    background: #f4f4f5;
    color: #3f3f46;
    border: 1px solid #e4e4e7;
}
.cb-btn-refuse:hover {
    background: #e4e4e7;
}

.cb-btn-settings {
    background: transparent;
    color: #71717a;
    padding: 10px 12px;
    font-weight: 500;
}
.cb-btn-settings:hover {
    color: #09090b;
}

.cb-btn-save {
    background: #fff;
    color: #09090b;
    border: 1.5px solid #09090b;
}
.cb-btn-save:hover {
    background: #f4f4f5;
}

/* ============================================
   MODAL — Preferences
   ============================================ */
.cb-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cb-modal-overlay.cb-modal-visible {
    opacity: 1;
    pointer-events: auto;
}

.cb-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(16px);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cb-modal-overlay.cb-modal-visible .cb-modal {
    transform: translateY(0);
}

.cb-modal-header {
    padding: 28px 28px 0;
}

.cb-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #09090b;
    margin: 0 0 8px;
}

.cb-modal-header p {
    font-size: 0.85rem;
    color: #71717a;
    line-height: 1.6;
    margin: 0;
}

.cb-modal-body {
    padding: 24px 28px;
}

/* Category row */
.cb-category {
    padding: 16px 0;
    border-bottom: 1px solid #f4f4f5;
}

.cb-category:last-child {
    border-bottom: none;
}

.cb-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.cb-category-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #09090b;
    margin: 0 0 4px;
}

.cb-category-desc {
    font-size: 0.8rem;
    color: #71717a;
    line-height: 1.5;
    margin: 0;
}

/* Toggle switch */
.cb-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.cb-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d4d4d8;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.cb-toggle input:checked + .cb-toggle-slider {
    background: #09090b;
}

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

.cb-toggle input:disabled + .cb-toggle-slider {
    background: #09090b;
    opacity: 0.5;
    cursor: not-allowed;
}

.cb-category-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: #71717a;
    background: #f4f4f5;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Modal footer */
.cb-modal-footer {
    padding: 0 28px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .cb-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .cb-banner-actions {
        flex-direction: column;
    }

    .cb-btn {
        text-align: center;
    }

    .cb-modal {
        width: 96%;
        max-height: 90vh;
    }

    .cb-modal-header,
    .cb-modal-body,
    .cb-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}
