/* ==============================================
   ENHANCED MOBILE BOOKING EXPERIENCE
   Taxi Booking Website - Morocco
   Optimized for Mobile Taxi Booking
   ============================================== */

/* ==============================================
   MOBILE BOOKING QUICK ACCESS
   ============================================== */

/* Sticky Mobile Booking Bar */
@media (max-width: 768px) {
    .mobile-booking-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #f7b731 0%, #f97316 100%);
        padding: 1rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
        z-index: 100;
        display: flex;
        justify-content: center;
        transform: translateY(0);
        transition: transform 0.3s ease;
    }

    .mobile-booking-bar.hidden {
        transform: translateY(100%);
    }

    .mobile-book-now-btn {
        background: white;
        color: #f7b731;
        padding: 1rem 2rem;
        border-radius: 50px;
        font-weight: 700;
        font-size: 1.1rem;
        border: none;
        min-width: 280px;
        min-height: 56px;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-book-now-btn:hover,
    .mobile-book-now-btn:active {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    }

    /* Quick Info Cards */
    .mobile-quick-info {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin: 1rem;
        margin-bottom: 1.5rem;
    }

    .quick-info-card {
        background: rgba(247, 183, 49, 0.1);
        border: 1px solid rgba(247, 183, 49, 0.2);
        border-radius: 12px;
        padding: 1rem 0.5rem;
        text-align: center;
        transition: all 0.3s ease;
    }

    .quick-info-card:hover {
        background: rgba(247, 183, 49, 0.15);
        transform: translateY(-2px);
    }

    .quick-info-icon {
        font-size: 1.5rem;
        color: #f7b731;
        margin-bottom: 0.5rem;
    }

    .quick-info-text {
        font-size: 0.8rem;
        font-weight: 600;
        color: #2c3e50;
        line-height: 1.2;
    }

    /* Enhanced Vehicle Selection */
    .mobile-vehicle-enhanced {
        margin: 0 1rem;
    }

    .vehicle-card-mobile {
        display: flex;
        align-items: center;
        padding: 1rem;
        background: white;
        border: 2px solid #e1e8ed;
        border-radius: 16px;
        margin-bottom: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .vehicle-card-mobile::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: transparent;
        transition: background 0.3s ease;
    }

    .vehicle-card-mobile.selected::before {
        background: linear-gradient(to bottom, #f7b731, #f97316);
    }

    .vehicle-card-mobile.selected {
        border-color: #f7b731;
        background: rgba(247, 183, 49, 0.05);
        box-shadow: 0 8px 25px rgba(247, 183, 49, 0.15);
    }

    .vehicle-image-mobile {
        width: 80px;
        height: 60px;
        object-fit: contain;
        margin-right: 1rem;
        border-radius: 8px;
    }

    .vehicle-info-mobile {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .vehicle-details-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .vehicle-name-mobile {
        font-weight: 700;
        font-size: 1rem;
        color: #2c3e50;
        margin: 0;
    }

    .vehicle-capacity-mobile {
        font-size: 0.875rem;
        color: #7f8c8d;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .vehicle-price-mobile {
        font-size: 1.25rem;
        font-weight: 700;
        color: #f7b731;
        text-align: right;
    }

    .vehicle-price-mobile .currency {
        font-size: 0.9rem;
        color: #7f8c8d;
    }

    /* Enhanced Form Experience */
    .mobile-form-enhanced {
        margin: 0 1rem;
    }

    .form-step-mobile {
        background: white;
        border-radius: 16px;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(247, 183, 49, 0.1);
    }

    .form-step-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #2c3e50;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .form-step-icon {
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, #f7b731, #f97316);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }

    /* Enhanced Input Styling */
    .input-mobile-enhanced {
        position: relative;
        margin-bottom: 1.5rem;
    }

    .input-mobile-enhanced label {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #7f8c8d;
        transition: all 0.3s ease;
        pointer-events: none;
        background: white;
        padding: 0 0.5rem;
        z-index: 2;
    }

    .input-mobile-enhanced input,
    .input-mobile-enhanced textarea,
    .input-mobile-enhanced select {
        width: 100%;
        padding: 1rem;
        border: 2px solid #e1e8ed;
        border-radius: 12px;
        font-size: 1rem;
        background: white;
        transition: all 0.3s ease;
        min-height: 56px;
    }

    .input-mobile-enhanced input:focus,
    .input-mobile-enhanced textarea:focus,
    .input-mobile-enhanced select:focus,
    .input-mobile-enhanced input:not(:placeholder-shown),
    .input-mobile-enhanced textarea:not(:placeholder-shown),
    .input-mobile-enhanced select:not([value=""]) {
        border-color: #f7b731;
        box-shadow: 0 0 0 4px rgba(247, 183, 49, 0.1);
        outline: none;
    }

    .input-mobile-enhanced input:focus + label,
    .input-mobile-enhanced textarea:focus + label,
    .input-mobile-enhanced select:focus + label,
    .input-mobile-enhanced input:not(:placeholder-shown) + label,
    .input-mobile-enhanced textarea:not(:placeholder-shown) + label,
    .input-mobile-enhanced select:not([value=""]) + label {
        top: 0;
        transform: translateY(-50%);
        font-size: 0.875rem;
        color: #f7b731;
        font-weight: 600;
    }

    /* Location Selection Enhancement */
    .location-selector-mobile {
        position: relative;
    }

    .location-input-mobile {
        padding-right: 3rem !important;
    }

    .location-detect-btn {
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        background: #f7b731;
        color: white;
        border: none;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 3;
    }

    .location-detect-btn:hover {
        background: #f97316;
        transform: translateY(-50%) scale(1.1);
    }

    /* Map Enhancement for Mobile */
    .map-mobile-enhanced {
        height: 250px;
        border-radius: 16px;
        overflow: hidden;
        border: 2px solid #e1e8ed;
        margin: 1rem 0;
        position: relative;
    }

    .map-overlay-mobile {
        position: absolute;
        top: 1rem;
        left: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        padding: 1rem;
        z-index: 10;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .map-route-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .route-distance,
    .route-duration {
        font-size: 0.875rem;
        font-weight: 600;
        color: #2c3e50;
    }

    .route-price {
        font-size: 1.25rem;
        font-weight: 700;
        color: #f7b731;
    }

    /* Payment Section Enhancement */
    .payment-mobile-enhanced {
        margin: 0 1rem 6rem 1rem; /* Extra bottom margin for mobile booking bar */
    }

    .payment-summary-mobile {
        background: linear-gradient(135deg, #f7b731 0%, #f97316 100%);
        color: white;
        padding: 1.5rem;
        border-radius: 16px;
        margin-bottom: 1.5rem;
        position: relative;
        overflow: hidden;
    }

    .payment-summary-mobile::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        transform: scale(1.5);
    }

    .summary-content {
        position: relative;
        z-index: 2;
    }

    .summary-title {
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .summary-details {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .summary-row:last-child {
        border-bottom: none;
        font-weight: 700;
        font-size: 1.1rem;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
        border-top: 2px solid rgba(255, 255, 255, 0.3);
    }

    .payment-methods-mobile {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .payment-method-mobile {
        background: white;
        border: 2px solid #e1e8ed;
        border-radius: 16px;
        padding: 1.25rem;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .payment-method-mobile:hover {
        border-color: #f7b731;
        box-shadow: 0 4px 15px rgba(247, 183, 49, 0.1);
    }

    .payment-method-mobile.selected {
        border-color: #f7b731;
        background: rgba(247, 183, 49, 0.05);
    }

    .payment-icon-mobile {
        width: 48px;
        height: 48px;
        background: #f8f9fa;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: #f7b731;
    }

    .payment-info-mobile {
        flex: 1;
    }

    .payment-name-mobile {
        font-weight: 700;
        color: #2c3e50;
        margin-bottom: 0.25rem;
    }

    .payment-desc-mobile {
        font-size: 0.875rem;
        color: #7f8c8d;
    }

    /* Success/Confirmation Enhancement */
    .booking-success-mobile {
        text-align: center;
        padding: 2rem 1rem;
        background: white;
        border-radius: 16px;
        margin: 1rem;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    }

    .success-icon-mobile {
        width: 80px;
        height: 80px;
        background: linear-gradient(135deg, #27ae60, #2ecc71);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        margin: 0 auto 1.5rem;
        animation: successPulse 1s ease-in-out;
    }

    @keyframes successPulse {
        0% { transform: scale(0); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }

    .success-title-mobile {
        font-size: 1.5rem;
        font-weight: 700;
        color: #27ae60;
        margin-bottom: 0.5rem;
    }

    .success-message-mobile {
        font-size: 1rem;
        color: #7f8c8d;
        margin-bottom: 2rem;
        line-height: 1.6;
    }

    .success-actions-mobile {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .download-ticket-btn,
    .new-booking-btn {
        padding: 1rem 2rem;
        border-radius: 12px;
        font-weight: 700;
        font-size: 1.1rem;
        min-height: 56px;
        transition: all 0.3s ease;
        border: none;
        cursor: pointer;
    }

    .download-ticket-btn {
        background: linear-gradient(135deg, #f7b731, #f97316);
        color: white;
    }

    .new-booking-btn {
        background: white;
        color: #f7b731;
        border: 2px solid #f7b731;
    }

    /* Loading States */
    .mobile-loading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        text-align: center;
    }

    .loading-spinner-mobile {
        width: 60px;
        height: 60px;
        border: 4px solid #e1e8ed;
        border-left: 4px solid #f7b731;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-bottom: 1rem;
    }

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

    .loading-text-mobile {
        font-size: 1rem;
        color: #7f8c8d;
        font-weight: 600;
    }

    /* Error States */
    .mobile-error {
        background: #fee;
        border: 2px solid #ffccd5;
        border-radius: 12px;
        padding: 1rem;
        margin: 1rem;
        display: flex;
        align-items: flex-start;
        gap: 1rem;
    }

    .error-icon-mobile {
        color: #dc3545;
        font-size: 1.25rem;
        margin-top: 0.125rem;
    }

    .error-content-mobile {
        flex: 1;
    }

    .error-title-mobile {
        font-weight: 700;
        color: #dc3545;
        margin-bottom: 0.25rem;
    }

    .error-message-mobile {
        font-size: 0.875rem;
        color: #721c24;
        line-height: 1.5;
    }

    /* Swipe Gestures Enhancement */
    .swipeable-content {
        touch-action: pan-x;
        user-select: none;
    }

    /* Haptic Feedback Simulation */
    .haptic-feedback {
        transition: transform 0.1s ease;
    }

    .haptic-feedback:active {
        transform: scale(0.98);
    }

    /* Accessibility Improvements for Mobile */
    .sr-only-mobile {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* High Contrast Mode Support */
    @media (prefers-contrast: high) {
        .vehicle-card-mobile,
        .payment-method-mobile,
        .form-step-mobile {
            border-width: 3px;
        }

        .mobile-book-now-btn {
            border: 3px solid #2c3e50;
        }
    }

    /* Reduced Motion Support */
    @media (prefers-reduced-motion: reduce) {
        .loading-spinner-mobile {
            animation: none;
        }

        .success-icon-mobile {
            animation: none;
        }
    }
}

/* ==============================================
   LANDSCAPE MOBILE OPTIMIZATIONS
   ============================================== */

@media (max-width: 768px) and (orientation: landscape) {
    .mobile-booking-bar {
        padding: 0.75rem 1rem;
    }

    .mobile-book-now-btn {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .form-step-mobile {
        padding: 1rem;
    }

    .payment-summary-mobile {
        padding: 1rem;
    }

    .map-mobile-enhanced {
        height: 200px;
    }
}

/* ==============================================
   VERY SMALL SCREENS (320px and under)
   ============================================== */

@media (max-width: 320px) {
    .mobile-quick-info {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .quick-info-card {
        padding: 0.75rem;
    }

    .vehicle-card-mobile {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .vehicle-image-mobile {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    .vehicle-info-mobile {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-book-now-btn {
        min-width: 240px;
        font-size: 1rem;
    }
} 