/* unified media window css */

/* The window wears the tour's own colours (Ben, 2026-10-11: it was slate blue on every tour, whatever the theme): its panel is the
   theme's panel colour at the theme's own glass, laid over a dark veil tinted with that colour, so it reads as the tour's other panels
   do (a pale, see-through panel stays readable because the veil under it is dark); its words are the theme's text colour and its
   marks (the tab in use) the theme's icon colour. The fixed colours stay as what a browser falls back on. */
.media-window-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(15, 23, 42, 0.85); /* slate 900 */
  background-color: color-mix(in srgb, var(--accent-solid, rgb(15, 23, 42)) 22%, rgba(0, 0, 0, 0.88));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.media-window-modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.media-window-modal.hidden {
  display: none;
}

.media-window-container {
  width: 90vw;
  max-width: 1200px;
  height: 85vh;
  background: var(--primary-bg, rgba(30, 41, 59, 0.8));
  color: var(--text-main, #fff);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.media-window-modal:not(.hidden) .media-window-container {
  transform: scale(1) translateY(0);
}

@media (max-width: 768px) {
  .media-window-container {
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    border-radius: 0;
    border: none;
  }

  /* On a phone the bar at the foot stays in sight: the window ends above it (media-window.js says how tall the bar is; a tour with
     no bar there has the whole screen, as before). Its buttons then open and close the window (Ben, 2026-10-11). */
  .media-window-modal {
    bottom: var(--mobile-bottom-nav-height, 0px);
    align-items: stretch;
  }
  .media-window-modal .media-window-container {
    height: 100%;
  }

  /* and its tabs and its cross are larger there, for a finger */
  .media-window-tab {
    padding: 0 14px;
    font-size: 15px;
  }
  .media-window-tab svg {
    width: 20px;
    height: 20px;
  }
  .media-window-close {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
  }
}

/* The window's scrollbars: thin, in the tour's text colour and faint (a wide white bar ran down the right of a long list) */
.media-window-pane,
.media-window-pane * {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  scrollbar-color: color-mix(in srgb, var(--text-main, #fff) 30%, transparent) transparent;
}

.media-window-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.05));
  padding: 0 16px;
  height: 60px;
  flex-shrink: 0;
}

.media-window-tabs {
  display: flex;
  gap: 8px;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.media-window-tabs::-webkit-scrollbar {
  display: none;
}

.media-window-tab {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #94a3b8; /* slate 400 */
  color: color-mix(in srgb, var(--text-main, #fff) 62%, transparent);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.media-window-tab:hover {
  color: var(--text-main, #f8fafc);
}

.media-window-tab.active {
  color: var(--icon-color, #818cf8);
  border-bottom-color: var(--icon-color, #818cf8);
}

.media-window-tab svg {
  margin-inline-end: 8px;
  width: 18px;
  height: 18px;
}

.media-window-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  color: color-mix(in srgb, var(--text-main, #fff) 62%, transparent);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-window-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main, white);
}

.media-window-content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
}

/* "This room" / "Whole tour", beside the tabs while a Room Info icon opened the window and both have something */
.media-window-scope {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  margin: 0 8px 0 12px;
}
.media-window-scope[hidden] {
  display: none;
}
.media-window-scope-btn {
  appearance: none;
  padding: 6px 12px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
  border-radius: 999px;
  background: transparent;
  color: var(--text-main, #fff);
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}
.media-window-scope-btn:hover,
.media-window-scope-btn[aria-pressed='true'] {
  background: var(--hover-bg-overlay, rgba(255, 255, 255, 0.1));
}
.media-window-scope-btn[aria-pressed='true'] {
  border-color: var(--text-main, #fff);
  font-weight: 600;
}

.media-window-pane {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  overflow-y: auto;
  padding: 24px;
}

.media-window-pane.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* Specific Pane Styles */
#pane-overview {
  padding: 40px;
  text-align: center;
  color: var(--text-main, white);
}
#pane-floorplan,
#pane-geo {
  padding: 0;
}
#pane-panos {
  padding: 24px;
}

#pane-geo,
#pane-floorplan {
  padding: 0;
}
