/* ===========================================
* Estilos personalizados para la aplicación de Saedu
* Aquí puedes agregar o sobrescribir estilos de Bootstrap y definir tus propios componentes.
* Organización: Variables, generales, encabezados, inputs, botones, grupos de botones
=========================================== */

/* === VARIABLES DE COLOR (puedes editar para tu paleta homogénea) === */
:root {
    --color-bg: #f5f7fa;
    --color-label: #3d3f40;
    --color-border: #85a1ca;
    --color-text: #676a6c;
}

/* === ESTILOS GENERALES === */
body {
    background: var(--color-bg);
    color: var(--color-text);
}

label {
    /* color: var(--color-label) !important; */
    font-weight: 700;
    font-size: 14px;
}

/* === ENCABEZADOS DE PÁGINA Y FORMULARIOS === */
.page-header-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.page-header-back-button {
    margin-right: 0.75rem;
}

.page-header-title {
    font-size: 26px;
    margin: 0;
}

.well {
    background-color: #fff !important;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
    /* box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.095); */
    box-shadow: 0 0px 4px 1px rgb(0 0 0 / 10%);
}

.red {
    color: red;
    font-weight: 400;
}

/* ===========================================
    INPUTS Y SELECT2
    Estilos para inputs y componentes Select2
=========================================== */

/* === INPUTS GENERALES ===
    Aplica estilos homogéneos a los inputs y selects
------------------------------------------- */
.form-control,
.form-control-sm,
.select2-selection {
    border-radius: .5rem !important;
    border-color: var(--color-border) !important;
}

/* === SELECT2: Dropdowns personalizados === */

/* Fondo y borde del dropdown de Select2 con tema Bootstrap o Bootstrap4 */
.select2-container--bootstrap .select2-dropdown,
.select2-container--bootstrap4 .select2-dropdown {
    background-color: #f4f4f4 !important;
    /* Gris claro */
    border-color: #dee2e6 !important;
    /* Borde gris claro */
    color: #676a6c !important;
}

/* === SELECT2: Tamaño pequeño ===
    Forzar tamaño pequeño si el select original tiene .form-control-sm
------------------------------------------- */
select.form-control-sm+.select2-container--bootstrap4 .select2-selection--single,
select.form-control-sm+.select2-container--bootstrap4 .select2-selection--multiple {
    min-height: 31px !important;
    height: 31px !important;
    font-size: .875rem !important;
    padding: .25rem .5rem !important;
    border-radius: .5rem !important;
    line-height: 1.5 !important;
    border: 1px solid var(--color-border) !important;
    display: flex;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

/* === SELECT2: Etiquetas de selección múltiple (tags) === */
.select2-selection__choice {
    background-color: #007bff !important;
    /* Azul Bootstrap */
    color: #fff !important;
    border-radius: .25rem !important;
    padding: .2rem .5rem;
    margin-right: .25rem;
}

/* Hover en las etiquetas seleccionadas */
.select2-selection__choice:hover {
    background-color: #0056b3 !important;
    /* Azul más oscuro */
}

/* Etiquetas seleccionadas deshabilitadas */
.select2-selection__choice[aria-disabled="true"] {
    background-color: #607383 !important;
    /* Gris Bootstrap */
    color: #fff !important;
    opacity: 0.6 !important;
    cursor: not-allowed;
}

/* === SELECT2: Opciones seleccionadas en el dropdown ===
    Resalta la opción seleccionada o resaltada
------------------------------------------- */
.select2-results__option[aria-selected="true"],
.select2-results__option--highlighted[aria-selected] {
    background-color: rgb(118, 118, 118) !important;
    /* Gris oscuro Bootstrap */
    color: #fff !important;
}


/* === BOTONES === */
/* Ajusta el redondeo de los botones en la plataforma */
.btn {
    border-radius: .8rem !important;
}

/* Clase para botones extra pequeños */
.btn-group-xs>.btn,
.btn-xs {
    padding: .15rem .3rem;
    font-size: .75rem;
    line-height: 1.2;
    border-radius: .15rem;
}

.btn-white {
    background-color: #fff !important;
    color: var(--color-text) !important;
    border: 1px solid var(--color-border) !important;
}

.btn-white:hover,
.btn-white:focus {
    background-color: #f8f9fa !important;
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
}

/* Outline version */
.btn-outline-white {
    background-color: transparent !important;
    color: #fff !important;
    border: 1.5px solid var(--color-border) !important;
}

.btn-outline-white:hover,
.btn-outline-white:focus {
    background-color: #fff !important;
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
}


/* Botón outline-warning personalizado */
.btn-outline-warning {
    border-width: 2px !important;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
    color: #fff !important;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
}

/* === GRUPOS DE INPUTS/Elementos (input-group) === */
/* Elimina el borde redondeado entre los elementos para que se vean pegados */
.input-group .group:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important;
}

.input-group .group:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* === GRUPOS DE BOTONES (btn-group) === */
/* Elimina el borde redondeado entre botones para que se vean pegados */
.btn-group>.btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.btn-group>.btn:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Estilo para que los botones en breadcrumb luzcan como enlaces */
.breadcrumb button {
    color: #007bff;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
}

.breadcrumb button:hover,
.breadcrumb button:focus {
    color: #0056b3;
    text-decoration: underline;
    background: none;
    box-shadow: none;
}


/* DATA TABLE JQ */


/* MODALS CUSTOM*/
/* ===========================
    Fondo semitransparente que cubre toda la pantalla
    ============================ 
*/
.content-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    /* Fondo semitransparente */
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

/* Tamaño de fuente en los modales: afecta a todos los hijos */
.content-modal,
.content-modal * {
    font-size: 0.8rem;
}

/* ===========================
       MODAL CONTAINER
       Contenedor principal del modal
    ============================ */
.modal-container {
    background: #fff;
    border-radius: 15px;
    width: 95%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;

    /* Ajusta el valor según lo que necesites */
    min-height: 60vh;

    /* Scroll interno si el contenido sobrepasa */
    animation-duration: 0.4s;
    animation-fill-mode: both;
}

/* ===========================
    MODAL SIZES
    Tamaños predefinidos para el modal
    ============================ */
.modal-sm {
    max-width: 400px !important;
    max-height: 60vh !important;
}

.modal-md {
    max-width: 600px !important;
    max-height: 80vh !important;
}

.modal-lg {
    max-width: 900px !important;
    max-height: 95vh !important;
}

.modal-xl {
    max-width: 1200px !important;
    max-height: 98vh !important;
}

/* ===========================
        ANIMACIONES
        Efectos de entrada y salida del modal
    ============================ 
*/
.animated-short {
    animation-duration: 0.4s;
}

.bounceInDown {
    animation-name: bounceInDown;
}

@keyframes bounceInDown {
    0% {
        opacity: 0;
        transform: translateY(-2000px);
    }

    60% {
        opacity: 1;
        transform: translateY(30px);
    }

    80% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.bounceOutDown {
    animation-name: bounceOutDown;
}

@keyframes bounceOutDown {
    20% {
        transform: translateY(-10px);
    }

    40%,
    45% {
        opacity: 1;
        transform: translateY(20px);
    }

    100% {
        opacity: 0;
        transform: translateY(2000px);
    }
}

/* ===========================
       MODAL HEADER
       Encabezado del modal
    ============================ */
.modal-header-custom {
    background: #0d6efd;
    /* Azul Bootstrap */
    color: #fff;
    padding: 1rem;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-custom {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.dismiss-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 0 0.5rem;
}

/* ===========================
       MODAL BODY & FOOTER
       Cuerpo y pie del modal
    ============================ */
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
}

.modal-body .h5 {
    margin-top: 0;
    margin-bottom: 1rem;

}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #e5e5e5;
    background: #f8f9fa;
    gap: 0.5rem;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* ===========================
       MODAL FOOTER OPCIONAL
       Pie del modal con fondo personalizado (igual que header)
       Para usar: agregar la clase .modal-footer-custom al footer
    ============================ */
.modal-footer-custom {
    background: #0d6efd;
    /* Azul Bootstrap */
    color: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top: none;
}