/* Ponte BS3 -> BS4 para modais */
.modal.fade:not(.show) { opacity: 0; }
.modal.show { opacity: 1; }

/* Garante que nenhum CSS do tema zere a opacidade do nosso modal */
#bootstrapWaitingforModal.modal { opacity: 1; }
#bootstrapWaitingforModal.modal.show { opacity: 1; }

/* Backdrop padrão do Bootstrap 4 (contra overrides do tema) */
.modal            { z-index: 1050 !important; }
.modal-backdrop   { z-index: 1040 !important; background-color: #000 !important; }
.modal-backdrop.fade { opacity: 0; }               /* estado inicial */
.modal-backdrop.show { opacity: .5 !important; visibility: visible !important; }



/* Evita “pulo” por transform na animação do BS4 quando o tema mexe nisso */
.modal.fade .modal-dialog,
.modal.show .modal-dialog { transform: none !important; } /* POPUP FIX */


/* Ponte BS3 -> BS4 para modais */
.modal.fade:not(.show) { opacity: 0; }
.modal.show { opacity: 1; }

/* Garante que nenhum CSS do tema zere a opacidade do nosso modal */
#bootstrapWaitingforModal.modal { opacity: 1; }
#bootstrapWaitingforModal.modal.show { opacity: 1; }

/* Backdrop padrão do Bootstrap 4 (contra overrides do tema) */
.modal            { z-index: 1050 !important; }
.modal-backdrop   { z-index: 1040 !important; background-color: #000 !important; }
.modal-backdrop.fade { opacity: 0; }               /* estado inicial */
.modal-backdrop.show { opacity: .5 !important; visibility: visible !important; }



/* Evita “pulo” por transform na animação do BS4 quando o tema mexe nisso */
.modal.fade .modal-dialog,
.modal.show .modal-dialog { transform: none !important; } /* POPUP FIX */

/* exibe a seta do combo (caret) */
.bootstrap-select .dropdown-toggle::after {
    display: inline-block;
    margin-left: .255em;
    vertical-align: .255em;
    content: "";
    border-top: .3em solid;
    border-right: .3em solid transparent;
    border-bottom: 0;
    border-left: .3em solid transparent;
}



/* Ajuste: Força a cor vermelha do caret para o combo (Bootstrap 4) */
.bootstrap-select .dropdown-toggle::after {
    border-top-color: #CC092F !important; /* Vermelho do tema */
}


/* Corrige combos cinza - Bootstrap 4 */
.bootstrap-select .dropdown-toggle { background-color: #fff !important; border-color: #ced4da !important; }


/* Ajuste: Largura e Posicionamento para Baixo do Dropdown Menu */
.dropdown-menu.show { 
    top: 100% !important; 
    left: 0 !important; 
    transform: none !important; 
}

/* Ajuste: Posicionamento para Cima (Dropup) */
.dropup .dropdown-menu.show {
    top: auto !important;
    bottom: 100% !important;
    transform: none !important;
}
