/**
 * Booking Page Mobile Responsive Styles
 * Mobile-first approach with touch-friendly design
 */

/* Base Mobile Styles (0-480px) */
@media (max-width: 480px) {
    /* Container adjustments */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Service Grid - Stack on mobile */
    #servicesGrid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .service-card {
        margin-bottom: 0;
    }
    
    .service-card img,
    .service-card > div:first-child {
        height: 200px !important;
    }
    
    /* Form inputs - Touch friendly */
    .form-input-fashion,
    .form-group-fashion input,
    .form-group-fashion select,
    .form-group-fashion textarea {
        min-height: 48px;
        font-size: 16px; /* Prevent iOS zoom */
        padding: 0.75rem;
    }
    
    .form-group-fashion textarea {
        min-height: 120px;
    }
    
    /* Labels */
    .form-label-fashion {
        font-size: 14px;
        margin-bottom: 0.5rem;
    }
    
    /* Grid forms - Stack on mobile */
    .grid.grid-cols-2,
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    /* Payment options - Stack on mobile */
    #paymentOptionsGrid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .payment-option-card {
        padding: 1rem;
    }
    
    /* Payment method cards - Full width on mobile */
    .payment-method-cards {
        gap: 0.75rem;
    }
    
    .payment-method-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .payment-method-icon {
        width: 48px;
        height: 48px;
    }
    
    .payment-method-title {
        font-size: 1rem;
    }
    
    .payment-method-description {
        font-size: 0.8125rem;
        line-height: 1.4;
    }
    
    /* Bank info - Stack labels and values */
    .bank-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .bank-info-value {
        text-align: left;
        font-size: 1rem;
    }
    
    /* Booking summary */
    #bookingSummary {
        margin-top: 1.5rem;
        padding: 1rem;
    }
    
    #bookingSummary h3 {
        font-size: 1.25rem;
    }
    
    #summaryTotal {
        font-size: 2rem !important;
    }
    
    /* Submit button - Sticky on mobile */
    #submitBookingBtn {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 40;
        border-radius: 0;
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        font-size: 16px;
    }
    
    /* Add padding to form to prevent button overlap */
    #bookingForm {
        padding-bottom: 80px;
    }
    
    /* Card adjustments */
    .card-fashion {
        border-radius: 0.75rem;
        padding: 1rem;
    }
    
    .card-fashion-header {
        padding: 0;
        margin-bottom: 1.5rem;
    }
    
    .card-fashion-title {
        font-size: 1.5rem;
    }
    
    /* Section headers */
    h3.text-lg {
        font-size: 1.125rem !important;
    }
    
    /* Icons in labels */
    .form-label-fashion svg {
        width: 1rem;
        height: 1rem;
    }
    
    /* Manual transfer fields */
    #manualTransferFields {
        margin-top: 1rem;
    }
    
    #manualTransferFields .bg-blue-50 {
        padding: 0.75rem;
        font-size: 14px;
    }
    
    /* PayPal button container */
    #paypalButtonContainer {
        margin-top: 1rem;
        min-height: 48px;
    }
    
    /* Page title */
    h1.text-4xl,
    h1.md\\:text-5xl {
        font-size: 2rem !important;
        margin-bottom: 0.75rem;
    }
    
    /* Service price and duration */
    .service-card .price {
        font-size: 1.5rem !important;
    }
    
    .service-card .duration {
        font-size: 0.75rem;
    }
    
    /* Service description */
    .service-card p {
        font-size: 0.875rem;
        line-height: 1.4;
    }
    
    /* Service select button */
    .service-card button {
        padding: 0.625rem;
        font-size: 14px;
    }
}

/* Tablet Portrait (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    #servicesGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    
    .grid.md\\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    #paymentOptionsGrid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .form-input-fashion,
    .form-group-fashion input,
    .form-group-fashion select,
    .form-group-fashion textarea {
        font-size: 16px;
    }
}

/* Tablet Landscape (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    #servicesGrid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .container {
        max-width: 90%;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .service-card {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.1);
    }
    
    .payment-option-card {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.1);
    }
    
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .payment-option-card:hover {
        transform: none;
    }
    
    /* Active state for touch */
    .service-card:active {
        transform: scale(0.98);
    }
    
    .payment-option-card:active {
        transform: scale(0.98);
    }
    
    /* Ensure buttons are touch-friendly */
    button,
    .btn-fashion,
    .btn-secondary {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    /* Reduce vertical spacing in landscape */
    .py-12 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    #servicesGrid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .service-card img,
    .service-card > div:first-child {
        height: 150px !important;
    }
    
    h1.text-4xl,
    h1.md\\:text-5xl {
        font-size: 1.75rem !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-card img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .service-card,
    .payment-option-card,
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Print styles */
@media print {
    #submitBookingBtn,
    .service-card button {
        display: none;
    }
    
    .service-card {
        break-inside: avoid;
    }
}
