html.auth-pending {
  background: #f7f7f7;
}

html.auth-pending body > *:not(#auth-gate) {
  display: none !important;
}

html:not(.auth-pending) #auth-gate {
  display: none !important;
}

#auth-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #f7f7f7;
  color: #222222;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#auth-gate img {
  height: 48px;
  width: auto;
}

#auth-gate p {
  margin: 0;
  font-size: 15px;
  color: #555555;
}

#auth-gate .auth-gate-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #dddddd;
  border-top-color: #e00b41;
  border-radius: 50%;
  animation: auth-gate-spin 0.7s linear infinite;
}

#auth-gate.is-error .auth-gate-spinner {
  display: none;
}

#auth-gate-retry {
  display: none;
  margin-top: 4px;
  padding: 8px 18px;
  border: 1.5px solid #dddddd;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: #222222;
}

#auth-gate.is-error #auth-gate-retry {
  display: inline-block;
}

@keyframes auth-gate-spin {
  to { transform: rotate(360deg); }
}
