/*
|--------------------------------------------------------------------------
| V Future Step - Global Mobile & Responsive Baseline
|--------------------------------------------------------------------------
| Load AFTER Bootstrap and project CSS.
*/

html {
    width: 100%;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

*, *::before, *::after { box-sizing: border-box; }

img, video, iframe { max-width: 100%; height: auto; }

/* Global Controls */
input, select, textarea, button {
    max-width: 100%;
    font: inherit;
    touch-action: manipulation;
}

input, textarea, select {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 44px;
    font-size: 16px !important;
    -webkit-user-select: text !important;
    user-select: text !important;
    pointer-events: auto !important;
}

/* Conflict Fix: Exclude Search Box from Global Width/Height */
.custom-search-box input, 
.custom-search-box select, 
.custom-search-box .bootstrap-select {
    width: auto !important;
    min-height: 0 !important;
}

textarea { min-height: 100px; resize: vertical; }

input:focus, textarea:focus, select:focus { outline: none; }

button, .btn, a { touch-action: manipulation; }

/* Modal Fixes */
.modal { overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 1050; }
.modal-open { overflow: hidden; }
.modal-dialog { position: relative; z-index: 1051; }
.modal-content { pointer-events: auto !important; width: 100%; border-radius: 6px; }
.modal-body { overflow: visible; padding: 15px; }

.modal input, .modal textarea, .modal select, .modal button, .modal .bootstrap-select {
    pointer-events: auto !important;
}

/* Bootstrap Select */
.bootstrap-select { width: 100% !important; }

.bootstrap-select > .dropdown-toggle {
    min-height: 44px;
    width: 100%;
    touch-action: manipulation;
}

.bootstrap-select .dropdown-menu { z-index: 1065 !important; max-width: 100%; }

.bootstrap-select .dropdown-menu.inner {
    max-height: 260px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.bootstrap-select .bs-searchbox input {
    min-height: 42px;
    font-size: 16px !important;
}

.parsley-errors-list { margin: 4px 0 0; padding: 0; list-style: none; }

/* Preloader */
#ajax-preloader {
    position: fixed; inset: 0; z-index: 200000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(255, 255, 255, 0.88); touch-action: none;
}

.ajax-preloader-content {
    width: 100%; max-width: 260px; padding: 28px 24px; text-align: center; background: #fff; border-radius: 8px; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.ajax-preloader-text { margin-top: 12px; font-size: 15px; font-weight: 600; }

/* Responsive Layouts */
@media (max-width: 767px) {
    .modal-dialog { width: auto; margin: 10px; }
    .modal .form-group { width: 100%; margin-bottom: 15px; }
    .modal .form-control, .modal .bootstrap-select > .dropdown-toggle { width: 100% !important; min-height: 44px; }
    .vfs-img-detail img { float: none !important; display: block; margin: 0 auto 15px !important; }
    .vfs-img-detail > div { width: 100%; text-align: center; }
}

/* Specific Conflict Resolution for Homepage Search */
.vfs-custom-search-section .custom-search-box {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 950px !important;
    height: 60px !important;
    margin: 20px auto 0 !important;
    padding: 5px !important;
    border: 7px solid rgba(255, 255, 255, .55) !important;
    border-radius: 50px !important;
    background: #fff !important;
}