/*
 * BEYAHAD - PADRAO GLOBAL DOS SELECTS (v06)
 * Texto à esquerda e chevron à direita com o mesmo afastamento da borda.
 * Uma unica regra para Admin, SuperAdmin, Supervisores e Discipuladores.
 * Preserva <select multiple> e <select size="...">.
 */

select:not([multiple]):not([size]) {
    --beyahad-select-inset: 0.75rem;
    --beyahad-select-arrow-size: 0.875rem;

    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;

    /* O inicio do texto e a seta ficam a exatamente 0.75rem das bordas. */
    padding-left: var(--beyahad-select-inset) !important;
    /* Reserva suficiente para o texto nunca passar sob a seta. */
    padding-right: calc(var(--beyahad-select-inset) + var(--beyahad-select-arrow-size) + 0.5rem) !important;

    /* !important substitui os antigos SVGs inline do legado, padronizando tudo. */
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364748b%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%209%206%206%206-6%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right var(--beyahad-select-inset) center !important;
    background-size: var(--beyahad-select-arrow-size) var(--beyahad-select-arrow-size) !important;
}

/* Dashboard: filtros pequenos usam 8px dos DOIS lados, evitando apertar as opcoes. */
select.h-7:not([multiple]):not([size]),
select.h-8:not([multiple]):not([size]) {
    --beyahad-select-inset: 0.5rem;
    --beyahad-select-arrow-size: 0.75rem;
}

/* Acessibilidade: no modo de alto contraste, devolver o indicador nativo. */
@media (forced-colors: active) {
    select:not([multiple]):not([size]) {
        -webkit-appearance: auto !important;
        -moz-appearance: auto !important;
        appearance: auto !important;
        background-image: none !important;
    }
}
