/* Mobile Zoom Prevention Styles */

/* Prevent zoom on all input fields by ensuring 16px minimum font size */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[type="week"],
select,
textarea {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Ensure proper sizing on smaller screens */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="url"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    select,
    textarea {
        font-size: 16px !important;
        /* Prevent iOS from zooming on focus */
        transform: scale(1);
        -webkit-transform: scale(1);
    }
    
    /* Maintain visual consistency by scaling down if needed */
    .input-group input {
        font-size: 16px !important;
        /* If you want smaller visual appearance, use transform */
        /* transform: scale(0.9375); /* 15px visual size */
        /* transform-origin: left center; */
    }
}

/* Prevent double-tap zoom */
html {
    touch-action: manipulation;
}

/* Prevent zooming on all interactive elements */
button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

/* Disable user selection which can sometimes trigger zoom */
.auth-container {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection only in input fields */
input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Prevent pinch zoom on the entire page */
body {
    touch-action: pan-x pan-y;
    overflow-x: hidden;
}

/* Additional iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS only */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
    
    /* Prevent zoom on focus */
    input:focus,
    textarea:focus,
    select:focus {
        font-size: 16px !important;
        zoom: 1;
    }
}

/* Fix for specific input types that might still cause issues */
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[type="week"] {
    min-height: 2.5em;
    font-size: 16px !important;
}

/* Ensure placeholders are also 16px */
::-webkit-input-placeholder {
    font-size: 16px !important;
}
::-moz-placeholder {
    font-size: 16px !important;
}
:-ms-input-placeholder {
    font-size: 16px !important;
}
:-moz-placeholder {
    font-size: 16px !important;
}
::placeholder {
    font-size: 16px !important;
}

/* Maintain visual hierarchy with proper spacing instead of font size */
@media screen and (max-width: 768px) {
    .input-group {
        margin-bottom: 20px;
    }
    
    .input-group input {
        padding: 14px 16px;
        height: 48px;
        line-height: 1.25;
    }
    
    .input-group label {
        font-size: 12px;
    }
}

/* Prevent zoom on double-tap for all clickable elements */
* {
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

/* Ensure smooth scrolling without zoom interference */
.wizard-content,
.auth-form-container,
.form-container {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}