/**
 * Critical viewer shell — FOUC prevention.
 * Loaded immediately after tokens.css, before gearshift.css.
 * Must win over monolith html/body { overflow: hidden } defaults.
 * See docs/CSS_AUDIT.md Phase CSS-1.
 */

html.gs-pre-shell--viewer,
body.gs-shell--viewer {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: none !important;
}

html:has(body.gs-shell--viewer),
html:has(body.gs-shell--admin) {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

html.gs-pre-shell--viewer::-webkit-scrollbar,
body.gs-shell--viewer::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html.gs-pre-shell--viewer [data-admin-only],
html.gs-pre-shell--viewer [data-admin-entry],
html.gs-pre-shell--viewer .gs-header,
html.gs-pre-shell--viewer .gs-sidebar,
html.gs-pre-shell--viewer .gs-results,
body.gs-shell--viewer:not(.gs-account-can-admin) [data-admin-only],
body.gs-shell--viewer.gs-account-can-admin:not(.gs-admin-tools-active) [data-admin-only],
body.gs-shell--viewer:not(.gs-account-can-admin) [data-admin-entry],
body.gs-shell--viewer .gs-header,
body.gs-shell--viewer .gs-sidebar,
body.gs-shell--viewer .gs-results {
  display: none !important;
}

body:not(.gs-account-can-staff) [data-staff-only] {
  display: none !important;
}

html.gs-pre-shell--viewer .gs-viewer-topnav,
body.gs-shell--viewer .gs-viewer-topnav {
  display: block !important;
}

body.gs-shell--viewer .gs-shell,
body.gs-shell--viewer .gs-workspace,
body.gs-shell--viewer .gs-main {
  overflow: visible !important;
  max-width: none !important;
}

body.gs-shell--viewer .gs-viewer-topnav__profile-btn {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 156px !important;
  min-height: 40px !important;
  overflow: hidden !important;
  border-radius: var(--gs-radius-pill) !important;
}

body.gs-shell--viewer .gs-viewer-topnav__profile-avatar {
  flex: 0 0 28px !important;
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: var(--gs-radius-pill) !important;
  object-fit: cover !important;
  object-position: center !important;
}

body.gs-shell--viewer .gs-rewards-send--compact {
  max-width: 360px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.gs-shell--viewer .gs-rewards-send--compact .gs-rewards-send__login {
  flex: 0 1 148px !important;
  max-width: 148px !important;
}
