/* ============================================================
   E-Tenga PWA layer
   Purely additive — does not alter existing storefront styling.
   Adds: native touch feel, safe-area support for notched/gesture
   devices when installed, and the install-prompt banner.
   ============================================================ */

/* ---- Native touch feel (all viewports) ---- */
a, button, .btn, input[type="submit"], input[type="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overscroll-behavior-y: contain;
}

/* ---- Standalone / installed app adjustments ---- */
html.pwa-standalone body {
  /* Respect the notch / home indicator / status bar when running fullscreen */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

html.pwa-standalone .header-sticky.stick,
html.pwa-standalone header .top-link {
  padding-top: env(safe-area-inset-top);
}

/* Never show our own install banner once already installed */
html.pwa-standalone #etengaInstallBar {
  display: none !important;
}

/* ---- Install banner ---- */
#etengaInstallBar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a1a2e;
  color: #fff;
  border-radius: 16px;
  padding: 12px 12px 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  font-family: inherit;
}

#etengaInstallBar.etenga-install-show {
  transform: translateY(0);
  opacity: 1;
}

#etengaInstallBar img {
  border-radius: 10px;
  flex-shrink: 0;
}

#etengaInstallBar .etenga-install-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

#etengaInstallBar .etenga-install-copy strong {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}

#etengaInstallBar .etenga-install-copy span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
}

#etengaInstallBar .etenga-install-copy svg {
  vertical-align: -2px;
}

#etengaInstallBar .etenga-install-cta {
  background: #e94560;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

#etengaInstallBar .etenga-install-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
  cursor: pointer;
}

@media (max-width: 420px) {
  #etengaInstallBar .etenga-install-copy span {
    display: none;
  }
}
