/* 
   THE RIFT - GDPR Cookie Banner CSS
   Design: Cyberpunk / Red & Cyan Accents
*/

/* Accessibility Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:root {
    --cb-bg: #050508;
    --cb-surface: #0a0a0f;
    --cb-cyan: #00F5FF;
    --cb-magenta: #FF204E;
    --cb-yellow: #FFD700;
    --cb-text: #ffffff;
    --cb-text-dim: #999;
    --cb-border: rgba(0, 245, 255, 0.3);
    --cb-border-hover: rgba(0, 245, 255, 0.8);
    --cb-font-display: 'Orbitron', sans-serif;
    --cb-font-mono: 'IBM Plex Mono', monospace;
}

/* --- BANNER (Bottom) --- */
.rift-cb-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--cb-bg);
    border: 1px solid var(--cb-border);
    padding: 24px;
    z-index: 99999;
    display: none;
    /* Controlled via JS */
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 245, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.rift-cb-banner.is-visible {
    display: flex;
    transform: translateY(0);
}

.rift-cb-content h2 {
    font-family: var(--cb-font-display);
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--cb-cyan);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.rift-cb-content p {
    font-family: var(--cb-font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--cb-text-dim);
}

.rift-cb-content a {
    color: var(--cb-cyan);
    text-decoration: underline;
}

.rift-cb-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rift-cb-btn {
    padding: 10px 20px;
    font-family: var(--cb-font-display);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--cb-border);
    color: var(--cb-text);
    transition: all 0.2s ease;
}

.rift-cb-btn:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: var(--cb-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.rift-cb-btn--primary {
    background: var(--cb-cyan);
    color: var(--cb-bg);
    border-color: var(--cb-cyan);
}

.rift-cb-btn--primary:hover {
    background: #fff;
    color: var(--cb-bg);
    box-shadow: 0 0 25px #fff;
}

/* --- MODAL (Preferences Overlay) --- */
.rift-cb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rift-cb-modal-overlay.is-visible {
    display: flex;
}

.rift-cb-modal {
    background: var(--cb-surface);
    width: 100%;
    max-width: 500px;
    /* Slightly narrower */
    border: 1px solid var(--cb-border);
    padding: 20px;
    /* Reduced from 30px */
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 1);
    margin: auto 0;
    max-height: calc(100vh - 40px);
    /* Strictly within viewport */
    display: flex;
    flex-direction: column;
}

.rift-cb-modal-header {
    margin-bottom: 15px;
    /* Reduced from 24px */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.rift-cb-modal-header h3 {
    font-family: var(--cb-font-display);
    color: var(--cb-cyan);
    font-size: 16px;
    /* Reduced from 20px */
    letter-spacing: 2px;
}

.rift-cb-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--cb-text-dim);
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.rift-cb-close-modal:hover {
    color: #fff;
}

/* --- CATEGORIES & TOGGLES --- */
.rift-cb-category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Reduced from 20px */
    margin-bottom: 20px;
    /* Reduced from 30px */
    overflow-y: auto;
    /* Internal scroll if list is too long */
    padding-right: 5px;
}

.rift-cb-category-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.rift-cb-cat-info h4 {
    font-family: var(--cb-font-display);
    font-size: 14px;
    color: var(--cb-text);
    margin-bottom: 4px;
}

.rift-cb-cat-info p {
    font-family: var(--cb-font-mono);
    font-size: 12px;
    color: var(--cb-text-dim);
    line-height: 1.4;
}

/* Toggle Switch Styling */
.cb-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cb-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cb-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #333;
    transition: .4s;
    border: 1px solid #444;
}

.cb-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.cb-slider {
    background-color: var(--cb-cyan);
    border-color: var(--cb-cyan);
}

input:checked+.cb-slider:before {
    transform: translateX(20px);
}

input:disabled+.cb-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- YOUTUBE PLACEHOLDER --- */
.youtube-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border: 1px solid var(--cb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.youtube-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0, 245, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

.placeholder-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.placeholder-content p {
    font-family: var(--cb-font-mono);
    color: var(--cb-text);
    margin-bottom: 15px;
    font-size: 14px;
}

/* Focus States for Accessibility */
.rift-cb-btn:focus-visible,
.cb-switch input:focus-visible+.cb-slider {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

@media (max-width: 768px) {
    .rift-cb-banner {
        left: 0;
        right: 0;
        bottom: 0;
        border-left: 0;
        border-right: 0;
    }

    .rift-cb-modal {
        padding: 15px;
        max-height: calc(100vh - 20px);
    }

    .rift-cb-modal-header h3 {
        font-size: 14px;
    }

    .rift-cb-cat-info h4 {
        font-size: 12px;
    }

    .rift-cb-cat-info p {
        font-size: 11px;
    }

    .rift-cb-actions {
        flex-direction: column;
    }

    .rift-cb-btn {
        width: 100%;
    }
}


/* =========================================
   MOBILE LANDSCAPE RESPONSIVENESS
   ========================================= */
@media (max-height: 500px) and (orientation: landscape) {
  
.rift-cb-modal {
    max-height: calc(100vh - 70px);
}
}