/* =========================================================
   UFY PHONE — PWA: EL CARTEL "ACTIVA LOS AVISOS DE UFY"
   (public/js/ufy-phone/pwa-push-prompt-sheet.js). Una hoja que sube
   desde abajo, con el morado oscuro de la pantalla de carga y de las
   tarjetas de la PWA. En la computadora, una tarjeta en el centro.
   ========================================================= */

.ufy-push-prompt {
  position: fixed;
  inset: 0;
  /* Encima del teléfono; debajo de la pantalla de carga, de "sin conexión"
     y del aviso corto de abajo (pwa-toast.js). */
  z-index: 2147480500;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  box-sizing: border-box;

  background: rgba(2, 2, 7, 0.58);

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

  -webkit-tap-highlight-color: transparent;
  animation: ufy-push-prompt-fade 0.25s ease-out;

  /* Arrastrar sobre lo oscuro no mueve ni hace rebotar la página de
     debajo (en iPhone). */
  overscroll-behavior: contain;
  touch-action: none;
}


.ufy-push-prompt-sheet {
  position: relative;

  width: 100%;
  max-width: 480px;
  box-sizing: border-box;

  /* Con el teléfono acostado (poca altura) no se corta por arriba: se
     desliza dentro de la hoja, sin mover la página de debajo. */
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 28px 22px calc(20px + env(safe-area-inset-bottom, 0px));

  border: 1px solid rgba(222, 205, 255, 0.24);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;

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

  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(121, 74, 206, 0.55),
      transparent 58%
    ),
    linear-gradient(
      180deg,
      #1d1533 0%,
      #0c0918 100%
    );

  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.5);

  text-align: center;
  outline: none;

  animation: ufy-push-prompt-rise 0.34s cubic-bezier(0.2, 0.75, 0.3, 1);
}


.ufy-push-prompt-art {
  position: relative;
  flex: none;

  width: 72px;
  height: 72px;
}


.ufy-push-prompt-icon {
  display: block;

  width: 72px;
  height: 72px;

  border-radius: 18px;

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}


.ufy-push-prompt-bell {
  position: absolute;
  right: -9px;
  bottom: -9px;

  width: 34px;
  height: 34px;
  padding: 6px;
  box-sizing: border-box;

  display: grid;
  place-items: center;

  border: 3px solid #160f29;
  border-radius: 50%;

  color: #ffffff;
  background: linear-gradient(135deg, #7442ed, #5130bb);

  animation: ufy-push-prompt-ring 1.2s ease-in-out 0.45s 2;
}


.ufy-push-prompt-bell svg {
  width: 100%;
  height: 100%;

  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.ufy-push-prompt-title {
  margin: 20px 0 8px;

  font-size: 21px;
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -0.3px;
}


.ufy-push-prompt-text {
  max-width: 330px;

  margin: 0 0 22px;

  color: rgba(235, 228, 248, 0.78);

  font-size: 15px;
  line-height: 1.45;
}


.ufy-push-prompt-actions {
  width: 100%;

  display: flex;
  flex-direction: column;
  gap: 6px;
}


.ufy-push-prompt-actions button {
  appearance: none;

  width: 100%;
  min-height: 50px;
  padding: 12px 18px;

  border: 0;
  border-radius: 999px;

  font: inherit;
  font-size: 16px;
  font-weight: 650;

  cursor: pointer;
  touch-action: manipulation;
}


.ufy-push-prompt-yes {
  color: #ffffff;
  background: linear-gradient(135deg, #7442ed, #5130bb);
  box-shadow: 0 10px 26px rgba(116, 66, 237, 0.35);
}


.ufy-push-prompt-later {
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
}


.ufy-push-prompt-actions button:active {
  transform: scale(0.98);
}


.ufy-push-prompt-actions button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}


/* Computadora o tableta acostada: una tarjeta en el centro. */
@media (min-width: 700px) and (min-height: 500px) {
  .ufy-push-prompt {
    align-items: center;
    padding: 24px;
  }

  .ufy-push-prompt-sheet {
    max-width: 400px;
    padding: 30px 26px 24px;

    border-bottom: 1px solid rgba(222, 205, 255, 0.24);
    border-radius: 28px;

    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);

    animation-name: ufy-push-prompt-pop;
  }
}


@keyframes ufy-push-prompt-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}


@keyframes ufy-push-prompt-rise {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}


@keyframes ufy-push-prompt-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}


/* La campanita se mueve un poco, como cuando suena. */
@keyframes ufy-push-prompt-ring {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-12deg); }
  45% { transform: rotate(8deg); }
  60% { transform: rotate(-5deg); }
  75% { transform: rotate(2deg); }
}


@media (prefers-reduced-motion: reduce) {
  .ufy-push-prompt,
  .ufy-push-prompt-sheet,
  .ufy-push-prompt-bell {
    animation: none;
  }
}
