.product-showroom {
  --room-panel-width: clamp(224px, 17vw, 270px);
  --room-panel-edge: calc(14px + var(--safe-right));
  --room-panel-bottom: calc(12px + var(--safe-bottom));
}

.product-showroom #tour {
  min-height: 0;
}

.product-showroom .showroom-brand {
  flex: 0 1 auto;
  min-width: 0;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5, 15, 27, .85);
}

.showroom-brand img {
  display: block;
  width: clamp(120px, 27vw, 196px);
  height: clamp(35px, 6vw, 49px);
  object-fit: contain;
}

.product-showroom .room-nav {
  top: auto;
  right: var(--room-panel-edge);
  bottom: var(--room-panel-bottom);
  left: auto;
  z-index: 24;
  display: flex;
  flex-direction: column;
  width: max-content;
  max-width: calc(100% - 28px - var(--safe-left) - var(--safe-right));
  max-height: min(56%, calc(100% - 80px - var(--safe-top) - var(--safe-bottom)));
  margin: 0;
  padding: 4px;
  border-radius: 15px;
  background: rgba(4, 13, 23, .9);
}

.product-showroom .room-panel-open .room-nav {
  width: min(360px, calc(100% - 28px - var(--safe-left) - var(--safe-right)));
}

.room-nav-toggle {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  text-align: start;
}

.room-nav-toggle:hover {
  background: rgba(255, 255, 255, .1);
}

.room-nav-toggle small {
  margin-inline-start: auto;
  color: var(--muted);
  white-space: nowrap;
}

.room-nav-toggle b {
  color: var(--gold-300);
}

.room-nav-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-90deg);
}

.room-nav-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.room-nav-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 0 6px 6px;
}

.product-showroom .room-nav [hidden] {
  display: none;
}

.room-search {
  flex: none;
  width: 100%;
  min-height: 42px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #132235;
  color: var(--white);
  font: inherit;
  font-size: 16px;
}

.room-search::placeholder {
  color: var(--muted);
  font-size: 12px;
}

.room-search-empty {
  margin: 3px 4px;
  color: var(--muted);
  font-size: 13px;
}

.room-search:focus-visible,
.room-nav-toggle:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: -2px;
}

.product-showroom .room-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px;
}

.product-showroom .room-button {
  flex: 0 0 62px;
  width: 100%;
}

.product-showroom .room-button span {
  font-size: 11px;
}

.showroom-embedded {
  --room-panel-bottom: calc(64px + var(--safe-bottom));
}

.product-showroom #soundButton {
  display: grid;
}

.product-showroom #soundButton[aria-pressed="true"] {
  color: #06111f;
  background: var(--gold-300);
}

.showroom-embedded .topbar {
  justify-content: flex-start;
  gap: 8px;
}

.showroom-embedded #infoButton,
.showroom-embedded #fullscreenButton {
  display: none;
}

@media (min-width: 561px) and (max-width: 700px) {
  .showroom-embedded .showroom-brand img {
    width: 120px;
  }
}

@media (min-width: 901px) and (min-height: 501px) {
  .product-showroom .room-nav {
    top: calc(94px + var(--safe-top));
    bottom: auto;
    max-height: calc(100% - 108px - var(--safe-top) - var(--safe-bottom));
  }

  .product-showroom .room-panel-open .room-nav {
    width: var(--room-panel-width);
  }

  .room-nav-toggle svg {
    transform: rotate(180deg);
  }

  .room-nav-toggle[aria-expanded="true"] svg {
    transform: none;
  }

  .product-showroom .room-panel-open .controls {
    right: calc(var(--room-panel-edge) + var(--room-panel-width) + 12px);
  }

  .product-showroom .room-panel-open .room-title {
    max-width: min(560px, calc(100% - var(--room-panel-width) - 110px));
  }
}

@media (max-width: 900px), (max-height: 500px) {
  .product-showroom .room-panel-open .controls {
    visibility: hidden;
  }
}

@media (max-width: 560px) {
  .showroom-embedded .topbar {
    top: calc(8px + var(--safe-top));
  }

  .showroom-embedded .room-title {
    top: calc(109px + var(--safe-top));
  }
}

@media (max-height: 380px) {
  .product-showroom .room-nav {
    max-height: calc(100% - 74px - var(--safe-top) - var(--room-panel-bottom));
  }
}
