/* =========================================================
   UFY PHONE — PWA: AVISOS
   "Estás sin conexión" (public/js/ufy-phone/pwa-offline.js): la pantalla
   completa cuando UFY se abre sin conexión (con la tarjeta de
   notice-screen.css) y la franja de arriba cuando se pierde la conexión.
   Y el aviso corto de abajo (public/js/ufy-phone/pwa-toast.js).
   ========================================================= */

.ufy-pwa-offline-screen {
  position: fixed;
  inset: 0;
  z-index: 2147483100;

  display: grid;
  place-items: center;

  padding: 20px;
  box-sizing: border-box;

  color: rgba(255, 255, 255, 0.96);

  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(121, 74, 206, 0.52),
      transparent 48%
    ),
    linear-gradient(
      180deg,
      #17102b 0%,
      #080611 58%,
      #030207 100%
    );

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


.ufy-pwa-offline-banner {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 2147482000;

  width: max-content;
  max-width: calc(100% - 32px);
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;

  padding: 9px 18px;

  border: 1px solid rgba(222, 205, 255, 0.28);
  border-radius: 18px;

  color: #ffffff;
  background: rgba(28, 20, 44, 0.95);

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;

  transform: translateX(-50%);

  /* Solo informa: no tapa los toques de debajo. */
  pointer-events: none;
}


.ufy-pwa-offline-banner strong {
  font-size: 14px;
  font-weight: 700;
}


.ufy-pwa-offline-detail {
  color: rgba(235, 228, 248, 0.8);
  font-size: 12px;
}


.ufy-pwa-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 2147481000;

  width: max-content;
  max-width: calc(100% - 32px);
  box-sizing: border-box;

  padding: 12px 18px;

  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;

  color: #ffffff;
  background: rgba(20, 16, 30, 0.96);

  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;

  transform: translateX(-50%);
  animation: ufy-pwa-toast-in 0.25s ease-out;
}


.ufy-pwa-toast.is-success {
  border-color: rgba(159, 245, 156, 0.5);
}


.ufy-pwa-toast.is-error {
  border-color: rgba(255, 157, 179, 0.6);
}


@keyframes ufy-pwa-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}


@media (prefers-reduced-motion: reduce) {
  .ufy-pwa-toast {
    animation: none;
  }
}
