/* Login / register — human gate, Google, password */

.human-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.human-gate.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.human-gate-panel {
  max-width: 400px;
  width: 100%;
  text-align: center;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, rgba(15, 47, 109, 0.12));
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 50px rgba(15, 47, 109, 0.12);
}

.human-gate-panel i.fa-shield-alt {
  font-size: 2.5rem;
  color: var(--accent, #1b4a9c);
  margin-bottom: 1rem;
}

.human-gate-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.human-gate-panel p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.human-gate-turnstile {
  display: flex;
  justify-content: center;
  min-height: 70px;
}

.auth-content--locked {
  pointer-events: none;
  opacity: 0.35;
  filter: blur(2px);
  user-select: none;
}

.auth-content--locked::after {
  content: '';
  position: absolute;
  inset: 0;
}

.auth-oauth-block {
  margin-bottom: 1.25rem;
}

.auth-google-mount {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 48px;
}

.auth-google-fallback {
  display: flex;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-glow);
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.auth-google-gis-slot {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  min-height: 44px;
}

.auth-google-gis-hidden {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 240px;
  height: 48px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.auth-google-unavailable {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.75rem;
  background: rgba(248, 113, 113, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.auth-google-fallback:hover:not(:disabled) {
  border-color: var(--primary-light);
  background: rgba(27, 74, 156, 0.14);
  box-shadow: 0 8px 28px rgba(27, 74, 156, 0.2);
  transform: translateY(-1px);
}

.auth-google-fallback:active:not(:disabled) {
  transform: translateY(0);
}

.auth-google-fallback:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-google-fallback .auth-google-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.auth-google-fallback img {
  width: 18px;
  height: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-method-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.auth-note-google {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

.auth-admin-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  background: rgba(27,74,156,0.08);
  border-radius: 8px;
  border: 1px solid rgba(27,74,156,0.2);
}

#register-error {
  display: none;
  color: #f87171;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .human-gate {
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
    align-items: flex-start;
    overflow-y: auto;
  }

  .human-gate-panel {
    margin-top: 10vh;
    padding: 1.5rem 1.15rem;
  }

  .auth-oauth-block,
  .auth-google-mount {
    width: 100%;
  }

  .auth-google-mount > div,
  .auth-google-mount iframe {
    max-width: 100% !important;
  }
}
