/* Banner de instalação PWA */
.sos-pwa-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  width: calc(100% - 24px);
  max-width: 420px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 12px 12px 14px;
  border-radius: 16px;
  background: #1c1228;
  color: #fff;
  box-shadow: 0 12px 32px rgba(28, 18, 40, 0.35);
  transition: transform 0.28s ease, opacity 0.28s ease;
  opacity: 0;
  pointer-events: none;
}
.sos-pwa-banner.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.sos-pwa-banner__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #6b2d8b;
  flex-shrink: 0;
}
.sos-pwa-banner__text {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.sos-pwa-banner__text strong {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
}
.sos-pwa-banner__text span {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.3;
}
.sos-pwa-banner__actions {
  display: grid;
  gap: 6px;
  justify-items: stretch;
}
.sos-pwa-banner__install {
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  background: #ffd300;
  color: #2f2438;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.sos-pwa-banner__dismiss {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}
.sos-pwa-banner__close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

/* iOS: dicas de instalação */
.sos-pwa-ios {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(20, 10, 30, 0.45);
}
.sos-pwa-ios[hidden] {
  display: none !important;
}
.sos-pwa-ios__card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  color: #2f2438;
  border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
}
.sos-pwa-ios__card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
}
.sos-pwa-ios__card ol {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: #4a4158;
}
.sos-pwa-ios__card li strong {
  color: #6b2d8b;
}
.sos-pwa-ios__ok {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: #6b2d8b;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

/* Empurra um pouco acima da bottom nav do delivery */
body.dlv-pedir-body .sos-pwa-banner {
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}
body.dlv-pedir-body:has(.ck-bar:not([hidden])) .sos-pwa-banner {
  bottom: calc(160px + env(safe-area-inset-bottom, 0px));
}
