/* ==========================================================================
   TrueHRIS Universal Dropdown Indicator Fix
   Ensures EVERY select / dropdown element displays a clear, modern chevron icon
   ========================================================================== */

/* Universal styling for standard selects (both with form-control, form-select, or bare select) */
select:not([multiple]):not([size]):not(.no-custom-arrow),
select.form-control:not([multiple]):not([size]):not(.no-custom-arrow),
select.form-select:not([multiple]):not([size]):not(.no-custom-arrow),
.form-select:not([multiple]):not([size]):not(.no-custom-arrow) {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 14px 10px !important;
    padding-right: 2.25rem !important;
    cursor: pointer !important;
}

/* Hover & Focus states */
select:not([multiple]):not([size]):not(:disabled):hover,
select.form-control:not([multiple]):not([size]):not(:disabled):hover,
select.form-select:not([multiple]):not([size]):not(:disabled):hover {
    border-color: #94a3b8;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") !important;
}

select:not([multiple]):not([size]):focus,
select.form-control:not([multiple]):not([size]):focus,
select.form-select:not([multiple]):not([size]):focus {
    border-color: #2563eb !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Disabled state - MUST STILL SHOW THE DROPDOWN CHEVRON so users know it's a dropdown! */
select:not([multiple]):not([size]):disabled,
select.form-control:not([multiple]):not([size]):disabled,
select.form-select:not([multiple]):not([size]):disabled,
select:disabled {
    background-color: #f1f5f9 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 14px 10px !important;
    padding-right: 2.25rem !important;
    cursor: not-allowed !important;
    color: #64748b !important;
    opacity: 0.88 !important;
}

/* Small / Compact filter dropdowns & table page length selectors */
select.form-select-sm:not([multiple]):not([size]),
select.form-control-sm:not([multiple]):not([size]),
select.filter-pill-select:not([multiple]):not([size]),
.dataTables_length select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 1.85rem !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.55rem center !important;
    background-size: 12px 8px !important;
}

/* Select2 single dropdown container chevron enhancement */
.select2-container--default .select2-selection--single {
    display: flex !important;
    align-items: center !important;
    min-height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 8px !important;
    width: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #2563eb transparent !important;
    border-width: 0 4px 5px 4px !important;
}
