/* ========================================
   EASYORDER COMPONENT STYLES
   Consolidated component styles for better performance
   ======================================== */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #3B82F6;
    --primary-hover: #2563EB;
    --secondary-color: #10B981;
    --secondary-hover: #059669;
    --danger-color: #EF4444;
    --danger-hover: #DC2626;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --background-light: #F9FAFB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --border-radius: 0.5rem;
    --transition: all 0.2s ease;
}

/* Price Display Component */
.price {
    font-weight: 600;
    color: var(--text-primary);
}

.price-large {
    font-size: 1.25rem;
    font-weight: 700;
}

.price-discount {
    color: var(--secondary-color);
}

.price-old {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Delivery Info Component */
.delivery-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.delivery-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.delivery-info-item i {
    color: var(--primary-color);
}

/* Menu Item Card Component */
.menu-item-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.menu-item-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.menu-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
}

.menu-item-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.menu-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Quantity Selector Component */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    padding: 0.25rem;
}

.quantity-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    background: white;
    color: var(--text-primary);
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.quantity-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

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

.quantity-display {
    min-width: 2rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--background-light);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Modal Component Base */
.modal-base {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-base.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--background-light);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    margin: -0.75rem 0 0 -0.75rem;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-danger { color: var(--danger-color); }
.text-success { color: var(--secondary-color); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Responsive */
@media (max-width: 640px) {
    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .delivery-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .menu-item-card {
        padding: 0.75rem;
    }
}