/* ==========================================================================
   Cookie Consent Banner — Banner Bar
   ========================================================================== */

.cb-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.92);
    color: var(--text-light);
    padding: 16px 24px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.cb-banner.visible {
    display: flex;
}

.cb-banner__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.cb-banner__text {
    flex: 1;
    max-width: 800px;
}

.cb-banner__text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cb-banner__text a:hover {
    color: var(--primary-color);
    opacity: 0.85;
}

.cb-banner__buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.cb-btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border: none;
    transition: opacity 0.2s;
    line-height: 1.5;
}

.cb-btn:hover {
    opacity: 0.85;
}

.cb-btn--primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.cb-btn--secondary {
    background-color: var(--accent-grey);
    color: var(--text-light);
}

.cb-btn--outline {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   Preferences Modal — Overlay + Dialog
   ========================================================================== */

.cb-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cb-overlay.visible {
    display: flex;
}

.cb-modal {
    background: #fff;
    color: #333;
    border-radius: 8px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.cb-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.cb-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.cb-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.cb-modal__close:hover {
    background-color: #f0f0f0;
}

.cb-modal__body {
    padding: 0;
}

.cb-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
}

.cb-modal__footer .cb-btn--primary {
    color: #fff;
}

/* ==========================================================================
   Category Rows
   ========================================================================== */

.cb-category {
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
}

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

.cb-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cb-category__info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-category__name {
    font-size: 15px;
    color: #333;
}

.cb-category__badge {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background-color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cb-category__desc {
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ==========================================================================
   Toggle Switch
   ========================================================================== */

.cb-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.cb-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s;
}

.cb-toggle__slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.cb-toggle__input:checked + .cb-toggle__slider {
    background-color: var(--primary-color);
}

.cb-toggle__input:checked + .cb-toggle__slider::before {
    transform: translateX(20px);
}

/* ==========================================================================
   Floating Button
   ========================================================================== */

.cb-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    font-size: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: box-shadow 0.2s;
    line-height: 1;
}

.cb-floating-btn.visible {
    display: flex;
}

.cb-floating-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 576px) {
    .cb-banner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 16px;
    }

    .cb-banner__buttons {
        flex-direction: column;
        width: 100%;
    }

    .cb-btn {
        width: 100%;
    }

    .cb-modal__header {
        padding: 16px;
    }

    .cb-category {
        padding: 12px 16px;
    }

    .cb-modal__footer {
        padding: 12px 16px;
    }

    .cb-modal__footer .cb-btn {
        width: 100%;
    }
}
