/* Auth gate styles — shown when a Telegram-registered user must complete profile */

.site-auth-gate-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 220;
  padding: 0.65rem 1rem max(0.65rem, env(safe-area-inset-top));
  padding-top: max(0.65rem, env(safe-area-inset-top));
  background: linear-gradient(135deg, #b45309 0%, #d97706 55%, #f59e0b 100%);
  color: #fffbeb;
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.55);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  pointer-events: auto;
}

.site-auth-gate-banner__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-auth-gate-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  color: #fffbeb;
  flex-shrink: 0;
}

.site-auth-gate-banner__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
}

.site-auth-gate-banner__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fffbeb;
  letter-spacing: 0.01em;
}

.site-auth-gate-banner__hint {
  font-size: 0.8rem;
  color: rgba(255, 251, 235, 0.92);
  margin-top: 0.125rem;
}

.site-auth-gate-banner__cta {
  flex-shrink: 0;
  background: #1a2332;
  color: #fffbeb;
  border: 0;
  border-radius: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  font-family: inherit;
}

.site-auth-gate-banner__cta:hover {
  background: #181f2e;
}

.site-auth-gate-banner__cta:active {
  transform: translateY(1px);
}

@media (max-width: 540px) {
  .site-auth-gate-banner__inner {
    gap: 0.5rem;
  }
  .site-auth-gate-banner__cta {
    font-size: 0.7rem;
    padding: 0.45rem 0.7rem;
  }
  .site-auth-gate-banner__hint {
    display: none;
  }
}

/* Push site content below the banner */
body[data-auth-gate="true"] {
  padding-top: 4rem;
}

@media (max-width: 540px) {
  body[data-auth-gate="true"] {
    padding-top: 4.25rem;
  }
}

/* Visually disable navigation while gated */
body[data-auth-gate="true"] .site-sidebar a,
body[data-auth-gate="true"] .site-sidebar button:not([data-auth-gate-allow]),
body[data-auth-gate="true"] .site-bottom-nav a,
body[data-auth-gate="true"] .site-bottom-nav button:not([data-auth-gate-allow]),
body[data-auth-gate="true"] .site-header a:not([data-auth-gate-allow]),
body[data-auth-gate="true"] .site-header button:not([data-auth-gate-allow]),
body[data-auth-gate="true"] .site-footer a,
body[data-auth-gate="true"] .site-footer button {
  pointer-events: none !important;
  opacity: 0.4 !important;
  filter: grayscale(0.45);
}

/* But keep the brand/home link, theme toggle, locale switcher, and notification bells working
   (they are already covered or harmless). */
body[data-auth-gate="true"] .site-sidebar [data-theme-toggle],
body[data-auth-gate="true"] .site-sidebar [data-locale-switcher],
body[data-auth-gate="true"] .site-header [data-theme-toggle],
body[data-auth-gate="true"] .site-header [data-locale-switcher] {
  pointer-events: auto !important;
  opacity: 1 !important;
  filter: none;
}

/* Block floating chat widget while gated */
body[data-auth-gate="true"] #site-chat-shell,
body[data-auth-gate="true"] #site-chat-root,
body[data-auth-gate="true"] .site-chat-toggle {
  display: none !important;
}

/* Block search palette trigger button while gated */
body[data-auth-gate="true"] #site-search-trigger,
body[data-auth-gate="true"] #site-search-trigger-mobile,
body[data-auth-gate="true"] #site-search-palette {
  display: none !important;
}
