/*=============================================================
  SISTEMA UNIFICADO DE NOTIFICACIONES — todo Se Chip
  Tienda, panel admin de la tienda, Mi cuenta, panel de reparaciones
  (admin-sechip), seguimiento publico y juegos usan estos mismos
  avisos y el mismo cuadro de confirmacion.
  Quien los pinta es tienda/js/notificaciones.js; este archivo solo
  pone el aspecto. Guia de uso: seccion "Notificaciones" de
  MAPA-SISTEMA-SECHIP.md.
=============================================================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

#toast-container {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  pointer-events: none;
  width: min(92vw, 420px);
}

.toast-glass {
  --toast-accent: #60A5FA;
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(20, 22, 26, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28), 0 2px 10px rgba(0, 0, 0, 0.18);
  color: #F6F4EF;
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  animation: toast-in 0.38s cubic-bezier(.34, 1.56, .64, 1) both;
}

.toast-glass.is-leaving {
  animation: toast-out 0.28s ease forwards;
}

.toast-glass.exito { --toast-accent: #34D399; }
.toast-glass.success { --toast-accent: #34D399; }
.toast-glass.error { --toast-accent: #F87171; }
.toast-glass.warning { --toast-accent: #FFBA12; }
.toast-glass.info { --toast-accent: #60A5FA; }

.toast-glass-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--toast-accent) 22%, transparent);
  color: var(--toast-accent);
  margin-top: 0.05rem;
}

.toast-glass-icon svg {
  width: 17px;
  height: 17px;
}

.toast-glass-msg {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  padding-top: 0.15rem;
}

.toast-glass-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(246, 244, 239, 0.55);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0.1rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.toast-glass-close svg {
  display: block;
  width: 16px;
  height: 16px;
}
.toast-glass-close:hover { color: #F6F4EF; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(18px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); max-height: 200px; margin-top: 0; }
  to { opacity: 0; transform: translateY(10px) scale(0.94); max-height: 0; margin-top: -0.6rem; }
}

@media (max-width: 480px) {
  #toast-container { bottom: 14px; width: 94vw; }
  .toast-glass { padding: 0.75rem 0.9rem; font-size: 0.86rem; }
}

/*=============== DIALOGO DE CONFIRMACION (reemplaza confirm()) ===============*/

#confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(10, 11, 13, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
#confirm-overlay.is-open { opacity: 1; }
#confirm-overlay[hidden] { display: none; }

.confirm-glass {
  width: min(92vw, 400px);
  padding: 1.5rem 1.4rem 1.3rem;
  border-radius: 20px;
  background: rgba(24, 26, 31, 0.86);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color: #F6F4EF;
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, sans-serif;
  transform: translateY(10px) scale(0.96);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(.34, 1.56, .64, 1), opacity 0.2s ease;
}
#confirm-overlay.is-open .confirm-glass {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.confirm-glass-msg {
  font-size: 0.96rem;
  line-height: 1.55;
  margin-bottom: 1.3rem;
  white-space: pre-line;
}

.confirm-glass-actions {
  display: flex;
  gap: 0.6rem;
}

.confirm-glass-actions button {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.confirm-glass-cancelar {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: #F6F4EF;
}
.confirm-glass-cancelar:hover { background: rgba(255, 255, 255, 0.08); }

.confirm-glass-confirmar {
  background: #FFBA12;
  color: #15191E;
}
.confirm-glass-confirmar:hover { background: #FFCA45; }

.confirm-glass-confirmar.es-peligrosa {
  background: #E5484D;
  color: #F6F4EF;
}
.confirm-glass-confirmar.es-peligrosa:hover { background: #f4696d; }

@media (prefers-reduced-motion: reduce) {
  .toast-glass,
  .toast-glass.is-leaving,
  .confirm-glass,
  #confirm-overlay { animation: none; transition: none; }
}
