/* Red Restaurant Delivery & Takeout - Frontend Styles */

:root {
    --primary-red: #d32f2f;
    --dark-red: #b71c1c;
    --background-white: #ffffff;
    --background-light: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-color: #e9ecef;
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* Order Form Error Messages */
.form-errors {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.form-errors ul {
    margin: 0;
    padding-left: 1.5rem;
}

.form-errors li {
    margin-bottom: 0.5rem;
}

/* Store Status Indicator */
.store-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.store-status.open {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.store-status.closed {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.store-status i {
    font-size: 0.8rem;
}

/* Order Modal */
.order-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-red);
}

/* Product Order Type Selector */
.product-order-type-selector {
    background: var(--background-light);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-order-type-selector label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.product-order-type-selector select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.product-order-type-selector select:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

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

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Messages */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message i {
    color: #28a745;
}

/* Order Summary Widget */
.order-summary-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    padding: 1rem;
    z-index: 1000;
    max-width: 300px;
    border: 2px solid var(--primary-red);
}

.order-summary-widget h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-red);
    font-size: 1rem;
}

.order-summary-widget .order-type {
    background: var(--primary-red);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.order-summary-widget .customer-info {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0.5rem 0;
}

.order-summary-widget .scheduled-time {
    font-weight: 600;
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .order-summary-widget {
        position: static;
        margin: 1rem;
        max-width: none;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Animation for form sections */
.form-section {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Order Type Specific Styles */
.order-type.delivery {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.order-type.takeout {
    background: #ffc107;
    color: #212529;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Enhanced Button Styles */
.btn-secondary {
    background: var(--text-light);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: var(--primary-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Disabled Button State */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Form Validation States */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.form-group.success input,
.form-group.success textarea,
.form-group.success select {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.field-success {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Progress Indicator */
.order-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.active .step-icon {
    background: var(--primary-red);
    color: white;
}

.progress-step.completed .step-icon {
    background: #28a745;
    color: white;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    z-index: 2;
    position: relative;
}

.step-label {
    font-size: 0.875rem;
    text-align: center;
    color: var(--text-light);
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: var(--text-dark);
    font-weight: 600;
} 