/* ============================================================
   G'ART Studio branding for the tour (SuperSplat viewer v1.37, sse- markup).
   Adapted from the Digital Twins kit (dtwins-viewer.css): the new viewer
   prefixes every class with sse- and themes through --sse-accent.
   Pair with gart-viewer.js.
   ============================================================ */
.sse-viewer {
  --sse-accent: #EDB988;  /* <-- brand colour (g-artstudio.ru) */
  --gart-ink: #1C1C1C;
}

/* Hide stock SuperSplat toolbar buttons we don't expose */
.sse-viewer .sse-buttonsContainer .sse-orbitCamera,
.sse-viewer .sse-buttonsContainer .sse-info,
.sse-viewer .sse-showCollisionRow {
  display: none !important;
}

/* Hide the stock SuperSplat branding badge (auto-shown when embedded),
   the stock loading bar and the blurred poster: the splash replaces them */
.sse-viewer .sse-viewerBranding,
.sse-viewer .sse-loadingWrap {
  display: none !important;
}

/* --- logo that fills left to right with --p (0%..100%) --- */
.sse-viewer .gartLogo {
  position: relative;
  line-height: 0;
}
.sse-viewer .gartLogo > svg {
  display: block;
  width: 100%;
  height: auto;
}
.sse-viewer .gartLogo > svg + svg {
  position: absolute;
  inset: 0;
  /* no transition: it runs on the main thread, which stalls while splats upload,
     so the fill lagged behind the percentage */
  clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0);
}

/* --- start-up splash (injected by gart-viewer.js) --- */
.sse-viewer .gartSplash {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--gart-ink);
  transition: opacity 700ms ease;
}
.sse-viewer .gartSplash.gartDone {
  opacity: 0;
  pointer-events: none;
}
.sse-viewer .gartSplash .gartLogo {
  width: min(56vw, 300px);
}
.sse-viewer .gartSplash .gartLogo > svg:first-child {
  color: rgba(255, 255, 255, 0.12);
}
.sse-viewer .gartSplash .gartLogo > svg + svg {
  color: #fff;
}
.sse-viewer .gartPercent {
  font: 500 13px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.2em;
  color: var(--sse-accent);
  font-variant-numeric: tabular-nums;
}

/* --- room-switch loader of the tour: logo instead of the stock card.
   It sits on the frozen, dimmed frame of the transition, so the logo is light. --- */
.sse-viewer .tour-loader {
  background: rgba(28, 28, 28, 0.55) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  min-width: 0 !important;
  padding: 22px 28px 18px !important;
  border-radius: 12px !important;
}
.sse-viewer .tour-loader .gartLogo {
  width: 150px;
  margin: 0 auto 14px;
}
.sse-viewer .tour-loader .gartLogo > svg:first-child {
  color: rgba(255, 255, 255, 0.18);
}
.sse-viewer .tour-loader .gartLogo > svg + svg {
  color: #fff;
}
.sse-viewer .tour-loader .tour-loader-text {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.sse-viewer .tour-loader .tour-loader-bar {
  display: none;
}

/* --- G'ART badge (injected by gart-viewer.js) --- */
.sse-viewer .gartBrand {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.3);
  color: #E0DCDD;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease;
}
.sse-viewer .gartBrand:hover {
  color: #fff;
}
.sse-viewer .gartBrand > svg {
  display: block;
  height: 16px;
  width: auto;
}

/* brand background from the first paint, before the viewer builds its ui */
html,
body {
  background: #1C1C1C;
}

/* embedded as a landing hero (?embed, see gart-viewer.js): the bare scene, the host page
   has its own buttons; vertical swipes scroll the host page, sideways ones look around */
html.gartEmbed .sse-viewer .sse-controlsWrap,
html.gartEmbed .sse-viewer .sse-controlsHint,
html.gartEmbed .sse-viewer .gx-actions,
html.gartEmbed .sse-viewer .gx-caption {
  display: none !important;
}
html.gartEmbed .sse-viewer,
html.gartEmbed .sse-viewer * {
  touch-action: pan-y;
}
