/* ─── شريط تثبيت التطبيق (PWA) ─── */
.pwa-install-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85) 24%);
  pointer-events: none;
}

.pwa-install-banner:not(.hidden) {
  pointer-events: auto;
}

.pwa-install-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold-strong);
  background: rgba(17, 17, 17, 0.96);
  box-shadow: var(--shadow-elevated);
}

.pwa-install-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  border-radius: 12px;
  background: rgba(246, 175, 81, 0.12);
}

.pwa-install-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-install-text strong {
  font-size: 0.92rem;
  color: var(--gold-light);
}

.pwa-install-text span {
  font-size: 0.78rem;
  color: var(--white-dim);
  line-height: 1.35;
}

.pwa-install-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--black);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  cursor: pointer;
  white-space: nowrap;
}

.pwa-install-btn:active {
  transform: scale(0.97);
}

.pwa-install-dismiss {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white-dim);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

body.has-pwa-banner .screen.active {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

/* ─── تعليمات التثبيت (iOS / Android) ─── */
.pwa-sheet {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.pwa-sheet-card {
  width: 100%;
  max-width: 400px;
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  background: var(--black-2);
  box-shadow: var(--shadow-elevated);
}

.pwa-sheet-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.pwa-sheet-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.pwa-sheet-steps li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--white);
  padding-right: 8px;
  border-right: 3px solid var(--gold-dark);
}

.pwa-sheet-steps b {
  color: var(--gold);
}

.pwa-sheet-close {
  width: 100%;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-light);
  background: transparent;
  cursor: pointer;
}

body.pwa-sheet-open {
  overflow: hidden;
}

@media (min-width: 1024px) {
  .pwa-install-banner {
    display: none !important;
  }
}
