/* ============================================================
   ui.css — Notificaciones (toast) y confirmación modal
   compartidas por index.html y admin.html, en reemplazo de
   alert()/confirm() nativos. Ver assets/js/shared.js (window.UI).
   Colores fijos (no depende de las variables CSS de cada página)
   para que el componente funcione igual en ambas.
============================================================ */

.ui-toast-wrap {
  position: fixed; top: 16px; right: 16px; z-index: 12000;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
}
.ui-toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  border-left: 4px solid #1565C0;
  font-family: 'Montserrat', 'Inter', sans-serif; font-size: .85rem;
  color: #1a1a2e; line-height: 1.5;
  animation: uiToastIn .25s ease;
}
.ui-toast.ui-toast-hide { animation: uiToastOut .2s ease forwards; }
.ui-toast-success { border-left-color: #2E7D32; }
.ui-toast-success i { color: #2E7D32; }
.ui-toast-error   { border-left-color: #C62828; }
.ui-toast-error i { color: #C62828; }
.ui-toast-warning { border-left-color: #FFC107; }
.ui-toast-warning i { color: #b8860b; }
.ui-toast-info    { border-left-color: #1565C0; }
.ui-toast-info i { color: #1565C0; }
.ui-toast i { font-size: 1rem; margin-top: 1px; flex-shrink: 0; }
.ui-toast-msg { flex: 1; white-space: pre-line; }
.ui-toast-close {
  background: none; border: none; color: #999; font-size: 1.1rem;
  line-height: 1; cursor: pointer; padding: 0; margin-left: 4px; flex-shrink: 0;
}
.ui-toast-close:hover { color: #333; }

@keyframes uiToastIn  { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes uiToastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(24px); } }

@media (max-width: 480px) {
  .ui-toast-wrap { left: 12px; right: 12px; top: 12px; max-width: none; }
}

/* Confirm modal */
.ui-confirm-overlay {
  display: none; position: fixed; inset: 0; z-index: 12100;
  background: rgba(10,20,50,.72); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.ui-confirm-overlay.open { display: flex; }
.ui-confirm-box {
  background: #fff; border-radius: 16px; padding: 32px 28px;
  width: 380px; max-width: 100%; text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  animation: uiConfirmIn .2s ease;
}
@keyframes uiConfirmIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.ui-confirm-icon {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 16px;
  background: #fff5e0; color: #b8860b; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
}
.ui-confirm-msg { font-size: .95rem; color: #333; line-height: 1.6; white-space: pre-line; margin-bottom: 24px; }
.ui-confirm-actions { display: flex; gap: 10px; justify-content: center; }
.ui-confirm-actions button {
  flex: 1; padding: 12px; border-radius: 9px; border: none;
  font-weight: 700; font-size: .88rem; cursor: pointer;
  font-family: 'Montserrat', 'Inter', sans-serif; transition: background .2s, opacity .2s;
}
.ui-confirm-cancel { background: #f0f1f3; color: #444; }
.ui-confirm-cancel:hover { background: #e3e5e9; }
.ui-confirm-ok { background: #1A3863; color: #fff; }
.ui-confirm-ok:hover { opacity: .9; }
.ui-confirm-ok.ui-confirm-danger { background: #C62828; }
