/* pwa-install.css - modal PWA install (vertical layout: logo, message, buttons horizontal, timer) */

/* overlay */
.pwa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999999;
  padding: 20px;
  box-sizing: border-box;
}

/* modal box */
.pwa-modal {
  width: 100%;
  max-width: 560px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow: 0 14px 40px rgba(2,12,34,0.28);
  padding: 20px;
  color: #0f1720;
  font-family: Inter, Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial;
  position: relative;
  display: flex;
  flex-direction: column; /* vertical layout */
  gap: 14px;
  align-items: center;
  box-sizing: border-box;
}

/* close X */
.pwa-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #536276;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.pwa-close:hover { background: rgba(0,0,0,0.04); }

/* content: vertical stack */
.pwa-content {
  width: 100%;
  display: flex;
  flex-direction: column; /* vertical */
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  text-align: center;
}

/* logo (arriba) */
.pwa-logo {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 20px rgba(43,102,255,0.12);
}

/* text block (mensaje debajo del logo) */
.pwa-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  max-width: 92%;
}
.pwa-text h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  color: #0f1720;
}
.pwa-text p {
  margin: 0;
  font-size: 13px;
  color: #5b6b7d;
  line-height: 1.35;
}

/* actions block: botones horizontales dentro de un bloque */
.pwa-actions {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center; /* center buttons horizontally */
  box-sizing: border-box;
  padding-top: 4px;
}

/* primary install button */
.pwa-install-btn {
  background: #123e6e;
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  min-width: 140px;
  box-shadow: 0 8px 22px rgba(43,102,255,0.18);
}

/* disabled state */
.pwa-install-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* secondary button */
.pwa-later {
  background: transparent;
  border: 1px solid transparent;
  color: #556778;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 10px;
}

/* timer below everything */
.pwa-timer {
  margin-top: 4px;
  font-size: 12px;
  color: #8897a8;
  text-align: center;
  width: 100%;
}

/* make buttons occupy available space on narrow widths */
@media (max-width: 420px) {
  .pwa-modal { padding: 16px; max-width: 420px; }
  .pwa-logo { width: 96px; height: 96px; }
  .pwa-text h3 { font-size: 17px; }
  .pwa-text p { font-size: 13px; }
  .pwa-actions { gap: 8px; flex-wrap: wrap; }
  .pwa-install-btn, .pwa-later {
    min-width: 48%;
    flex: 1 1 48%;
  }
  .pwa-timer { font-size: 13px; }
}

/* Slight layout tweak for larger screens (keep vertical but increase spacing) */
@media (min-width: 900px) {
  .pwa-modal {
    max-width: 560px;
    padding: 24px;
    gap: 18px;
  }
  .pwa-logo { width: 84px; height: 84px; }
  .pwa-actions { gap: 12px; }
}

/* focus outlines for accessibility */
.pwa-install-btn:focus, .pwa-later:focus, .pwa-close:focus {
  outline: 3px solid rgba(43,102,255,0.18);
  outline-offset: 2px;
}

/* hidden attribute safety */
.pwa-overlay[hidden] { display: none !important; }
