/* تحسينات تجربة المستخدم - UX Enhancements */

/* ===== LOADING ANIMATIONS ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
    overflow: hidden;
}

.loader-logo img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.loader-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    animation: fadeInOut 2s ease-in-out infinite;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 20px auto;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    width: 0%;
    border-radius: 2px;
    animation: loadProgress 3s ease-out;
}

/* ===== PROGRESS BAR FOR BOOKINGS ===== */
.booking-progress {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.booking-progress h4 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-steps {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.step.active .step-circle {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4);
}

.step.completed .step-circle {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.step-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.step.active .step-label {
    color: #1e3c72;
    font-weight: 600;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 1px;
}

/* ===== DARK MODE ===== */
.dark-mode-toggle {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dark-mode-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Dark mode styles */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
}

.dark-mode .page-header,
.dark-mode .trip-card,
.dark-mode .booking-progress {
    background: linear-gradient(145deg, #2d2d44 0%, #1a1a2e 100%);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .detail-label {
    color: #b0b0b0;
}

.dark-mode .detail-value {
    color: #4fc3f7;
}

.dark-mode .installment-info {
    background: linear-gradient(135deg, #2a2a3e 0%, #1e1e32 100%);
    border-left-color: #4fc3f7;
}

.dark-mode .receipt-upload {
    background: linear-gradient(135deg, #3a2a2a 0%, #2a1a1a 100%);
    border-color: #ff6b6b;
}

.dark-mode .total-cost {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.dark-mode .room-booking {
    background: linear-gradient(135deg, #1a2a3a 0%, #0f1a2a 100%);
    border-color: #4fc3f7;
}

/* ===== SMOOTH ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.6s ease forwards;
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.5s ease forwards;
}

/* ===== BUTTON ENHANCEMENTS ===== */
.enhanced-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.enhanced-btn::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;
}

.enhanced-btn:hover::before {
    left: 100%;
}

.enhanced-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* ===== KEYFRAMES ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes loadProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .dark-mode-toggle {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 15px;
    }
    
    .progress-line {
        display: none;
    }
    
    .step-circle {
        width: 35px;
        height: 35px;
    }
    
    .loader-text {
        font-size: 18px;
    }
}
