/* Menu Vertical Layout Styles */
/* Desktop: Vertical split with sidebar navigation */
/* Mobile: Horizontal tabs with sticky navigation */

/* Scrollbar hiding utility for mobile tabs */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Desktop sidebar styling */
@media (min-width: 1024px) {
    #menu-sidebar {
        height: calc(100vh - 8rem);
        overflow-y: auto;
    }
    
    #menu-sidebar::-webkit-scrollbar {
        width: 6px;
    }
    
    #menu-sidebar::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }
    
    #menu-sidebar::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }
    
    #menu-sidebar::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
}

/* Mobile tabs container - Fixed sticky positioning like header */
#mobile-tabs {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

/* Desktop sidebar sticky positioning */
#menu-sidebar {
    position: sticky;
    top: 5rem; /* Account for fixed header (64px = 4rem) + some margin */
    z-index: 30;
}

/* Menu navigation chevron transitions */
.menu-chevron {
    transition: transform 0.2s ease-in-out;
}

/* Category navigation item active state */
.category-nav-item.active {
    background-color: rgba(var(--color-papaya-orange), 0.1);
    color: var(--color-papaya-orange);
}

/* Menu item hover effects */
.menu-item:hover .item-title {
    color: var(--color-papaya-orange);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Mobile tab active states */
.menu-tab-btn.active {
    border-bottom-color: var(--color-papaya-orange);
    color: var(--color-papaya-orange);
}

.category-tab-btn.active {
    background-color: var(--color-papaya-orange);
    color: white;
}

/* Sticky positioning adjustments for mobile */
@media (max-width: 1023px) {
    #mobile-tabs {
        position: sticky;
        top: 4rem; /* Account for header height (64px) */
        z-index: 40;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    
    /* Ensure main content doesn't get hidden under sticky tabs */
    #menu-items-container {
        padding-top: 1rem;
    }
    
    /* Add some spacing under mobile tabs */
    .lg\:hidden + .container-custom {
        margin-top: 0;
    }
}

/* Desktop layout adjustments */
@media (min-width: 1024px) {
    .container-custom {
        max-width: 1400px;
    }
    
    /* Sidebar fixed width, sticky positioning, and main content flexible */
    #menu-sidebar {
        flex-shrink: 0;
        width: 20rem;
        position: sticky;
        top: 5rem; /* Below fixed header */
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
        z-index: 30;
    }
    
    #menu-items-container {
        flex: 1;
        min-width: 0; /* Prevent flex item from growing beyond container */
    }
    
    /* Hide mobile elements on desktop */
    #mobile-tabs {
        display: none;
    }
    
    /* Ensure proper spacing for sticky sidebar */
    .lg\:flex.lg\:space-x-6 {
        align-items: flex-start;
    }
}

/* Mobile layout adjustments */
@media (max-width: 1023px) {
    /* Hide desktop sidebar on mobile */
    #menu-sidebar {
        display: none;
    }
    
    /* Full width content on mobile */
    #menu-items-container {
        margin-left: 0;
    }
    
    /* Category tabs horizontal scroll */
    .category-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* Enhanced list item styling */
.menu-item {
    transition: all 0.2s ease-in-out;
}

.menu-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Popular badge styling */
.menu-item [data-popular="true"]::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-top: 15px solid #fbbf24;
}

/* Loading and transition states */
.menu-section {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.menu-section.filtering {
    opacity: 0.6;
}

/* Quick filter active states */
.quick-filter {
    transition: all 0.2s ease-in-out;
}

.quick-filter:hover {
    transform: translateY(-1px);
}

/* Responsive text scaling */
@media (max-width: 640px) {
    .item-title {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .item-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .item-price {
        font-size: 1rem;
    }
}

/* Focus states for accessibility */
.menu-tab-btn:focus,
.category-tab-btn:focus,
.category-nav-item:focus,
.menu-nav-toggle:focus {
    outline: 2px solid var(--color-papaya-orange);
    outline-offset: 2px;
}

/* No results state styling */
#no-results {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search input focus states */
#sidebar-search:focus,
#mobile-search:focus {
    box-shadow: 0 0 0 3px rgba(var(--color-papaya-orange), 0.1);
}