/* ==========================================
   MENU & INVENTORY STEP - REDESIGNED
   Matching EventInformationStep Style
   ========================================== */

/* Container & Layout */
.menu-container {
    margin: 0 auto;
    padding: 1rem;
}

.menu-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.menu-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.menu-header-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Section Cards */
.menu-section-card {
    background: white;
    border-radius: 0.625rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.25rem;
    border: 1px solid #e5e7eb;
}

.menu-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Elements */
.menu-form-group {
    margin-bottom: 1rem;
}

.menu-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 0.375rem;
}

.menu-required {
    color: #dc2626;
    font-weight: 700;
}

.menu-select,
.menu-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #111827;
    background: white;
    transition: all 0.2s;
}

.menu-select:focus,
.menu-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Venue Details */
.menu-venue-details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.menu-venue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.menu-venue-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.menu-capacity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.menu-over-capacity {
    background: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
}

.menu-venue-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.menu-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.menu-info-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #374151;
}

.menu-info-item i {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Menu Package Details */
.menu-package-details {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.5rem;
}

.menu-package-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.menu-detail-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-detail-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.menu-detail-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
}

.menu-package-description {
    font-size: 0.8125rem;
    color: #78350f;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.menu-included-items {
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    color: #374151;
    line-height: 1.5;
}

.menu-included-items strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #111827;
    font-size: 0.8125rem;
}

.menu-muted {
    color: #9ca3af;
    font-style: italic;
}

/* Service Description */
.menu-service-description {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: 0.375rem;
    margin-top: 0.75rem;
}

.menu-service-description i {
    color: #3b82f6;
    font-size: 1rem;
    flex-shrink: 0;
}

.menu-service-description span {
    font-size: 0.75rem;
    color: #1e40af;
    line-height: 1.5;
}

/* Search & Filters */
.menu-search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.menu-btn-icon {
    padding: 0.625rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    color: #6b7280;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-btn-icon:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.menu-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.menu-filter-btn {
    padding: 0.5rem 0.875rem;
    background: white;
    border: 1px solid #d1d5db;
    color: #6b7280;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.menu-filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.menu-filter-btn.menu-active,
.menu-filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Inventory Grid */
.menu-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.menu-item-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
}

.menu-item-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.menu-item-card.menu-selected {
    border-color: #10b981;
    background: #f0fdf4;
}

.menu-item-card.menu-included {
    border-left: 3px solid #10b981;
    background: #f0fdf4;
}

.menu-item-header {
    display: flex;
    gap: 0.75rem;
}

.menu-checkbox {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: #10b981;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.menu-item-info {
    flex: 1;
}

.menu-item-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    flex-wrap: wrap;
}

.menu-item-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
}

.menu-item-code {
    font-size: 0.6875rem;
    color: #6b7280;
    font-family: monospace;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.menu-item-unit-cost {
    font-size: 0.6875rem;
    color: #f59e0b;
    font-weight: 600;
}

.menu-item-tag,
.menu-consumable,
.menu-consumable-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: #fee2e2;
    border: 1px solid #dc2626;
    color: #991b1b;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
}

.menu-item-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* Badges */
.menu-badge,
.menu-badge-included,
.menu-badge-included-sm,
.menu-badge-additional,
.menu-badge-additional-sm,
.menu-badge-primary,
.menu-badge-primary-sm,
.menu-badge-quantity {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.menu-badge-included,
.menu-badge-included-sm {
    background: #10b981;
    color: white;
}

.menu-badge-additional,
.menu-badge-additional-sm {
    background: #f59e0b;
    color: white;
}

.menu-badge-primary,
.menu-badge-primary-sm {
    background: #fbbf24;
    color: #78350f;
}

.menu-badge-quantity {
    background: #3b82f6;
    color: white;
}

/* Item Actions */
.menu-item-price-section {
    flex-shrink: 0;
}

.menu-btn-view {
    padding: 0.375rem 0.5rem;
    background: white;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.menu-btn-view:hover {
    background: #3b82f6;
    color: white;
}

/* Quantity Controls */
.menu-quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.menu-qty-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

.menu-qty-btn {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #d1d5db;
    color: #6b7280;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-qty-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.menu-qty-input {
    width: 4rem;
    padding: 0.375rem;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.menu-qty-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Selected Items Summary */
.menu-selected-summary {
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: 0.625rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.menu-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #d1fae5;
}

.menu-summary-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.menu-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #10b981;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.menu-selected-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.menu-selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    gap: 0.75rem;
}

.menu-selected-item.menu-item-included {
    border-left: 3px solid #10b981;
    background: #f0fdf4;
}

.menu-selected-item.menu-item-additional {
    border-left: 3px solid #f59e0b;
    background: #fef3c7;
}

.menu-item-details {
    flex: 1;
}

.menu-selected-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.375rem;
}

.menu-selected-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.menu-item-qty {
    font-weight: 600;
    background: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    color: #374151;
}

.menu-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-included-price {
    color: #10b981;
    font-weight: 600;
    font-size: 0.8125rem;
}

.menu-additional-price {
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.8125rem;
}

.menu-btn-remove {
    padding: 0.375rem 0.5rem;
    background: #fee2e2;
    border: 1px solid #dc2626;
    color: #991b1b;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.menu-btn-remove:hover {
    background: #dc2626;
    color: white;
}

/* Outsourced Services */
.menu-outsourced-form {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.menu-outsourced-field {
    flex: 1;
}

.menu-outsourced-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
    display: block;
}

.menu-btn-add {
    padding: 0.625rem 1rem;
    background: #10b981;
    border: 1px solid #10b981;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.menu-btn-add:hover {
    background: #059669;
    transform: translateY(-1px);
}

.menu-outsourced-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.menu-outsourced-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem;
    background: white;
    border: 1px solid #3b82f6;
    border-radius: 0.5rem;
    gap: 0.75rem;
}

/* Modal */
.menu-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: 1rem;
}

.menu-modal {
    background: white;
    border-radius: 0.625rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.menu-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
}

.menu-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.menu-modal-close {
    padding: 0.375rem 0.5rem;
    background: white;
    border: 1px solid #d1d5db;
    color: #6b7280;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.menu-modal-close:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.menu-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}

.menu-item-detail-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.menu-item-detail-row:last-child {
    border-bottom: none;
}

.menu-detail-text {
    font-size: 0.875rem;
    color: #111827;
    line-height: 1.5;
}

.menu-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.menu-status-badge.menu-status-success {
    background: #d1fae5;
    color: #065f46;
}

.menu-status-badge.menu-status-warning {
    background: #fef3c7;
    color: #92400e;
}

.menu-status-badge.menu-status-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Loading & Empty States */
.menu-loading,
.menu-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    color: #6b7280;
    text-align: center;
}

.menu-loading i,
.menu-no-results > i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.menu-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-container {
        padding: 0.75rem;
    }

    .menu-inventory-grid {
        grid-template-columns: 1fr;
    }

    .menu-outsourced-form {
        flex-direction: column;
    }

    .menu-outsourced-list {
        grid-template-columns: 1fr;
    }

    .menu-selected-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-item-detail-row {
        grid-template-columns: 1fr;
    }
}

/* ============ STOCK AVAILABILITY STYLES ============ */
.menu-stock-warning {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #92400e;
}

.menu-stock-warning i {
    color: #f59e0b;
    flex-shrink: 0;
}

.menu-stock-ok {
    background: #d1fae5;
    color: #065f46;
}

.menu-stock-low {
    background: #fef3c7;
    color: #92400e;
}

.menu-stock-out {
    background: #fee2e2;
    color: #991b1b;
}

.menu-item-tag.menu-stock-ok i,
.menu-item-tag.menu-stock-low i,
.menu-item-tag.menu-stock-out i {
    margin-right: 0.25rem;
}

/* ============ IMPROVED MODAL & IMAGE STYLES ============ */
.menu-modal-large {
    max-width: 900px;
}

.menu-item-image {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    margin: 0 auto 1.5rem;
    background: #f3f4f6;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-item-image:hover img {
    transform: scale(1.05);
}

.menu-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.menu-item-image:hover .menu-image-overlay {
    opacity: 1;
}

.menu-image-overlay i {
    color: white;
    font-size: 2rem;
}

.menu-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    max-width: 400px;
    margin: 0 auto 1.5rem;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    color: #9ca3af;
    padding: 2rem;
}

.menu-no-image i {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.menu-no-image span {
    font-size: 0.875rem;
    font-weight: 500;
}

.menu-item-details {
    margin-top: 1rem;
}

/* ============ IMAGE LIGHTBOX ============ */
.menu-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

.menu-lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
}

.menu-lightbox-content img {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.menu-lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.menu-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============ IMAGE MODE STYLES ============ */
.menu-btn-icon.menu-active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.menu-item-card.menu-with-image {
    flex-direction: column;
}

.menu-item-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: 0.5rem 0.5rem 0 0;
    margin: -0.75rem -0.75rem 0.75rem -0.75rem;
}

.menu-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-item-card:hover .menu-item-thumbnail img {
    transform: scale(1.05);
}

.menu-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 2rem;
}
