/**
 * Daily Menus Tabs Styles
 * @package EligeMenu_Integration
 * @since 2.9.25
 */

/* Container */
.em-daily-menus-tabs-container {
    width: 100%;
    margin: 0 auto;
}

/* Tabs Navigation Wrapper */
.em-tabs-navigation-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

/* Tabs Navigation */
.em-tabs-navigation {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    border-bottom: 2px solid #e5e7eb;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-start !important;
}

.em-tabs-navigation::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Navigation Arrows */
.em-tabs-nav-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    color: #374151;
    transition: all 0.2s ease;
    opacity: 1;
    visibility: visible;
}

.em-tabs-nav-arrow:hover {
    color: #111827;
    background: #ffffff;
    border-color: #d1d5db;
}

/* Tab Button */
.em-tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    color: #6b7280;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.em-tab-button:hover {
    color: #111827;
    background: #f9fafb;
}

.em-tab-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.em-tab-button.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

/* Tabs Content */
.em-tabs-content {
    position: relative;
    min-height: 200px;
}

.em-tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.em-tab-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: em-fade-in 0.3s ease forwards;
}

@keyframes em-fade-in {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Daily Menu Content */
.em-daily-menu-content {
    padding: 1rem 0;
}

.em-menu-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

.em-menu-description {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
}

.em-menu-date {
    font-size: 1.125rem;
    font-weight: 600;
    color: #3b82f6;
}

/* Dish Groups */
.em-dish-groups {
    margin-top: 2rem;
}

.em-dish-group {
    margin-bottom: 2rem;
}

.em-dish-group__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.em-dish-group__description {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 1rem;
}

.em-dish-group__dishes {
    margin-top: 1rem;
}

/* Dish Item */
.em-dish-item {
    margin-bottom: 0.75rem;
}

.em-dish-item__name {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
}

.em-dish-item__description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Observations */
.em-menu-observations {
    padding: 1rem;
    background: #f9fafb;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.6;
}

/* Prices */
.em-menu-prices {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.em-menu-prices-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

/* Full Menu Price - Always centered in left half */
.em-menu-price-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    grid-column: 1;
}

/* Half Menu Price - Always centered in right half */
.em-menu-price-half {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    grid-column: 2;
}

/* When no half price exists, full price spans both columns */
.em-menu-prices-container:has(.em-menu-price-full):not(:has(.em-menu-price-half)) .em-menu-price-full {
    grid-column: 1 / -1;
}

.em-price-amount {
    display: inline-flex;
    align-items: baseline;
}

.em-price-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
}

.em-price-integer {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

.em-price-decimal {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6b7280;
}

/* No menus message */
.em-no-menus {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    font-style: italic;
}

/* Responsive - Mobile */
@media (max-width: 640px) {
    .em-tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .em-menu-name {
        font-size: 1.5rem;
    }
    
    .em-dish-group__name {
        font-size: 1.25rem;
    }
    
    .em-menu-prices {
        padding-top: 1rem;
    }
    
    .em-price-integer {
        font-size: 1.75rem;
    }
    
    .em-price-decimal {
        font-size: 1.125rem;
    }
    
    .em-tabs-nav-arrow {
        width: 32px;
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    .em-tabs-navigation {
        display: none;
    }
    
    .em-tab-panel {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        page-break-inside: avoid;
    }
    
    .em-daily-menu-content {
        page-break-inside: avoid;
    }
    
    .em-dish-group {
        page-break-inside: avoid;
    }
}
