﻿/* ==========================================================================
   cu-ui.css - Modales (Bootstrap), velo de "procesando" y limpieza de
   cualquier resto de SweetAlert.
   Acompaña a Scripts/cu-ui.js
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Modal de Bootstrap
   -------------------------------------------------------------------------- */
.dn-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1085;
    padding: 1rem;
    overflow-y: auto;
}

.dn-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 14, 26, 0.45);
}

.dn-modal .modal-content {
    border: 0;
    border-radius: 0.8rem;
    box-shadow: 0 24px 60px rgba(3, 9, 20, 0.35);
    animation: dnModalEntra 0.16s ease-out;
}

.dn-modal .modal-header {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #e9ecef;
}

.dn-modal .modal-title {
    color: #0d1b2a;
    font-size: 1rem;
    font-weight: 600;
}

.dn-modal .modal-body {
    padding: 1.1rem;
    color: #31445c;
    font-size: 0.93rem;
}

.dn-modal .modal-body p {
    margin: 0;
}

.dn-modal .modal-footer {
    padding: 0.7rem 1.1rem;
    border-top: 1px solid #e9ecef;
    gap: 0.5rem;
}

.dn-modal .modal-footer .btn {
    min-width: 96px;
}

.dn-modal-texto {
    line-height: 1.55;
}

/* Icono superior del modal */
.dn-modal-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    background: #e8f1ff;
    color: #1e56c8;
}

.dn-modal-icono svg {
    width: 26px;
    height: 26px;
}

.dn-modal-icono-success { background: #e7f6ee; color: #137a4b; }
.dn-modal-icono-error   { background: #fdeaea; color: #b42318; }
.dn-modal-icono-warning { background: #fff4e0; color: #9a5b00; }
.dn-modal-icono-info    { background: #e8f1ff; color: #1e56c8; }
.dn-modal-icono-question{ background: #eef2f8; color: #31445c; }

body.dn-modal-abierto {
    overflow: hidden;
}

.dn-oculto {
    display: none !important;
}

@keyframes dnModalEntra {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   2. Velo de espera (postback normal y UpdatePanel)
   -------------------------------------------------------------------------- */
.dn-espera {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1090;
    align-items: center;
    justify-content: center;
    background: rgba(242, 244, 248, 0.72);
    backdrop-filter: blur(1px);
}

.dn-espera.is-open {
    display: flex;
}

.dn-espera-caja {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 1.1rem 1.6rem;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 0.8rem;
    box-shadow: 0 16px 40px rgba(16, 29, 49, 0.16);
}

.dn-espera-texto {
    color: #31445c;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.dn-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(47, 111, 237, 0.22);
    border-top-color: #2f6fed;
    border-radius: 50%;
    animation: dnGira 0.8s linear infinite;
}

@keyframes dnGira {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .dn-spinner { animation-duration: 2s; }
    .dn-modal .modal-content { animation: none; }
}

/* --------------------------------------------------------------------------
   3. Restos de SweetAlert: nunca visibles
   -------------------------------------------------------------------------- */
.swal2-container,
.swal2-shown,
.sweet-alert,
.sweet-overlay,
[class^="swal2-"],
[class*=" swal2-"] {
    display: none !important;
}
