/* Inline Food Selector - Single Line Flow Design */

.inline-food-selector-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Main selection flow line */
.inline-selection-flow {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.meal-selector-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.flow-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.flow-arrow {
    color: #6c757d;
    font-size: 1.25rem;
    margin: 0 0.5rem;
}

.inline-meal-select {
    width: auto;
    min-width: 100px;
    max-width: 150px;
    border: 2px solid #dee2e6;
    background: white;
    font-weight: 500;
}

.inline-meal-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

/* Food selection bar */
.inline-food-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex: 1;
}

.inline-food-search {
    flex: 1;
}

.inline-food-search .select2-container {
    width: 100% !important;
}

.inline-food-search .select2-selection {
    min-height: 38px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    transition: border-color 0.15s ease;
}

.inline-food-search .select2-selection:focus,
.inline-food-search .select2-container--focus .select2-selection {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.inline-food-search .select2-selection__rendered {
    padding: 0.375rem 0.75rem;
    color: #495057;
}

.inline-food-search .select2-search__field {
    padding: 0 !important;
    margin: 0 !important;
}

.inline-food-search .select2-selection__choice {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 2px 8px;
    margin: 2px;
    color: #0056b3;
    font-size: 0.875rem;
}

.inline-food-search .select2-selection__choice__remove {
    color: #0056b3;
    margin-right: 4px;
}

.inline-calculate-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.inline-calculate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inline-calculate-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .inline-selection-flow {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .meal-selector-group {
        width: 100%;
    }
    
    .inline-meal-select {
        flex: 1;
        max-width: none;
    }
    
    .flow-arrow {
        display: none;
    }
    
    .inline-food-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .inline-calculate-btn {
        width: 100%;
    }
    
    .custom-foods-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .custom-food-create-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .inline-food-selector-container {
        padding: 0.75rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .custom-foods-chips {
        justify-content: center;
    }
    
    .chips-label {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* Custom Foods Row */
.custom-foods-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.custom-food-create-btn {
    white-space: nowrap;
    font-size: 0.813rem;
    padding: 0.375rem 0.75rem;
}

.custom-foods-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
}

.chips-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    margin-right: 0.25rem;
}

.custom-food-chip {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 16px;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #856404;
    font-weight: 500;
    line-height: 1;
}

.custom-food-chip:hover {
    background: #ffc107;
    color: white;
    transform: scale(1.05);
}

.more-indicator {
    font-size: 0.75rem;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Separation from meal cards */
.meals-container {
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}