/**
 * Horizon Spatial — assets/css/host.css.
 *
 * Namespaced host UI follows the theme's shared RMS palette.
 *
 * @package Horizon_Spatial
 * @author  Dwayne Silvera
 * @since   1.0.0
 */
.rmsre-component {
  width: 100%;
  min-width: 0;
  --re-blue: var(--rms-color-brand-blue, #283891);
  --re-yellow: var(--rms-color-brand-yellow, #ffde16);
  --re-ink: var(--rms-color-ink, #07131b);
  --re-paper: var(--rms-color-paper, #f3f2ec);
}
.rmsre-component [hidden] {
  display: none !important;
}
.rmsre-component > .rmsre-visually-hidden,
#rmsih[class] .rmsre-component > .rmsre-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.rmsre-start {
  display: grid;
  justify-items: center;
  gap: clamp(20px, 3vw, 28px);
  padding-bottom: 4px;
}
.rmsre-preview {
  width: 100%;
  min-width: 0;
  border: 1px solid #6e8fa330;
  border-radius: 16px;
  overflow: hidden;
  background: var(--re-ink);
}
.rmsre-start img {
  display: block;
  width: 100%;
  height: clamp(300px, 45vw, 570px);
  object-fit: contain;
}
.rmsre-component .rmsre-play,
#rmsih .rmsre-component .rmsre-play {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #7d94f2;
  border-radius: 12px;
  padding: 10px 20px 10px 10px;
  background: linear-gradient(155deg, #3958c8, #283891);
  color: #fff;
  box-shadow:
    inset 0 1px 0 #ffffff32,
    0 3px 0 #111d50;
  font:
    600 13px/1.3 system-ui,
    sans-serif;
  white-space: nowrap;
  cursor: pointer;
  min-height: 52px;
  transition:
    background-color 0.18s,
    border-color 0.18s;
}
.rmsre-component .rmsre-play:hover,
#rmsih .rmsre-component .rmsre-play:hover {
  border-color: var(--re-yellow);
  filter: brightness(1.12);
  color: #fff;
}
.rmsre-play-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--re-blue);
  color: white;
}
.rmsre-play-icon svg {
  width: 20px;
  height: 20px;
}
.rmsre-component button:focus-visible,
.rmsre-component a:focus-visible {
  outline: 2px solid var(--re-yellow);
  outline-offset: 5px;
}
.rmsre-close-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
}
.rmsre-component .rmsre-close,
.rmsre-component .rmsre-separate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font:
    500 12px/1.4 system-ui,
    sans-serif;
  border: 1px solid #6e8fa350;
  border-radius: 8px;
  padding: 10px 14px;
  color: inherit;
  background: transparent;
  text-decoration: none;
}
.rmsre-component .rmsre-close:hover,
.rmsre-component .rmsre-separate:hover {
  border-color: var(--re-yellow);
  color: var(--re-yellow);
}
.rmsre-component iframe {
  display: block;
  width: 100%;
  height: 1050px;
  border: 1px solid #6e8fa330;
  border-radius: 14px;
  background: var(--re-ink);
}
.rmsre-status {
  font:
    12px/1.6 system-ui,
    sans-serif;
  opacity: 0.8;
}
.rmsre-component .rmsre-close {
  cursor: pointer;
}
@media (max-width: 600px) {
  .rmsre-close-row {
    justify-content: space-between;
    gap: 8px;
  }
  .rmsre-component .rmsre-close,
  .rmsre-component .rmsre-separate {
    font-size: 11px;
    padding: 9px 11px;
  }
  .rmsre-start img {
    height: 350px;
  }
  .rmsre-component .rmsre-play,
  #rmsih .rmsre-component .rmsre-play {
    font-size: 12px;
    bottom: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rmsre-component button {
    transition: none !important;
  }
}

/* Branded introduction occupies the viewer only; the rest of the page stays usable. */
.rmsre-stage-shell {
  position: relative;
  isolation: isolate;
}
.rmsre-view[aria-busy='true'] iframe {
  height: clamp(400px, 65svh, 620px) !important;
  opacity: 0;
  pointer-events: none;
}
.rmsre-intro {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  border: 1px solid #ffffff22;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 25%, #28389138, transparent 65%), var(--re-ink);
  color: var(--rms-color-white, #ffffff);
  opacity: 1;
  transition: opacity 650ms ease;
}
.rmsre-intro.is-ready {
  opacity: 0;
  pointer-events: none;
}
.rmsre-intro-card {
  width: min(100%, 330px);
  text-align: center;
}
.rmsre-component .rmsre-intro-logo {
  display: block;
  width: 155px;
  height: 58px;
  margin: 0 auto;
  padding: 6px 9px;
  border-radius: 5px;
  background: #fff;
  object-fit: contain;
}
.rmsre-intro-brand {
  font:
    700 25px/1.2 system-ui,
    sans-serif;
}
.rmsre-intro-scene {
  height: 170px;
  display: grid;
  place-items: center;
  perspective: 650px;
}
.rmsre-intro-roof {
  position: relative;
  width: 135px;
  height: 95px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-32deg);
  animation: rmsre-intro-orbit 6s ease-in-out infinite;
}
.rmsre-intro-roof span {
  position: absolute;
  inset: 0;
  border: 1px solid #ffffff70;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #8a99a4 0 9px, #576c7a 10px 13px);
  transform: translateZ(-20px);
}
.rmsre-intro-roof span:nth-child(2) {
  background: var(--re-yellow);
  transform: translateZ(0);
  animation: rmsre-intro-middle 3.2s ease-in-out infinite;
}
.rmsre-intro-roof span:nth-child(3) {
  background: var(--re-blue);
  transform: translateZ(20px);
  animation: rmsre-intro-top 3.2s ease-in-out infinite;
}
.rmsre-component .rmsre-intro-label {
  margin: 0 0 16px;
  color: inherit;
  text-align: center !important;
  font:
    500 14px/1.5 system-ui,
    sans-serif;
}
.rmsre-load-track {
  height: 5px;
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff26;
}
.rmsre-load-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--re-yellow);
  transition: width 200ms ease;
}
.rmsre-load-caption {
  display: block;
  margin-top: 10px;
  font:
    12px/1.5 system-ui,
    sans-serif;
  opacity: 0.75;
}
.rmsre-component .rmsre-retry {
  margin-top: 18px;
  padding: 10px 20px;
  border: 1px solid var(--re-yellow);
  border-radius: 8px;
  background: var(--re-blue);
  color: #fff;
  min-height: 44px;
  cursor: pointer;
}
@keyframes rmsre-intro-orbit {
  0%,
  100% {
    transform: rotateX(58deg) rotateZ(-32deg);
  }
  50% {
    transform: rotateX(62deg) rotateZ(-24deg);
  }
}
@keyframes rmsre-intro-middle {
  0%,
  100% {
    transform: translateZ(0);
  }
  50% {
    transform: translateZ(8px);
  }
}
@keyframes rmsre-intro-top {
  0%,
  100% {
    transform: translateZ(20px);
  }
  50% {
    transform: translateZ(42px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rmsre-intro,
  .rmsre-load-fill {
    transition: none;
  }
  .rmsre-intro-roof,
  .rmsre-intro-roof span {
    animation: none !important;
  }
}

/* A restrained studio presentation: material detail, depth and a soft brand halo. */
.rmsre-intro {
  background: radial-gradient(ellipse at 50% 40%, #ffffff08, transparent 65%), var(--re-ink);
}
.rmsre-intro::before {
  content: '';
  position: absolute;
  width: min(80%, 370px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--re-blue);
  filter: blur(70px);
  opacity: 0.22;
  pointer-events: none;
}
.rmsre-intro-card {
  position: relative;
  width: min(100%, 360px);
  padding: 24px;
  border: 1px solid #ffffff14;
  border-radius: 20px;
  background: #ffffff03;
}
.rmsre-intro-scene {
  position: relative;
}
.rmsre-intro-scene::before {
  content: '';
  position: absolute;
  width: 190px;
  height: 62px;
  bottom: 18px;
  border: 1px solid #ffffff12;
  border-radius: 50%;
  transform: rotate(-9deg);
}
.rmsre-intro-roof span {
  box-shadow: 0 4px 0 #384e5c;
}
.rmsre-intro-roof span:nth-child(2) {
  background:
    repeating-linear-gradient(90deg, #ffffff20 0 1px, transparent 1px 6px), var(--re-yellow);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--re-yellow) 62%, #07131b);
}
.rmsre-intro-roof span:nth-child(3) {
  background: linear-gradient(125deg, #ffffff24, transparent 65%), var(--re-blue);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--re-blue) 70%, #07131b);
}
.rmsre-load-fill {
  transition-duration: 450ms;
}
@media (prefers-reduced-motion: reduce) {
  .rmsre-load-fill {
    transition: none;
  }
}

/* Mobile studio portal: outside transformed page sections, with page scroll locked. */
.rmsre-component.rmsre-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100vh;
  height: 100dvh;
  max-width: none !important;
  margin: 0 !important;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px) !important;
  z-index: 2147483000;
  background: var(--re-ink, #07131b);
  overflow: hidden;
}
.rmsre-fullscreen .rmsre-view {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.rmsre-fullscreen .rmsre-close-row {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 6px 10px;
  margin: 0;
  justify-content: flex-end;
}
.rmsre-fullscreen .rmsre-separate {
  display: none;
}
.rmsre-fullscreen .rmsre-stage-shell {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
.rmsre-component.rmsre-fullscreen iframe,
.rmsre-component.rmsre-fullscreen .rmsre-view[aria-busy='true'] iframe {
  height: 100% !important;
  border: 0;
  border-radius: 0;
}
.rmsre-fullscreen .rmsre-intro {
  position: absolute;
  inset: 0;
}
.rmsre-fullscreen .rmsre-status {
  margin: 0 10px;
  flex: 0 0 auto;
}

.rmsre-component.rmsre-fullscreen {
  box-sizing: border-box;
  padding-right: env(safe-area-inset-right, 0px) !important;
  padding-left: env(safe-area-inset-left, 0px) !important;
}

/* The portal leaves the theme wrapper: explicitly own its foreground and button states. */
.rmsre-component .rmsre-close {
  color: #f3f2ec !important;
  background: linear-gradient(155deg, #263f52, #102532) !important;
  border: 1px solid #7892a6 !important;
  box-shadow:
    inset 0 1px 0 #ffffff2b,
    0 3px 0 #020a10;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 16px;
  font:
    600 14px/1.2 system-ui,
    sans-serif !important;
  cursor: pointer;
  opacity: 1 !important;
  position: relative;
  z-index: 10;
  transition:
    transform 160ms ease,
    background-color 160ms ease;
}
.rmsre-component .rmsre-close:hover,
.rmsre-component .rmsre-close:focus-visible {
  color: #07131b !important;
  background: #ffde16 !important;
  border-color: #ffde16 !important;
}
.rmsre-component .rmsre-close:focus-visible {
  outline: 2px solid #ffde16;
  outline-offset: 3px;
}
.rmsre-component .rmsre-close:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 3px #0005;
}
.rmsre-fullscreen .rmsre-close-row {
  position: relative;
  z-index: 20;
  background: var(--re-ink, #07131b);
}
@media (prefers-reduced-motion: reduce) {
  .rmsre-component .rmsre-close {
    transition: none;
  }
}
/* Open and Close use the same palette, dimensions and feedback as the studio controls. */
.rmsre-component :is(.rmsre-close, .rmsre-separate) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #7d94f2 !important;
  border-radius: 12px;
  background: linear-gradient(155deg, #3958c8, #283891) !important;
  color: #fff !important;
  font:
    600 14px/1.2 system-ui,
    sans-serif !important;
  text-decoration: none !important;
  box-shadow:
    inset 0 1px 0 #ffffff32,
    0 3px 0 #111d50;
  cursor: pointer;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}
.rmsre-component :is(.rmsre-close, .rmsre-separate):is(:hover, :focus-visible) {
  color: #fff !important;
  border-color: #ffde16 !important;
  filter: brightness(1.12);
}
.rmsre-component :is(.rmsre-close, .rmsre-separate):active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 3px #0005,
    0 1px 0 #111d50;
}
.rmsre-component :is(.rmsre-close, .rmsre-separate):focus-visible {
  outline: 2px solid #ffde16;
  outline-offset: 3px;
}
