/* Lunch Menu Display Styles */

/* Container */
.sa-lunch-display {
    margin: 2rem 0;
}

/* Week Navigation */
.lunch-week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.lunch-nav-btn {
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lunch-nav-btn .btn-arrow {
    display: none;
}

.lunch-nav-btn .btn-text {
    display: inline;
}

.lunch-nav-btn:hover {
    background: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lunch-nav-btn:active {
    transform: translateY(0);
}

.lunch-current-week-label {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    text-align: center;
    flex: 1;
}

/* Header row: title left, tabs right */
.sa-lunch-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
}

.sa-lunch-title {
    font-family: "brooklyn", sans-serif !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #002678 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.02em !important;
    white-space: nowrap !important;
}

/* Tab Navigation */
.sa-lunch-tabs {
    display: flex !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    background: #e9ecef !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: none !important;
    min-width: 320px !important;
}

.sa-lunch-tab {
    flex: 1 !important;
    padding: 0.75rem 2rem !important;
    white-space: nowrap !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: #495057 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    text-align: center !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.sa-lunch-tab:hover {
    color: #212529 !important;
    background: transparent !important;
}

.sa-lunch-tab--active {
    background: #ffffff !important;
    color: #002678 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

.sa-lunch-tab--active:hover {
    color: #002678 !important;
    background: #ffffff !important;
}

/* Week View Styles */
.sa-lunch-week-view {
    margin-top: 1rem;
}

.lunch-week {
    margin-bottom: 2rem;
}

.lunch-week .week-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

.lunch-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.lunch-day {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.lunch-day:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #adb5bd;
}

.lunch-day .day-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.lunch-day .day-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.lunch-day .day-date {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
}

.lunch-day .day-menu {
    color: #495057;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.lunch-day .day-menu.no-menu {
    color: #adb5bd;
    font-style: italic;
}

.sa-lunch-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

/* Order Lunch Buttons */
.sa-lunch-order-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.sa-lunch-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: #002678;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-family: "brooklyn", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.3;
    transition: background-color 0.3s ease;
}

.sa-lunch-order-btn:hover {
    background-color: #004FA8;
    color: #fff !important;
    text-decoration: none !important;
}

/* Date Header */
.sa-lunch-date {
    font-size: 1.125rem;
    color: #6c757d;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Grid Layout */
.sa-lunch-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Lunch Cards */
.sa-lunch-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sa-lunch-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #adb5bd;
}

/* Today vs Tomorrow Styling */
.sa-lunch-today .sa-lunch-card {
    background: #E5EEF9;
    border-color: #4a90e2;
}

.sa-lunch-today .sa-lunch-section-title {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.sa-lunch-tomorrow .sa-lunch-card {
    background: #f8f9fa;
}

/* Card Title */
.sa-lunch-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.sa-lunch-today .sa-lunch-card-title {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

/* Menu Text */
.sa-lunch-menu {
    color: #495057;
    line-height: 1.6;
    white-space: pre-line;
    font-size: 1rem;
}

.sa-lunch-menu p {
    margin-bottom: 0.5rem;
}

.sa-lunch-menu p:last-child {
    margin-bottom: 0;
}

/* Empty State */
.sa-lunch-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
    font-size: 1.125rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

/* Loading State */
.sa-lunch-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

/* School Preference Integration - Removed conflicting rules */
/* Sections are controlled by JavaScript in lunch-display.js */

/* Responsive Breakpoints */

/* Tablets (portrait) and below - 3 columns */
@media (max-width: 1024px) {
    .sa-lunch-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .lunch-days {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small tablets and large phones */
@media (max-width: 768px) {
    .lunch-week-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
    }
    
    .lunch-nav-btn {
        padding: 0.75rem 1rem;
        flex: 0 0 auto;
        min-width: 48px;
    }
    
    .lunch-nav-btn .btn-text {
        display: none;
    }
    
    .lunch-nav-btn .btn-arrow {
        display: inline;
        font-size: 1.25rem;
    }
    
    .lunch-current-week-label {
        flex: 1;
        text-align: center;
    }
    
    .sa-lunch-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .lunch-days {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sa-lunch-section-title {
        font-size: 1.25rem;
    }
    
    .sa-lunch-card-title {
        font-size: 1.125rem;
    }
    
    .sa-lunch-card {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .sa-lunch-grid {
        grid-template-columns: 1fr;
    }
    
    .lunch-days {
        grid-template-columns: 1fr;
    }
    
    .sa-lunch-display {
        margin: 1rem 0;
    }
    
    .sa-lunch-section {
        margin-bottom: 1.5rem;
    }
    
    .sa-lunch-section-title {
        font-size: 1.125rem;
    }
    
    .sa-lunch-date {
        font-size: 1rem;
    }
    
    .sa-lunch-card {
        padding: 1rem;
    }
    
    .sa-lunch-card-title {
        font-size: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .sa-lunch-menu {
        font-size: 0.9375rem;
    }
}

/* Print Styles */
@media print {
    .sa-lunch-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .sa-lunch-card:hover {
        transform: none;
    }
    
    .sa-lunch-today .sa-lunch-card {
        background: #f0f0f0;
    }
}
