/**
 * Correction globale de l'alignement vertical pour tous les sélecteurs Select2
 * Ce fichier corrige le problème où le texte dans .select2-selection__rendered
 * n'est pas correctement centré verticalement
 */

/* Correction pour les sélecteurs Select2 single */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    line-height: normal !important;
}

/* Assurer que le conteneur parent a une hauteur appropriée */
.select2-container--default .select2-selection--single {
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
}

/* Pour les formulaires avec style personnalisé (subform2023) */
.subform2023-form-input.select2-hidden-accessible + .select2-container .select2-selection--single {
    height: calc(1rem + 2rem + 4px) !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    background: #f8f9fa !important;
    padding: 1rem !important;
}

.subform2023-form-input.select2-hidden-accessible + .select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.subform2023-form-input.select2-hidden-accessible + .select2-container .select2-selection--single .select2-selection__arrow {
    height: calc(1rem + 2rem + 4px) !important;
    top: 0 !important;
    right: 10px !important;
}

/* Pour les wrappers de téléphone */
.phone-country-code-wrapper .select2-container .select2-selection--single .select2-selection__rendered,
.phone-input-wrapper .select2-container .select2-selection--single .select2-selection__rendered {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

/* Correction pour tous les contextes */
.select2-selection__rendered {
    display: flex !important;
    align-items: center !important;
    min-height: 100% !important;
}

/* Forcer le scroll dans les dropdowns Select2 */
.select2-dropdown {
    z-index: 9999 !important;
    overflow: hidden !important;
}

.select2-results {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.select2-results__options {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

.select2-results__option {
    cursor: pointer !important;
    white-space: nowrap !important;
}
