/* Snipo PWA Install Prompt — Sleek Mobile Sheet */
.pwa-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}
.pwa-sheet-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.pwa-sheet {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 20px;
  max-width: 440px;
  margin: 0 auto;
  background: rgba(20, 20, 24, 0.96);
  border: 1px solid rgba(200, 245, 60, 0.28);
  border-radius: 24px;
  padding: 22px 20px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(200, 245, 60, 0.12);
  z-index: 99999;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  overflow: hidden;
}

.pwa-sheet.show {
  transform: translateY(0);
  opacity: 1;
}

/* Subtle top glow highlight */
.pwa-sheet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #C8F53C, transparent);
  border-radius: 999px;
}

.pwa-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #8E8E93;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.pwa-close-btn:hover, .pwa-close-btn:active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.pwa-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.pwa-app-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(200, 245, 60, 0.28);
  flex-shrink: 0;
  display: block;
}

.pwa-meta {
  flex: 1;
  min-width: 0;
}

.pwa-badge {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(200, 245, 60, 0.15);
  color: #C8F53C;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.pwa-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.pwa-desc {
  font-size: 0.86rem;
  color: #A0A0A8;
  margin: 0 0 16px;
  line-height: 1.4;
}

/* Feature tags */
.pwa-perks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pwa-perk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 0.76rem;
  color: #E2E2E6;
}

/* iOS instructions box */
.pwa-ios-guide {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pwa-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #D1D1D6;
}
.pwa-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #C8F53C;
  color: #0A0A0B;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pwa-icon-inline {
  display: inline-flex;
  vertical-align: middle;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  margin: 0 3px;
  color: #007AFF;
}

/* CTA Buttons */
.pwa-actions {
  display: flex;
  gap: 10px;
}
.pwa-btn-primary {
  flex: 1;
  padding: 13px 18px;
  background: #C8F53C;
  color: #0A0A0B;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.pwa-btn-primary:active {
  transform: scale(0.97);
}
.pwa-btn-secondary {
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #A0A0A8;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.pwa-btn-secondary:active {
  background: rgba(255, 255, 255, 0.14);
}

/* Downward arrow indicator for iOS Safari */
.pwa-ios-arrow {
  text-align: center;
  margin-top: 10px;
  font-size: 0.8rem;
  color: #8E8E93;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  animation: pwaBounce 1.5s infinite ease-in-out;
}
@keyframes pwaBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (min-width: 769px) {
  /* On desktop, keep sheet tucked away unless explicitly triggered */
  .pwa-sheet {
    right: 24px;
    left: auto;
    width: 380px;
    bottom: 24px;
  }
}
