/* نظام الحجز الجديد - تنسيقات CSS */

/* Modal Styles */
#booking-modal {
    backdrop-filter: blur(5px);
}

#booking-modal .bg-white {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Step Content */
.step-content {
    min-height: 350px;
    transition: all 0.3s ease;
}

/* Date Selector */
.date-selector {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.date-selector:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.date-selector.selected {
    background: linear-gradient(135deg, #f97316, #ea580c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.date-selector:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Time Selector */
.time-selector {
    transition: all 0.2s ease;
    position: relative;
}

.time-selector:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.time-selector.selected {
    background: linear-gradient(135deg, #f97316, #ea580c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.time-selector:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

/* Branch Selector */
.branch-selector {
    transition: all 0.2s ease;
    cursor: pointer;
}

.branch-selector:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.branch-selector.selected {
    border-color: #f97316;
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    transform: translateY(-1px);
}

/* Quantity Controls */
.qty-decrease, .qty-increase {
    transition: all 0.2s ease;
}

.qty-decrease:hover {
    background: #d1d5db;
    transform: scale(1.1);
}

.qty-increase:hover {
    background: #ea580c;
    transform: scale(1.1);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Progress Bar Animation */
#progress-bar {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast Notifications */
#toast-container .toast {
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navigation Buttons */
.btn-next, .btn-back {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-back:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

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

/* Booking Buttons */
.btn-book-offer {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-book-offer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-book-offer:hover::before {
    left: 100%;
}

.btn-book-offer:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

.btn-book-offer:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Summary Section */
.booking-summary {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
}

.summary-item {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

.summary-item:hover {
    background: rgba(249, 115, 22, 0.05);
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 600;
    background: linear-gradient(135deg, #fed7aa, #fdba74);
    margin: 0 -16px -16px -16px;
    padding: 16px;
}

/* Responsive Design */
@media (max-width: 640px) {
    #booking-modal .bg-white {
        margin: 1rem;
        border-radius: 1rem;
    }
    
    .step-content {
        min-height: 300px;
    }
    
    .grid-cols-7 {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #booking-modal .bg-white {
        background: #1f2937;
        color: white;
    }
    
    .step-content {
        background: #1f2937;
    }
    
    .date-selector, .time-selector {
        background: #374151;
        border-color: #4b5563;
        color: white;
    }
    
    .date-selector:hover, .time-selector:hover {
        background: #4b5563;
    }
}

/* Custom Scrollbar */
.step-content::-webkit-scrollbar {
    width: 6px;
}

.step-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.step-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.step-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Accessibility */
.btn-book-offer:focus,
.date-selector:focus,
.time-selector:focus,
.btn-next:focus,
.btn-back:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f97316;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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