﻿/*CSS VALIDATION CỦA select2*/
/* Gom chung quy tắc hiển thị icon */
.form-validation-icon {
    padding-right: 4.95rem;
    background-position: right 1.5rem center, center right 2.7rem;
    background-size: calc(.75em + .5rem) calc(.75em + .5rem);
    background-repeat: no-repeat;
    position: relative;
}

/* Khi có lỗi */
.select2-container.is-invalid .select2-selection {
    border-color: var(--vz-form-invalid-border-color, #f06548) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23f06548'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23f06548' stroke='none'/%3e%3c/svg%3e");
}

/* Khi hợp lệ */
.select2-container.is-valid .select2-selection {
    border-color: var(--vz-form-valid-border-color, #00c247) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%230ab39c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

/* Áp dụng quy tắc chung cho select2 */
.select2-container .select2-selection {
    padding-right: 4.95rem;
    background-position: right 1.5rem center, center right 2.7rem;
    background-size: calc(.75em + .5rem) calc(.75em + .5rem);
    background-repeat: no-repeat;
    position: relative;
}
/*END CSS VALIDATION CỦA select2*/
/*Căn lại chiều cao của select2*/
.select2-container .select2-selection--single {
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container .select2-selection__rendered {
    line-height: normal !important;
    padding-left: 8px !important; /* Điều chỉnh khoảng cách bên trái */
}
