/* Mobile Optimization Styles */

/* Prevent iOS zoom on input focus - inputs must be at least 16px */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    font-size: 16px !important;
    -webkit-appearance: none;
    appearance: none;
}

/* Improve touch targets - minimum 44x44px recommended */
button,
.sc_button,
.picker-btn,
input[type="submit"],
input[type="button"] {
    min-height: 44px !important;
    min-width: 44px !important;
    touch-action: manipulation;
}

/* Checkbox and radio button touch targets */
input[type="checkbox"],
input[type="radio"] {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    margin: 0.5em 0.75em 0.5em 0 !important;
    touch-action: manipulation;
}

/* Label touch targets - make entire label clickable */
label {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* Pre-retreat days container - improve mobile touch targets */
#pre_retreat_days_container label {
    min-height: 48px !important;
    padding: 12px !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(33, 150, 243, 0.2);
}

#pre_retreat_days_container label input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    margin-right: 12px !important;
}

/* Custom date picker - improve mobile touch targets */
.custom-datepicker-trigger {
    min-height: 48px !important;
    font-size: 16px !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.picker-item {
    min-height: 48px !important;
    padding: 14px !important;
    font-size: 16px !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(33, 150, 243, 0.2);
}

.picker-btn {
    min-height: 48px !important;
    font-size: 16px !important;
    touch-action: manipulation;
}

/* Select elements - improve mobile appearance */
select {
    padding: 12px 15px !important;
    min-height: 48px !important;
    touch-action: manipulation;
}

/* Form inputs - improve spacing and touch targets */
.sc_form_item input[type="text"],
.sc_form_item input[type="email"],
.sc_form_item input[type="tel"],
.sc_form_item input[type="date"],
.sc_form_item select {
    padding: 12px 15px !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
}

/* Remove double-tap zoom delay on interactive elements */
a,
button,
input,
select,
textarea,
label {
    touch-action: manipulation;
}

/* Improve scrolling performance */
.custom-datepicker-body,
.picker-column-content {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    /* Ensure form inputs are easily tappable */
    .sc_form_item input,
    .sc_form_item select,
    .sc_form_item textarea {
        width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Improve button visibility on mobile */
    .sc_button {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
    }
    
    /* Custom date picker mobile adjustments */
    .custom-datepicker-container {
        width: 95% !important;
        max-height: 70vh !important;
    }
    
    .custom-datepicker-body {
        height: 220px !important;
    }
    
    .picker-item {
        font-size: 16px !important;
        padding: 16px !important;
        min-height: 50px !important;
    }
    
    /* Pre-retreat days - single column on mobile */
    #pre_retreat_days_container {
        grid-template-columns: 1fr !important;
    }
    
    #pre_retreat_days_container label {
        min-height: 56px !important;
        padding: 14px !important;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .picker-item {
        font-size: 15px !important;
        padding: 10px !important;
    }
    
    .custom-datepicker-container {
        max-height: 60vh !important;
    }
    
    .custom-datepicker-body {
        height: 200px !important;
    }
}
