html, body {
  height: 100%;
  margin: 0;
  background: #000;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
#app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
}
/* Fluint wordmark, desktop panel + mobile corner. Lives here rather than in
   a style attribute so the CSP can stay `style-src 'self'` (an inline style
   attribute would be blocked by it). */
.brand-logo {
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* In-panorama navigation chips. Real <button>s wrapping a decorative
   <img aria-hidden>, so they are keyboard-focusable and Enter/Space work. */
.hotspot-icon {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  width: 22px;
  height: 22px;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  user-select: none;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hotspot-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Keyboard focus must stay visible over arbitrary panorama imagery */
.hotspot-icon:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
  border-radius: 50%;
}

/* Hidden by the "hide navigation" toggle. `visibility` (not just opacity)
   so hidden chips leave the tab order instead of staying invisibly
   focusable — and because it is a body class, hotspots created later when
   a room loads inherit the state automatically. */
body.navigation-hidden .hotspot-icon {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#pano {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
/* Future bottom overlay (initially hidden) */
#bottom-overlay {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  transform: translateY(100%);
  transition: transform 240ms ease;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 12px 16px;
  z-index: 4;
}
#bottom-overlay.show { transform: translateY(0%); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.control-panel {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1688px, calc(100vw - 32px));
  height: 104px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 56.5px;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1),
              inset 0px 4px 4px 0px rgba(255, 255, 255, 0.12);
  z-index: 100;
  transition: transform 0.4s ease, opacity 0.4s ease;
  overflow: visible;
  display: flex;
  flex-direction: row;
}

.control-panel.collapsed {
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.control-panel.collapsed .col-2,
.control-panel.collapsed .col-4 {
  visibility: hidden;
}

.panel-column {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: white;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  padding: 0 20px;
}

/* Column 1: Project Title - fit content */
.col-1 {
  flex: 0 0 auto;
  padding-left: 57px;
  justify-content: flex-start;
}

/* Column 2: Control Buttons - grow to fill */
.col-2 {
  flex: 1;
  display: flex;
  gap: 50px;
  justify-content: center;
}

/* Column 3: Close Button - fit content, always centered */
.col-3 {
  flex: 0 0 auto;
  padding: 0 118px;
}

/* Column 4: Rooms - grow to fill, align to start */
.col-4 {
  flex: 1;
  justify-content: flex-start;
}

/* Column 5: Branding - fit content */
.col-5 {
  flex: 0 0 auto;
  padding-right: 57px;
  justify-content: flex-end;
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-name {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}

.project-location {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}

.control-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  transition: opacity 0.2s ease;
}

.control-btn:hover {
  opacity: 0.8;
}

.control-btn .icon {
  width: auto;
  height: 16px;
  display: block;
}

.control-btn .label {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  font-style: normal;
  line-height: normal;
  letter-spacing: 0.035rem;
  color: #FFF;
  text-align: center;
  white-space: nowrap;
}

.close-btn {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  position: relative;
  width: 35px;
  height: 35px;
}

.close-btn:hover {
  opacity: 0.8;
}

/* Close X symbol (shown when panel is open) */
.close-x {
  position: absolute;
  top: 0;
  left: 0;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1),
              inset 0px 4px 4px 0px rgba(33, 33, 33, 0.12);
  color: #fff;
  font-family: 'Lato', sans-serif;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

/* Close arrow icon (shown when panel is collapsed) */
.close-arrow {
  position: absolute;
  top: 0;
  left: 0;
  width: 35px;
  height: 35px;
  display: none;
  transition: opacity 0.3s ease;
  transform: rotate(0deg); /* Arrow points up to indicate opening */
}

.control-panel:not(.collapsed) .close-x {
  display: flex !important;
}

.control-panel:not(.collapsed) .close-arrow {
  display: none !important;
}

.control-panel.collapsed .close-x {
  display: none !important;
}

.control-panel.collapsed .close-arrow {
  display: block !important;
}

.rooms-selector {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.room-shapes {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 45px;
}

.room-shape {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.room-shape:hover {
  transform: scale(1.1);
}

.room-shape.active {
  opacity: 1;
}

.room-shape:not(.active) {
  opacity: 0.5;
}

.room-shape svg,
.room-shape img {
  display: block;
  width: 1.5rem;
  height: auto;
}

.rooms-label {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  font-style: normal;
  line-height: normal;
  letter-spacing: 0.035rem;
  color: #FFF;
  text-align: center;
  white-space: nowrap;
}

.fluint-brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 96px;
  height: 36px;
}

.vertical-room-nav {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 32px;
  z-index: 200;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: auto;
}

/* Hidden by the "show/hide rooms" toggle — one body class drives both the
   desktop button and its mobile menu twin. */
body.room-nav-hidden .vertical-room-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.room-nav-btn {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.2s ease, filter 0.2s ease;
}

.room-nav-btn:hover {
  transform: scale(1.15);
  filter: brightness(1.2);
}

.room-nav-btn:active {
  transform: scale(0.95);
}

.room-nav-btn svg,
.room-nav-btn img {
  display: block;
}

.room-nav-btn.active {
  opacity: 1;
}

.room-nav-btn:not(.active) {
  opacity: 0.5;
}

/* Focus-visible styles for keyboard navigation accessibility */
.control-btn:focus-visible,
.room-nav-btn:focus-visible,
.room-shape:focus-visible,
.menu-control-btn:focus-visible,
.mobile-gyro-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
  border-radius: 4px;
}

.close-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
  border-radius: 50%;
}

/* Mobile Gyroscope Button */
.mobile-gyro-container {
  display: none;
  position: fixed;
  bottom: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.mobile-gyro-btn {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  transition: opacity 0.2s ease;
}

.mobile-gyro-btn:hover {
  opacity: 0.8;
}

.mobile-gyro-btn .gyro-icon {
  width: 40px;
  height: 40px;
  display: block;
}

.mobile-gyro-btn .gyro-label {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}

/* Top-Right Menu (Mobile Only) */
.top-right-menu {
  position: fixed;
  top: 12px;
  right: 16px;
  width: 50px;
  border-radius: 56.5px;
  border: 1px solid rgba(255, 255, 255, 0.40);
  background: rgba(255, 255, 255, 0.20);
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.10), 0 4px 4px 0 rgba(255, 255, 255, 0.12) inset;
  backdrop-filter: blur(12.5px);
  -webkit-backdrop-filter: blur(12.5px);
  z-index: 150;
  padding: 0 0 24px 0;
  display: none;
  flex-direction: column;
  align-items: center;
  transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease;
}

/* Collapsed state - remove background, keep button visible */
.top-right-menu.collapsed {
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  padding: 0;
}

.top-right-menu.collapsed .menu-controls,
.top-right-menu.collapsed .menu-separator,
.top-right-menu.collapsed .menu-rooms {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.menu-controls,
.menu-separator,
.menu-rooms {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Menu Close Button (Position 1) */
.menu-close-btn {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.menu-close-btn:hover {
  opacity: 0.8;
}

/* Remove focus outline for mouse/touch users */
.menu-close-btn:focus {
  outline: none;
}

/* Add visible focus indicator for keyboard users */
.menu-close-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
  border-radius: 50%;
}

.menu-icon-menu {
  display: none;
  width: auto;
  height: 42px;
}

.menu-close-icon {
  font-family: 'Lato', sans-serif;
  font-size: 32px;
  line-height: 1;
  color: #fff;
  letter-spacing: 0.04em;
  display: block;
}

/* When collapsed: show menu icon, hide × */
.top-right-menu.collapsed .menu-icon-menu {
  display: block;
}

.top-right-menu.collapsed .menu-close-icon {
  display: none;
}

/* Menu Controls Container (Position 2) */
.menu-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  padding: 0;
}

/* Menu Control Buttons - Icons Only */
.menu-control-btn {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.menu-control-btn:hover {
  opacity: 0.8;
}

.menu-control-btn img {
  width: auto;
  height: 15px;
  display: block;
}

/* Menu Separator (Position 3) */
.menu-separator {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-separator img {
  display: block;
  width: auto;
  height: auto;
}

/* Menu Room Shapes (Position 4) */
.menu-rooms {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
}

.menu-rooms .room-shape {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.menu-rooms .room-shape:hover {
  opacity: 0.7;
}

.menu-rooms .room-shape svg,
.menu-rooms .room-shape img {
  display: block;
  width: 24px;
  height: 24px;
}

/* Mobile-only Elements (Hidden on Desktop) */
.mobile-project-info,
.mobile-fluint-brand {
  display: none;
}

/* Responsive Design */
@media (max-width: 1564px) {
  .control-panel {
    display: none;
  }

  .mobile-project-info {
    display: block;
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 100;
  }

  .mobile-fluint-brand {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
  }

  .mobile-project-info .project-name {
    font-size: clamp(14px, 4vw, 26px);
  }

  .mobile-project-info .project-location {
    font-size: clamp(12px, 3vw, 16px);
  }

  .mobile-fluint-brand .fluint-brand {
    transform: scale(0.75);
    transform-origin: bottom right;
  }

  .mobile-gyro-btn .gyro-label {
    font-size: clamp(12px, 2.5vw, 16px);
  }

  .mobile-gyro-btn .gyro-icon {
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
  }

  .mobile-gyro-container {
    display: block;
  }

  .top-right-menu {
    display: flex;
  }
}


