/**
 * Viewer Sidebar Styles
 * Extracted from viewer.php inline styles for better maintainability
 */

/* Hide default auth UI elements */
#userLoginButton,
#userPanel,
#loginModal {
    display: none !important;
}

/* Sidebar Styles - Must load for all users */
#flightsSidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: 660px !important;
    height: 100vh !important;
    max-width: 660px !important;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    box-shadow: 2px 0 20px rgba(0,0,0,0.3) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

#flightsSidebar.open {
    transform: translateX(0) !important;
}

#sidebarHeader {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

/* Filter button styles */
.filter-btn[data-active="true"] {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-color: rgba(103,126,234,0.8) !important;
}

.filter-btn[data-active="true"] i {
    color: #ffd700 !important;
}

#clearFilters:hover {
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
}

/* Favourite star button */
.favourite-btn:hover {
    transform: scale(1.2);
}

.favourite-btn:active {
    transform: scale(0.95);
}

#closeSidebar, #closeSidebar2 {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#closeSidebar:hover, #closeSidebar2:hover {
    opacity: 0.7;
}

#sidebarLoginView, #sidebarLoggedInView {
    flex-direction: column;
    height: 100%;
    width: 100%;
}

#sidebarLoginView {
    display: flex;
}

#sidebarLoggedInView {
    display: none;
}

#sidebarLoggedInView.active {
    display: flex;
}

#sidebarContent {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    #flightsSidebar {
        width: 100%;
        transform: translateX(-100%);
    }

    #sidebarToggle.sidebar-open {
        left: calc(100% - 60px);
    }
}
