/* ------------------------------------------------------------------ */
/* QR-first gate — full-screen blocking modal shown when WhatsApp is   */
/* not yet connected. Sits above all dashboard chrome.                  */
/* ------------------------------------------------------------------ */

#waGate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#waGate[hidden] {
  display: none !important;
}

.wa-gate-card {
  background: var(--bg, #fff);
  color: var(--text, #111);
  padding: 32px 36px;
  border-radius: 14px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border, transparent);
}

.wa-gate-card h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.wa-gate-card p {
  color: var(--muted, #666);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 14px 0;
}

.wa-gate-qr {
  width: 260px;
  height: 260px;
  margin: 12px auto;
  display: block;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
}

.wa-gate-instructions {
  font-size: 0.9rem;
  color: var(--muted, #666);
  margin-top: 8px !important;
}

.wa-gate-instructions strong {
  color: var(--text, #111);
}

.wa-gate-hint {
  font-size: 0.78rem;
  color: var(--muted, #888);
  margin-top: 16px !important;
}

.wa-gate-spinner {
  font-size: 2.5rem;
  margin: 18px 0 12px 0;
  animation: wa-gate-pulse 1.6s ease-in-out infinite;
}

@keyframes wa-gate-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.06); }
}

.wa-gate-retry {
  background: #16a34a;
  color: #fff;
  padding: 10px 26px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 8px;
}

.wa-gate-retry:hover {
  background: #15803d;
}

@media (prefers-reduced-motion: reduce) {
  .wa-gate-spinner { animation: none; }
}
