/* Layout: containers, nav, potree and panel positioning */
.container {
  display: grid;
  /* header, main content (fills available space), footer/event-log */
  grid-template-rows: min-content 1fr min-content;
  height: 100vh;
  width: 320px;
  border-right: 1px solid var(--border-color);
  position: relative;
  z-index: 2;
}

.header {
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.header h1 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary, #fff);
}

.potree-container {
  position: relative !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: move;
}

.photosphere-container {
  position: relative !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  z-index: 0;
}

.photosphere-container.placing-marker,
.photosphere-container.placing-marker * {
  cursor: var(--placing-marker-cursor, crosshair) !important;
}

/* Nav container */
.nav-container {
  transition: transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 30;
  width: var(--right-panel-width);
  max-width: var(--right-panel-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  box-shadow: 8px 0 16px rgba(0, 0, 0, 0.45);
}

.collapsed {
  transform: translateX(-100%);
}

/* Ensure tree containers inside panels scroll when content overflows */
.container > .panel-container {
  overflow-y: auto;
  grid-row: 2;
  min-height: 0;
}

/* Shared panel-toggle */
.panel-toggle {
  position: fixed;
  top: 12px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 180ms ease, background-color 150ms ease,
    left 320ms cubic-bezier(0.2, 0.9, 0.2, 1),
    right 320ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.panel-toggle:hover {
  background-color: var(--bg-hover);
  color: var(--icon-hover);
  transform: translateY(-1px);
}
.left-nav-toggle.panel-toggle {
  left: 12px;
}
.right-panel-toggle.panel-toggle {
  right: 12px;
}
.menu-img {
  width: 24px !important;
  height: 24px !important;
  filter: invert(1);
}

#potree_map_header {
  height: 40px;
  top: 25px;
  z-index: 10;
  transition: top 0.1s ease-in-out;
}

#potree_map_header.show {
  top: -13px;
}
