/* ==========================================================================
   custom.migrate.css
   Ajustes de migración BS3 -> BS5
   ========================================================================== */

/* --------------------------------------------------------------------------
   Estados .show de BS5 (BS3 usaba .in / .open)
   -------------------------------------------------------------------------- */
.fade.show {
    opacity: 1;
}

.modal-backdrop.show {
    opacity: .5;
}

.modal.show .modal-dialog {
    transform: none;
}

.collapse.show {
    display: block;
}

tr.collapse.show {
    display: table-row;
}

tbody.collapse.show {
    display: table-row-group;
}

.dropdown-menu.show {
    display: block;
}

.tooltip.show {
    opacity: .9;
}

.popover.show {
    display: block;
}

/* --------------------------------------------------------------------------
   Header de modales: X unificada (igual que modal-legal)
   -------------------------------------------------------------------------- */

/* Quita el clearfix de BS3 dentro del flex de BS5 */
.modal-header::before,
.modal-header::after {
    display: none;
}

.modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 1rem;
}

.modal-header .close {
    float: none !important;
    position: static !important;
    flex-shrink: 0;
    align-self: center !important;
    box-sizing: content-box;
    width: 4px;
    height: 4px;
    margin: 0 0 0 auto !important;
    padding: 4px;
    font-size: 0;
    line-height: 0;
    color: #000;
    text-shadow: none;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center / 16px auto no-repeat;
    border: 0;
    border-radius: .375rem;
    opacity: .5;
    cursor: pointer;
}

.modal-header .close span {
    display: none;
}

.modal-header .modal-title {
    margin: 0;
}

.modal-header .close:hover {
    opacity: .75;
}

.modal-header .close:focus {
    outline: 0;
    box-shadow: none;
    opacity: 1;
}

.modal-header .btn-close {
    flex-shrink: 0;
    align-self: center;
    margin: 0 0 0 auto;
}

/* --------------------------------------------------------------------------
   Modales legales
   -------------------------------------------------------------------------- */
.modal-legal {
    overflow: hidden;
}

/* Diálogo */
.modal-legal .modal-dialog {
    margin: 1.75rem auto;
}

@media (max-width: 575.98px) {
    .modal-legal .modal-dialog {
        margin: .5rem;
    }
}

/* Cabecera */
.modal-legal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.modal-legal .modal-header::before,
.modal-legal .modal-header::after {
    display: none;
}

.modal-legal .modal-title {
    margin: 0 !important;
    text-align: center !important;
    font-size: 26px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.modal-legal .btn-close {
    margin: 0;
    flex-shrink: 0;
    align-self: center;
}

.modal-legal .btn-close:focus {
    box-shadow: none;
}

/* Contenido */
.modal-legal .modal-body p {
    font-size: 16px;
    color: #7b7d85;
}

.modal-legal .modal-body li {
    font-size: 14px;
    color: #7b7d85;
    margin-left: 20px;
}

.modal-legal .modal-footer {
    color: #7b7d85;
}

/* Scrollbar */
.modal-legal .modal-body {
    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 transparent;
}

.modal-legal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-legal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-legal .modal-body::-webkit-scrollbar-thumb {
    background-color: #c4c4c4;
    border-radius: 3px;
}

.modal-legal .modal-body::-webkit-scrollbar-thumb:hover {
    background-color: #f47a04;
}

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
select.form-control {
    appearance: none;
    padding-right: 2.25rem;
    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='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
}

/* --------------------------------------------------------------------------
   Utilidades contextuales (colores de BS3)
   -------------------------------------------------------------------------- */
.message.bg-warning {
    background-color: #fcf8e3 !important;
    color: #8a6d3b !important;
}

.message.bg-info {
    background-color: #d9edf7 !important;
    color: #31708f !important;
}

/* --------------------------------------------------------------------------
   Noticias (home)
   -------------------------------------------------------------------------- */
#divNoticiasBlog .animated {
    opacity: 1 !important;
    animation: none !important;
}