/* Bientôt mini app — loaded after the app's stylesheets. */

/* Telegram draws its own header above the page: no status-bar space, just a little air */
html.tg.native,
html.tg.native.statusbar-hidden {
  --status: calc(var(--native-top, 0px) + 8px);
}

/* a wide browser window: keep the phone-width layout in the middle */
html.tg #mobile {
  max-width: 560px;
  margin: 0 auto;
}

/* not in the mini app: Google sign-in, organizer mode, the door scanner */
html.tg .welcome-btn-google,
html.tg .welcome-divider,
html.tg .auth-google-btn,
html.tg .auth-or,
html.tg [onclick="becomeOrganizer()"],
html.tg [onclick^="openScannerFor"] {
  display: none !important;
}

/* inside Telegram the account is Telegram's: logging out would only sign straight back in */
html.tg-in [onclick="logOutUser()"] {
  display: none !important;
}

/* signing in / "open in Telegram" */
#tg-cover {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px;
  text-align: center;
  background: var(--ground);
  color: var(--text);
  transition: opacity .25s ease;
}

#tg-cover.hide {
  opacity: 0;
  pointer-events: none;
}

#tg-cover .tg-cover-mark {
  margin-bottom: 10px;
}

#tg-cover h2 {
  margin: 0;
  font-family: var(--display);
  font-size: var(--fs-title);
}

#tg-cover p {
  margin: 0;
  max-width: 320px;
  color: var(--muted);
  line-height: 1.4;
}

#tg-cover .btn {
  min-width: 220px;
  margin-top: 8px;
  text-decoration: none;
}

#tg-cover .text-btn {
  width: auto;
}
