/* 
 * Common Styles - Shared between public menu and admin
 * Extracted from inline styles in HTML files
 * Date: 2025-10-27
 */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
}

/* Container */
.container {
    max-width: 800px;
    margin: auto;
    padding: 2rem;
}

/* Cards */
.card, .menu-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Menu items list - add indentation */
.menu-card ul {
    padding-left: 3rem !important;
    list-style-type: disc !important;
}

.menu-card ul li {
    display: list-item !important;
    margin-left: 0 !important;
    padding-left: 0.5rem !important;
}

/* Category Headers */
.category-header {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    background: linear-gradient(90deg, #fef9c3 0%, #f0fdf4 100%);
    border-left: 8px solid #fbbf24;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
}

.category-chinese {
    font-size: 1.25rem;
    color: #64748b;
    margin-left: 1rem;
    font-weight: 600;
}

.category-note {
    margin-bottom: 0.5rem;
    color: #2563eb;
    font-size: 1rem;
}

/* Restaurant Name */
#restaurantName {
    font-size: 2.75rem;
    font-weight: 900;
    color: #be123c;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #fca5a5;
}

/* Hours Block */
.hours-block {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.hours-lines {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    align-items: center;
}

.hours-icon {
    font-size: 1.3rem;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
}

.hours-title {
    font-weight: 900;
    color: #2563eb;
    margin-right: 0.5rem;
}

/* Important Note Boxes */
.important-note-box {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(90deg, #fef9c3 0%, #f0fdf4 100%);
    border-left: 8px solid #fbbf24;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #b91c1c;
    box-shadow: 0 2px 8px 0 #fbbf2433;
}

.important-note-icon {
    font-size: 1.6rem;
    margin-right: 0.75rem;
    margin-top: 0.1rem;
}

.important-note-title {
    color: #b91c1c;
    font-weight: 900;
    margin-right: 0.5rem;
}

.important-note-text {
    color: #1e293b;
    font-weight: 600;
}

/* Accessibility - Skip to content */
.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;
}

.sr-only:focus,
.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: #3b82f6;
    color: white;
    font-weight: 600;
    z-index: 9999;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    #restaurantName {
        font-size: 2rem !important;
    }
    
    .category-header {
        font-size: 1.5rem !important;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-chinese {
        margin-left: 0;
        margin-top: 0.25rem;
    }
    
    .hours-block {
        font-size: 0.875rem;
    }
    
    .important-note-box {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    body {
        background-color: white;
    }
    
    .card, .menu-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    /* Hide admin-specific elements when printing */
    button, .no-print {
        display: none !important;
    }
}

/* Category Navigation Sidebar */
#categoryNav {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

#categoryNav::-webkit-scrollbar {
    width: 6px;
}

#categoryNav::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#categoryNav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#categoryNav::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

/* Category navigation links - Modern style */
#categoryList a {
    display: block;
    padding: 12px 16px;
    color: #374151;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

#categoryList a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    transform: scaleY(0);
    transition: transform 0.2s ease-in-out;
}

#categoryList a:hover {
    background: linear-gradient(to right, #eff6ff, #f5f3ff);
    color: #1e40af;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

#categoryList a:hover::before {
    transform: scaleY(1);
}

#categoryList a:active {
    transform: translateX(2px);
}

/* Scroll to Top Button */
#scrollToTop {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrollToTop.visible,
#scrollToTop.show {
    opacity: 1;
    visibility: visible;
}

#scrollToTop:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

#scrollToTop:active {
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    #scrollToTop {
        bottom: 20px;
        right: 20px; /* place at bottom-right on mobile */
        z-index: 999; /* raise above main content but below toasts */
    }
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-success {
    background-color: #10b981;
    color: white;
}

.notification-error {
    background-color: #ef4444;
    color: white;
}

.notification-warning {
    background-color: #f59e0b;
    color: white;
}

.notification-info {
    background-color: #3b82f6;
    color: white;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

