/*--------------------------------------------------------------
# => DARK/LIGHT THEME TOGGLE
--------------------------------------------------------------*/
[data-bs-theme="dark"] {
    background: url('../images/background-dark.jpg') no-repeat center/cover fixed;
    background-color: #162430;
    background-position: top;
}

/* Transiciones suaves para el cambio de tema */
body {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Transiciones para todos los elementos que cambian con el tema */
/* EXCLUIMOS el sidebar y sus elementos hijos */
/* body *:not(.no-transition *, .sidebar, .sidebar *, .sidebar-overlay) {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
} */

/* Toggle del tema */
.theme-toggle {
    position: relative;
    width: 48px;
    height: 25.9px;
    background-color: #47b2ff;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 0 0 1px rgba(74, 109, 129, 0.7);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    top: 1.7px;
    left: 1.7px;
    background-color: #ffdc16;
    transition: transform 0.3s ease, background-color 0.4s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle.night {
    background-color: #152530;
    box-shadow: 0 0 0 1px rgba(21, 37, 48, 0.7);
}

.theme-toggle.night::before {
    transform: translateX(24px);
    background-color: #eee;
    left: 0px;
}

.theme-toggle::after {
    content: '☀️';
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.theme-toggle.night::after {
    content: '🌙';
    left: unset;
    right: 2.7px;
}

body *:not(.no-transition *,
    .sidebar, .sidebar *, .sidebar-overlay,
    [class*="swal2-"], [class*="swal2-"] *,
    form *, .preloader, .preloader *) {
    transition: inherit !important;
}

/* Desactivar transiciones iniciales para evitar efecto visual en la carga */
body.no-transition:not(.swal2-container *),
body.no-transition *:not(.swal2-container *) {
    transition: none;
}

/*--------------------------------------------------------------
# => SWEETALERT2 THEME STYLES
--------------------------------------------------------------*/

/* Tema oscuro para SweetAlert2 */
[data-bs-theme="dark"] .swal2-popup {
    /* background-color: #212529 !important; */
    background-color: #222 !important;
    color: #f8f9fa !important;
    border: 1px solid #353a3e;
}

/* [data-bs-theme="dark"] .swal2-title {
    color: #f8f9fa !important;
} */

[data-bs-theme="dark"] .swal2-html-container {
    color: #dee2e6 !important;
}

/* Tema claro (opcional, ya que es el por defecto) */
[data-bs-theme="light"] .swal2-popup {
    background-color: #fff !important;
    color: #333 !important;
}

/* Transición suave */
.swal2-popup {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

.swal2-title,
.swal2-html-container {
    transition: color 0.3s ease !important;
}