/* combo-modal.css - Стили модального окна комбо-блюд с CSS переменными */
.combo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.combo-modal-content {
    background: var(--modal-bg-color, #ffffff);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

.combo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color, #f0f0f0);
}

.combo-modal-title {
    font-size: 1.6em;
    font-weight: bold;
    color: var(--modal-title-text-color, #2c3e50);
    margin: 0;
}

.combo-modal-close {
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: var(--text-secondary, #999);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.combo-modal-close:hover {
    background: var(--hover-light, #f0f0f0);
    color: var(--text-primary, #333);
}

/* Группы комбо-элементов */
.combo-group {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--order-fields-bg-color, #f8f9fa);
    border-radius: 10px;
    border: 1px solid var(--border-light, #e9ecef);
    transition: all 0.3s ease;
}

.combo-group.required {
    border-left: 4px solid var(--error-color, #dc3545);
}

.combo-group.not-satisfied {
    background: var(--error-bg-light, #fff5f5);
    border-color: var(--error-border-light, #fed7d7);
}

.combo-group.error {
    background: var(--error-bg-light, #fff5f5);
    border-color: var(--error-color, #fc8181);
    animation: shake 0.5s ease;
}

.combo-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light, #dee2e6);
}

.combo-group-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0;
    color: var(--modal-title-text-color, #2c3e50);
    display: flex;
    align-items: center;
    gap: 8px;
}

.combo-group-limit {
    font-size: 0.9em;
    color: var(--text-secondary, #6c757d);
    background: var(--order-fields-bg-color, #e9ecef);
    padding: 4px 8px;
    border-radius: 12px;
}

.combo-group-limit.reached {
    background: var(--error-color, #dc3545);
    color: var(--confirm-btn-text-color, #ffffff);
}

.combo-required-hint {
    font-size: 0.85em;
    color: var(--error-color, #e53e3e);
    font-weight: normal;
    background: var(--error-bg-light, #fed7d7);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.combo-elements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.combo-element {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--modal-bg-color, #ffffff);
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-light, #dee2e6);
    transition: all 0.2s ease;
}

.combo-element:hover {
    border-color: var(--accent-color, #4CAF50);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.combo-element-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.combo-element-name {
    font-weight: 500;
    color: var(--text-primary, #333);
    font-size: 1.05em;
}

.combo-element-price {
    font-size: 0.95em;
    color: var(--success-color, #28a745);
    font-weight: bold;
}

.combo-element-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color, #ddd);
    background: var(--modal-bg-color, #ffffff);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-primary, #333);
    transition: all 0.2s ease;
}

.quantity-btn:hover:not(:disabled) {
    background: var(--accent-color, #4CAF50);
    border-color: var(--accent-color, #4CAF50);
    color: var(--confirm-btn-text-color, #ffffff);
}

.quantity-btn:disabled {
    background: var(--order-fields-bg-color, #f8f9fa);
    border-color: var(--border-light, #e9ecef);
    color: var(--text-disabled, #adb5bd);
    cursor: not-allowed;
}

.combo-quantity {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    color: var(--text-primary, #333);
    font-size: 1em;
}

.combo-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color, #f0f0f0);
}

.combo-confirm-btn,
.combo-cancel-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.combo-confirm-btn {
    background: var(--confirm-btn-bg-color, #4CAF50);
    color: var(--confirm-btn-text-color, #ffffff);
}

.combo-confirm-btn:hover:not(:disabled) {
    background: var(--success-hover, #45a049);
}

.combo-confirm-btn:disabled {
    background: var(--cancel-btn-bg-color, #6c757d);
    cursor: not-allowed;
    opacity: 0.6;
}

.combo-cancel-btn {
    background: var(--cancel-btn-bg-color, #6c757d);
    color: var(--cancel-btn-text-color, #ffffff);
}

.combo-cancel-btn:hover {
    background: var(--cancel-hover, #5a6268);
}

/* Анимации */
@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Адаптивность */
@media (max-width: 576px) {
    .combo-modal-content {
        padding: 20px;
        margin: 10px;
    }

    .combo-modal-buttons {
        flex-direction: column;
    }

    .combo-element {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .combo-element-controls {
        margin-left: 0;
        align-self: flex-end;
    }

    .combo-group {
        padding: 15px;
    }

    .combo-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .combo-group-title {
        font-size: 1.1em;
    }
}

/* Стили для модального окна модификаторов комбо-элементов */
.combo-element-modifiers-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.combo-element-modifiers-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.combo-element-modifiers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: var(--combo-bg-color, #f8fff8);
}

.combo-element-modifiers-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.combo-element-modifiers-header h3 {
    margin: 0;
    color: var(--modal-title-text-color, #2c3e50);
}

.combo-element-modifiers-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.combo-element-modifiers-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.modifier-group {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--combo-modifier-border, #c8e6c9);
    border-radius: 8px;
    background: white;
}

.modifier-group h4 {
    margin: 0 0 10px 0;
    color: var(--modal-title-text-color, #2c3e50);
}

.modifier-requirement {
    font-size: 0.9em;
    color: #666;
    margin: 5px 0;
    font-style: italic;
}

.modifier-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modifier-option {
    display: flex;
    align-items: center;
}

.modifier-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

.modifier-option input {
    margin-right: 10px;
}

.combo-element-modifiers-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.modifier-total-price {
    font-weight: bold;
    color: var(--price-color, #ff6b35);
}

.confirm-modifiers-btn,
.cancel-modifiers-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.confirm-modifiers-btn {
    background: var(--confirm-btn-bg-color, #4CAF50);
    color: var(--confirm-btn-text-color, #ffffff);
}

.cancel-modifiers-btn {
    background: var(--cancel-btn-bg-color, #6c757d);
    color: var(--cancel-btn-text-color, #ffffff);
}