/* Creado por Claude 2026-12-02 (entrega 79)
   CucuDay · ventanas de aviso (SweetAlert 2.x «swal-*» y 1.x «sweet-alert») iguales en todo el portal, en tema claro y
   oscuro: el diseño de Productos (products.php). Se carga en homeframe/template/plantilla_top.php y en
   includes/theme_runtime.php. SweetAlert inyecta su CSS al cargar el script (después de este archivo): por eso los
   selectores llevan html[...] y, donde las páginas tenían su propia versión, !important.

   El fallo de la foto (palomita con medialunas y rayas blancas sobre fondo oscuro): el ícono de éxito se dibuja con dos
   medialunas y una barra («hide-corners») PINTADAS DEL COLOR DEL FONDO (blanco). Sobre una ventana oscura se ven. Aquí se
   quitan (sólo tapaban la animación del círculo), así el ícono se ve bien sobre cualquier fondo. */

/* ---------- Ícono de éxito: sin piezas pintadas del color del fondo (los dos temas) ---------- */
html .swal-icon--success::before,html .swal-icon--success::after,html .swal-icon--success__hide-corners,
html .sweet-alert .sa-icon.sa-success::before,html .sweet-alert .sa-icon.sa-success::after,html .sweet-alert .sa-icon.sa-success .sa-fix{display:none!important}

/* ---------- Común ---------- */
html .swal-modal{border-radius:22px!important;padding-bottom:6px}
html .swal-title{font-weight:800!important;letter-spacing:-.2px}
html .swal-text{line-height:1.5!important;text-align:center}
html .swal-footer{text-align:center!important;padding:14px 18px 18px!important;margin-top:8px!important}
html .swal-button{border-radius:12px!important;min-height:44px;padding:0 26px!important;font-weight:700!important;font-size:15px!important;transition:filter .15s,transform .12s,box-shadow .15s!important}
html .swal-button:active{transform:scale(.98)}
html .swal-button--confirm:not(.swal-button--danger){background:linear-gradient(180deg,#2f8cff 0%,#1660f0 60%,#0f4fd6 100%)!important;color:#fff!important;border:1px solid rgba(125,211,252,.45)!important;box-shadow:0 10px 24px rgba(30,107,255,.36),inset 0 1px 0 rgba(255,255,255,.28)!important}
html .swal-button--confirm:not(.swal-button--danger):not([disabled]):hover{filter:brightness(1.07)}
html .swal-button--danger{background:linear-gradient(180deg,#ef4444,#dc2626 60%,#b91c1c)!important;color:#fff!important;border:1px solid rgba(248,113,113,.5)!important;box-shadow:0 10px 24px rgba(220,38,38,.3),inset 0 1px 0 rgba(255,255,255,.22)!important}
html .swal-button--danger:not([disabled]):hover{filter:brightness(1.07)}
html .swal-content__input{border-radius:10px!important;padding:10px 14px!important;font-size:15px!important}

/* ---------- Oscuro ---------- */
html[data-theme="dark"] .swal-overlay,html[data-cd-home-theme="dark"] .swal-overlay{background-color:rgba(0,6,22,.66)!important}
html[data-theme="dark"] .swal-modal,html[data-cd-home-theme="dark"] .swal-modal{background:#0a2149!important;border:1px solid rgba(92,176,255,.55)!important;box-shadow:0 24px 70px rgba(0,0,0,.62),0 0 30px rgba(30,130,255,.18)!important;color:#eef6ff!important}
html[data-theme="dark"] .swal-title,html[data-cd-home-theme="dark"] .swal-title{color:#f3f8ff!important}
html[data-theme="dark"] .swal-text,html[data-cd-home-theme="dark"] .swal-text{color:#c9daf0!important}
html[data-theme="dark"] .swal-footer,html[data-cd-home-theme="dark"] .swal-footer{background:transparent!important;border-top:0!important}
html[data-theme="dark"] .swal-content__input,html[data-cd-home-theme="dark"] .swal-content__input{background:#061a3e!important;border:1px solid rgba(80,158,242,.62)!important;color:#f2f7ff!important;caret-color:#7cc8ff}
html[data-theme="dark"] .swal-content__input::placeholder,html[data-cd-home-theme="dark"] .swal-content__input::placeholder{color:#8aa3c3!important}
html[data-theme="dark"] .swal-content__input:focus,html[data-cd-home-theme="dark"] .swal-content__input:focus{border-color:#5cc0ff!important;box-shadow:0 0 0 3px rgba(56,160,255,.26)!important}
html[data-theme="dark"] .swal-button--cancel,html[data-cd-home-theme="dark"] .swal-button--cancel{background:rgba(126,146,178,.22)!important;border:1px solid rgba(150,172,206,.45)!important;color:#e6eef9!important}
html[data-theme="dark"] .swal-button--cancel:not([disabled]):hover,html[data-cd-home-theme="dark"] .swal-button--cancel:not([disabled]):hover{background:rgba(126,146,178,.34)!important}
html[data-theme="dark"] .swal-button:focus,html[data-cd-home-theme="dark"] .swal-button:focus{box-shadow:0 0 0 2px #0a2149,0 0 0 4px rgba(92,192,255,.65)!important}
html[data-theme="dark"] .swal-icon--success,html[data-cd-home-theme="dark"] .swal-icon--success{border-color:#a5dc86!important;background:transparent!important}
html[data-theme="dark"] .swal-icon--success__ring,html[data-cd-home-theme="dark"] .swal-icon--success__ring{border-color:rgba(165,220,134,.28)!important}
html[data-theme="dark"] .swal-icon--info,html[data-cd-home-theme="dark"] .swal-icon--info{border-color:#5cb8ff!important}
html[data-theme="dark"] .swal-icon--info::before,html[data-theme="dark"] .swal-icon--info::after,html[data-cd-home-theme="dark"] .swal-icon--info::before,html[data-cd-home-theme="dark"] .swal-icon--info::after{background-color:#5cb8ff!important}
html[data-theme="dark"] .swal-icon--warning,html[data-cd-home-theme="dark"] .swal-icon--warning{border-color:#f8bb86!important;background:transparent!important}
html[data-theme="dark"] .swal-icon--error,html[data-cd-home-theme="dark"] .swal-icon--error{background:transparent!important}
html[data-theme="dark"] .swal-icon--custom,html[data-cd-home-theme="dark"] .swal-icon--custom{background:transparent!important}
/* SweetAlert 1.x */
html[data-theme="dark"] .sweet-overlay,html[data-cd-home-theme="dark"] .sweet-overlay{background-color:rgba(0,6,22,.66)!important}
html[data-theme="dark"] .sweet-alert,html[data-cd-home-theme="dark"] .sweet-alert{background:#0a2149!important;border:1px solid rgba(92,176,255,.55)!important;border-radius:22px!important;box-shadow:0 24px 70px rgba(0,0,0,.62)!important}
html[data-theme="dark"] .sweet-alert h2,html[data-cd-home-theme="dark"] .sweet-alert h2{color:#f3f8ff!important}
html[data-theme="dark"] .sweet-alert p,html[data-cd-home-theme="dark"] .sweet-alert p{color:#c9daf0!important}
html[data-theme="dark"] .sweet-alert .sa-icon.sa-success .sa-placeholder,html[data-cd-home-theme="dark"] .sweet-alert .sa-icon.sa-success .sa-placeholder{border-color:rgba(165,220,134,.28)!important}
html[data-theme="dark"] .sweet-alert input,html[data-cd-home-theme="dark"] .sweet-alert input{background:#061a3e!important;border-color:rgba(80,158,242,.62)!important;color:#f2f7ff!important}
html[data-theme="dark"] .sweet-alert button.cancel,html[data-cd-home-theme="dark"] .sweet-alert button.cancel{background:rgba(126,146,178,.22)!important;color:#e6eef9!important}

/* ---------- Claro ---------- */
html[data-theme="light"] .swal-modal,html[data-cd-home-theme="light"] .swal-modal{background:#fff!important;border:1px solid #cfe0f1!important;box-shadow:0 24px 60px rgba(30,70,120,.22)!important}
html[data-theme="light"] .swal-title,html[data-cd-home-theme="light"] .swal-title{color:#13253d!important}
html[data-theme="light"] .swal-text,html[data-cd-home-theme="light"] .swal-text{color:#4a6382!important}
html[data-theme="light"] .swal-content__input,html[data-cd-home-theme="light"] .swal-content__input{background:#fff!important;border:1px solid #b7d1e9!important;color:#132a44!important}
html[data-theme="light"] .swal-content__input:focus,html[data-cd-home-theme="light"] .swal-content__input:focus{border-color:#2b8cf0!important;box-shadow:0 0 0 3px rgba(43,140,240,.18)!important}
html[data-theme="light"] .swal-button--cancel,html[data-cd-home-theme="light"] .swal-button--cancel{background:#eef2f6!important;border:1px solid #cbd6e2!important;color:#2b4561!important}
html[data-theme="light"] .swal-button--cancel:not([disabled]):hover,html[data-cd-home-theme="light"] .swal-button--cancel:not([disabled]):hover{background:#e2e8ef!important}

@media (max-width:520px){
  html .swal-modal{width:calc(100% - 28px)!important;margin:14px!important}
  html .swal-footer{display:flex;flex-direction:column-reverse;gap:8px}
  html .swal-button-container{margin:0!important;width:100%}
  html .swal-button{width:100%}
}
@media (prefers-reduced-motion:reduce){html .swal-button{transition:none!important}}
