/* ============================================
   COOKIE CONSENT BANNER
   Matches YT AE website theme
============================================ */

:root {
    --bg-color: #080808;
    --second-bg-color: #131313;
    --text-color: white;
    --main-color: #f10000;
}

#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    transform: none;
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-left: none;
    border-right: none;
    border-radius: 12px 12px 0 0;
    z-index: 9999;
    padding: 20px 25px;
    box-sizing: border-box;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); /* iOS safe area */
}

#cookie-banner.show {
    display: block;
    opacity: 1;
}

.cookie-banner-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-banner-close i {
    font-size: 22px;
}

.cookie-banner-close:hover {
    opacity: 0.9;
}

.cookie-banner-content {
    text-align: center;
}

.cookie-banner-icon {
    margin-bottom: 12px;
    font-size: 32px;
}

.cookie-banner-title {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-family: 'Poppins', sans-serif;
}

.cookie-banner-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 0 0 15px 0;
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
}

.cookie-banner-text a {
    color: var(--main-color);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-banner-text a:hover {
    color: #cc0000;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
}

.cookie-btn-reject {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.cookie-btn-accept {
    background: var(--main-color);
    border: none;
    color: white;
}

.cookie-btn-accept:hover {
    background: #cc0000;
    box-shadow: 0 2px 8px rgba(241, 0, 0, 0.4);
}

/* ============================================
   MOBILE RESPONSIVE - HORIZONTAL LAYOUT (768px and under)
============================================ */

@media (max-width: 768px) {
    #cookie-banner {
        bottom: 0;
        padding: 15px 20px 20px 20px; /* Added more bottom padding */
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); /* Extra bottom padding */
    }
    
    .cookie-banner-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        text-align: left;
        gap: 8px;
    }
    
    .cookie-banner-icon {
        margin-bottom: 0;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .cookie-banner-title {
        display: none;
    }
    
    .cookie-banner-text {
        margin: 0;
        font-size: 8.5px;
        color: rgba(255, 255, 255, 0.7);
        line-height: 1.3;
        flex: 1;
        min-width: 0;
    }
    
    .cookie-banner-text a {
        color: var(--main-color);
        text-decoration: underline;
        font-weight: 500;
        white-space: nowrap;
    }
    
    .cookie-banner-buttons {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
        flex-shrink: 0;
        align-items: center;
        flex-direction: row;
        padding-bottom: 5px; /* Added padding below buttons */
    }
    
    .cookie-btn {
        padding: 5px 12px;
        font-size: 10px;
        border-radius: 16px;
        font-weight: 500;
        width: auto;
    }
    
    .cookie-btn-accept {
        padding: 6px 16px;
    }
    
    .cookie-banner-close {
        display: none;
    }
}

/* Small phones */
@media (max-width: 480px) {
    #cookie-banner {
        bottom: 0;
        padding: 15px 20px 25px 20px; /* Even more bottom padding */
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        padding-bottom: calc(25px + env(safe-area-inset-bottom, 0px)); /* Extra bottom padding */
    }
    
    .cookie-banner-content {
        gap: 7px;
    }
    
    .cookie-banner-icon {
        font-size: 12px;
    }
    
    .cookie-banner-text {
        font-size: 8px;
        line-height: 1.3;
    }
    
    .cookie-banner-buttons {
        flex-direction: row;
        gap: 6px;
        padding-bottom: 7px; /* Added padding below buttons */
    }
    
    .cookie-btn {
        padding: 5px 10px;
        font-size: 9px;
        border-radius: 16px;
        width: auto;
    }
    
    .cookie-btn-accept {
        padding: 5px 12px;
    }
    
    .cookie-banner-close {
        display: none;
    }
}

/* ============================================
   COOKIE BANNER - HORIZONTAL LAYOUT (769px+)
   Matches ChatGPT-style layout
============================================ */

@media (min-width: 769px) {
    #cookie-banner {
        padding: 20px 32px;
        bottom: 0;
    }

    .cookie-banner-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
        text-align: left;
        gap: 24px;
    }

    /* Left side: icon + text group */
    .cookie-banner-text-group {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        min-width: 0;
    }

    .cookie-banner-icon {
        margin-bottom: 0;
        font-size: 20px;
        flex-shrink: 0;
    }

    .cookie-banner-title {
        display: none; /* Hide title, keep only text */
    }

    .cookie-banner-text {
        margin: 0;
        font-size: 11.5px;
        color: rgba(255, 255, 255, 0.7);
        line-height: 1.5;
    }

    .cookie-banner-text a {
        color: var(--main-color);
        text-decoration: underline;
        font-weight: 500;
        white-space: nowrap;
    }

    /* Right side: buttons */
    .cookie-banner-buttons {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
        flex-shrink: 0;
        align-items: center;
    }

    /* Separator dot between buttons */
    .cookie-banner-buttons .separator {
        color: rgba(255, 255, 255, 0.3);
        font-size: 18px;
        user-select: none;
        line-height: 1;
    }

    .cookie-btn {
        padding: 7px 24px;
        font-size: 12px;
        border-radius: 24px; /* Pill shape like ChatGPT */
        font-weight: 500;
    }

    .cookie-btn-reject {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.7);
    }

    .cookie-btn-reject:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.3);
        color: white;
    }

    .cookie-btn-accept {
        background: var(--main-color);
        border: none;
        color: white;
        padding: 8px 28px;
    }

    .cookie-btn-accept:hover {
        background: #cc0000;
        box-shadow: 0 2px 8px rgba(241, 0, 0, 0.4);
    }

    /* Hide close button on desktop (like ChatGPT) */
    .cookie-banner-close {
        display: none;
    }
}