/* Accordion стили */
.week-accordion {
    margin-bottom: 2rem;
}

.accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-input {
    display: none;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
}

/* Контейнер для правой части (индикатор + иконка) */
.accordion-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Левый блок (дата и день) */
.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0; /* Для корректной работы text-overflow */
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-input:checked + .accordion-header {
    background: #e3f2fd;
    border-bottom: 1px solid #bbdefb;
}

.accordion-input:checked + .accordion-header .accordion-icon {
    transform: rotate(180deg);
}

.day-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #2c3e50;
}

.day-date {
    color: #666;
    font-size: 0.9rem;
    background: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: #6c757d;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.accordion-input:checked ~ .accordion-content {
    max-height: 5000px; /* Большое значение для плавного раскрытия */
}

.day-menu {
    padding: 1.5rem;
}

/* Стили для секций меню */
.menu-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.menu-section:last-child {
    border-bottom: none;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.25rem;
}

.section-title i {
    color: #3498db;
}

.section-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    margin-left: 0.5rem;
    font-weight: normal;
}

/* Сетка блюд */
.dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Карточка блюда */
.dish-card {
    position: relative;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.dish-card:hover {
    border-color: #bbdefb;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.dish-radio {
    display: none;
}

.dish-radio:checked + .dish-label {
    border-color: #4CAF50;
    background: #f8fdf8;
}

.dish-radio:checked + .dish-label .dish-select {
    opacity: 1;
    transform: scale(1);
}

.dish-label {
    display: block;
    cursor: pointer;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.salad-single .dish-label {
    cursor: default;
}

.dish-image {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.dish-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dish-label:hover .dish-image img {
    transform: scale(1.05);
}

.dish-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 3rem;
}

.dish-info {
    flex: 1;
}

.dish-title {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.dish-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dish-nutrition {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #27ae60;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    background: #f0f9f0;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.dish-select {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.dish-select i {
    font-size: 0.875rem;
}

/* Опции дня */
.day-options {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-group.full-width {
    grid-column: 1 / -1;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.option-label:hover {
    background: #e9ecef;
}

.option-checkbox, .skip-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.note-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    margin-top: 0.5rem;
}

.note-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Секция заказчика */
.customer-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.customer-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Кнопка отправки */
.submit-section {
    text-align: center;
    margin: 3rem 0;
}

.btn-submit {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.submit-hint {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Сообщение об отсутствии меню */
.no-menu {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-menu i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

/* Информация о неделе */
.week-info {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.week-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #2980b9;
}

.nav-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.week-range {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
    min-width: 200px;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .dishes-grid {
        grid-template-columns: 1fr;
    }
    
    .accordion-header {
        padding: 1rem;
    }
    
    .week-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .week-range {
        order: -1;
        width: 100%;
    }
    
    .submit-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .dish-label {
        padding: 1rem;
    }
    
    .day-menu {
        padding: 1rem;
    }
}

/* Доб accordion.css */
.menu-section.error {
    border: 2px solid #e74c3c !important;
    border-radius: 8px;
    padding: 10px;
    background: #fff5f5;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-message-text {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message-text i {
    font-size: 1rem;
}

/* accordion.css добав: */

/* Стили для индикатора дня */
.day-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 15px;
    font-size: 0.85rem;
    color: #666;
    transition: all 0.3s ease;
}

/* Кружок индикатора */
.indicator-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Цвета индикаторов */
.day-indicator.empty .indicator-circle { background: #ccc; }
.day-indicator.partial .indicator-circle { background: #ffc107; }
.day-indicator.complete .indicator-circle { background: #28a745; }
.day-indicator.skipped .indicator-circle { background: #6c757d; }

/* Текст индикатора */
.indicator-text {
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Скрываем текст на очень маленьких экранах */
@media (max-width: 480px) {
    .indicator-text {
        display: none;
    }
    .day-indicator {
        margin-right: 10px;
    }
}

/* RTL стили для индикатора */
[dir="rtl"] .day-indicator {
    margin-right: 0;
    margin-left: 15px;
    flex-direction: row-reverse;
}

[dir="rtl"] .day-indicator.empty .indicator-circle { background: #ccc; }
[dir="rtl"] .day-indicator.partial .indicator-circle { background: #ffc107; }
[dir="rtl"] .day-indicator.complete .indicator-circle { background: #28a745; }
[dir="rtl"] .day-indicator.skipped .indicator-circle { background: #6c757d; }

/* Адаптивность для индикатора */
@media (max-width: 768px) {
    .day-indicator {
        font-size: 0.8rem;
    }
    .indicator-circle {
        width: 10px;
        height: 10px;
    }
}
/* Контейнер для правой части заголовка аккордеона */
.accordion-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 200px; /* Минимальная ширина для правой части */
    justify-content: flex-end;
}

/* Контейнер для индикатора */
.indicator-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 140px; /* Фиксированная минимальная ширина */
    max-width: 160px; /* Максимальная ширина */
}

/* Стили для индикатора дня */
.day-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 20px;
    
    min-width: 120px;
    max-width: 140px;
    transition: all 0.3s ease;
}

/* Кружок индикатора */
.indicator-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    display: block;
}

/* Текст индикатора */
.indicator-text {
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    text-align: center;
    flex-grow: 1;
}

/* Цвета индикаторов */
.day-indicator.empty .indicator-circle { background: #ccc; }
.day-indicator.empty .indicator-text { color: #777; }

.day-indicator.partial .indicator-circle { background: #ffc107; }
.day-indicator.partial .indicator-text { color: #e6a700; }

.day-indicator.complete .indicator-circle { background: #28a745; }
.day-indicator.complete .indicator-text { color: #1e7e34; }

.day-indicator.skipped .indicator-circle { background: #6c757d; }
.day-indicator.skipped .indicator-text { color: #495057; }

/* Иконка аккордеона */
.accordion-icon {
    transition: transform 0.3s ease;
    color: #6c757d;
    font-size: 1.1rem;
    flex-shrink: 0;
    min-width: 20px;
}

/* RTL стили для индикатора */
[dir="rtl"] .accordion-header-right {
    justify-content: flex-start;
}

[dir="rtl"] .indicator-container {
    justify-content: flex-start;
}

[dir="rtl"] .indicator-text {
    text-align: right;
}

/* Адаптивность для индикатора */
@media (max-width: 768px) {
    .accordion-header-right {
        gap: 15px;
        min-width: 160px;
    }
    
    .indicator-container {
        min-width: 110px;
        max-width: 130px;
    }
    
    .day-indicator {
        min-width: 100px;
        max-width: 120px;
        gap: 6px;
        padding: 3px 6px;
    }
    
    .indicator-text {
        font-size: 0.8rem;
        max-width: 75px;
    }
    
    .accordion-icon {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .accordion-header-right {
        gap: 10px;
        min-width: auto;
    }
    
    .indicator-container {
        min-width: auto;
        max-width: none;
    }
    
    .day-indicator {
        min-width: auto;
        max-width: none;
        padding: 2px 4px;
        background: transparent;
        box-shadow: none;
    }
    
    .indicator-text {
        display: none; /* На очень маленьких экранах скрываем текст */
    }
}