.pwa-install-banner {
  position: sticky;
  top: 0;
  z-index: 1040;
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: none;
}

/* Login / halaman tanpa topbar: body flex-row → banner harus fixed penuh lebar di atas */
body > .pwa-install-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  flex: none;
  align-self: auto;
}

body.has-pwa-install-banner {
  padding-top: var(--pwa-banner-offset, 44px);
}

body.has-pwa-install-banner > .container {
  min-height: calc(100vh - var(--pwa-banner-offset, 44px));
  min-height: calc(100dvh - var(--pwa-banner-offset, 44px));
}

.pwa-install-banner.is-visible {
  display: block;
}

.pwa-install-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  max-width: 100%;
  gap: 12px;
}

.pwa-install-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pwa-install-banner-left svg {
  flex: 0 0 auto;
}

.pwa-install-banner-sep {
  opacity: 0.6;
}

.pwa-install-banner-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pwa-install-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pwa-install-banner-cta {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 0;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  font-family: inherit;
}

.pwa-install-banner-cta:hover {
  background: rgba(255, 255, 255, 0.35);
}

.pwa-install-banner-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.7;
}

.pwa-install-banner-close:hover {
  opacity: 1;
}

.pwa-install-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 99990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.pwa-install-sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pwa-install-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: min(100%, 480px);
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 99991;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease;
}

.pwa-install-sheet.is-open {
  transform: translateX(-50%) translateY(0);
}

.pwa-install-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  margin: 0 auto 16px;
}

.pwa-install-sheet-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.pwa-install-sheet-sub {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 18px;
  line-height: 1.45;
}

.pwa-install-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #f1f5f9;
}

.pwa-install-step-num {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-install-step-body {
  min-width: 0;
}

.pwa-install-step-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.pwa-install-step-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
}

.pwa-install-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  vertical-align: middle;
  margin: 0 2px;
}

.pwa-install-sheet-close {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 640px) {
  .pwa-install-banner-text,
  .pwa-install-banner-sep {
    display: none;
  }
}
