/* Advanced Menu Builder Styles */

.menu-builder {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.menu-section-card {
    background: var(--white);
    border: 2px solid var(--light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.menu-section-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.menu-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light);
    color: var(--dark);
    font-size: 1.125rem;
    font-weight: 600;
}

.menu-section-title i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Menu Sections Container */
#menu-sections-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.menu-section-item {
    background: var(--light);
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.menu-section-item:hover {
    border-color: var(--primary-color);
}

.menu-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    cursor: move;
}

.section-handle {
    cursor: grab;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.section-handle:hover {
    opacity: 1;
}

.section-handle:active {
    cursor: grabbing;
}

.section-title-display {
    flex: 1;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
}

.menu-section-body {
    padding: 1.5rem;
}

/* Menu Items Container */
.menu-items-container {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.menu-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-light);
}

.menu-items-header h6 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-light);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Menu Item */
.menu-item {
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.menu-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.menu-item:last-child {
    margin-bottom: 0;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.item-number {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.icon-btn-sm {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.icon-btn-sm:hover {
    background: var(--danger-color);
    color: white;
}

/* Price Input Group */
.price-input-group {
    display: flex;
    gap: 0.5rem;
}

.currency-select {
    flex: 0 0 100px;
}

.price-input-group input {
    flex: 1;
}

/* Item Image Preview */
.item-image-preview {
    margin: 1rem 0;
    text-align: center;
}

.item-image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Advanced Options */
.advanced-item-options {
    margin-top: 1rem;
    border-top: 1px dashed var(--gray-light);
    padding-top: 1rem;
}

.advanced-item-options details {
    cursor: pointer;
}

.advanced-item-options summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    list-style: none;
}

.advanced-item-options summary::-webkit-details-marker {
    display: none;
}

.advanced-item-options summary::before {
    content: '▶';
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.advanced-item-options details[open] summary::before {
    transform: rotate(90deg);
}

.advanced-item-options summary:hover {
    background: var(--light);
}

.advanced-options-content {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Dietary Checkboxes */
.dietary-checkboxes,
.item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-label-sm {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.checkbox-label-sm:hover {
    border-color: var(--primary-color);
    background: var(--light);
}

.checkbox-label-sm input[type="checkbox"] {
    margin: 0;
}

.checkbox-label-sm span {
    white-space: nowrap;
}

/* Special Features Grid */
.special-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.special-features-grid .checkbox-label {
    background: white;
    padding: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.special-features-grid .checkbox-label:hover {
    border-color: var(--primary-color);
    background: var(--light);
}

.special-features-grid .checkbox-label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Image Preview */
.image-preview {
    position: relative;
    margin-top: 1rem;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Button Styles */
.btn-outline-primary {
    background: white;
    border: 2px dashed var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-outline-secondary {
    background: white;
    border: 2px solid var(--gray);
    color: var(--gray);
}

.btn-outline-secondary:hover {
    background: var(--gray);
    color: white;
    border-color: var(--gray);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-section-card {
        padding: 1rem;
    }
    
    .menu-section-header {
        padding: 0.75rem 1rem;
    }
    
    .menu-section-body {
        padding: 1rem;
    }
    
    .special-features-grid {
        grid-template-columns: 1fr;
    }
    
    .dietary-checkboxes,
    .item-badges {
        flex-direction: column;
    }
    
    .price-input-group {
        flex-direction: column;
    }
    
    .currency-select {
        flex: 1;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-section-item,
.menu-item {
    animation: slideIn 0.3s ease;
}
