/* The light menu, the 3D FPS counter, and the 2D zoom controls.
   Part 6 of 6 under roomcad/web/styles/. index.html loads them in
   this order, and that order IS the cascade order — do not reorder the links. */
/* ── Light choice menu ───────────────────────────────── */

#build-palette {
  position: relative;
}

.menu-anchor {
  position: relative;
  display: inline-flex;
}

#export-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  z-index: 40;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#export-menu[hidden] {
  display: none;
}

#export-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  padding: 7px 9px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  white-space: nowrap;
}

#export-menu button:hover {
  background: var(--accent-soft);
}

#export-menu .icon {
  width: 18px;
  text-align: center;
}

#light-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#light-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  padding: 7px 9px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

#light-menu button:hover {
  background: var(--accent-soft);
}

#light-menu .icon {
  width: 18px;
  text-align: center;
}

/* ── 3D FPS counter ──────────────────────────────────── */

#fps-counter {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #e9e9ee;
  background: rgba(10, 14, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 7px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* ── 2D zoom controls (bottom-right of the design area) ── */

#zoom-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#zoom-controls button {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

#zoom-controls button:hover {
  background: var(--accent-soft);
}

#zoom-level {
  min-width: 44px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  user-select: none;
  cursor: text;
}

#zoom-level input {
  width: 52px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 4px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#zoom-controls .zoom-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 4px;
}

/* The plan-rotate buttons use larger arrows so they're easy to hit. */
#zoom-controls #rotate-left,
#zoom-controls #rotate-right {
  font-size: 26px;
  line-height: 1;
  min-width: 40px;
  height: 40px;
  padding: 0;
}

/* A measured value, not a field: the overall size comes from the walls, so it
   is shown rather than typed. The hint says where the number comes from. */
.field .readout.measured {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text, #e8eef7);
}
/* Its own line: the sidebar is narrow enough that a hint beside the value
   wraps into it. */
.field .hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  line-height: 1.3;
  opacity: 0.55;
}

/* Version and sign-out sit together at the foot of the inspector. */
#app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* The sidebar is resizable and can be narrow; wrap rather than breaking the
     button's label across two lines. */
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}
#app-footer #sign-out {
  white-space: nowrap;
  background: none;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 5px;
  color: rgba(226, 232, 240, 0.66);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
}
#app-footer #sign-out:hover {
  border-color: rgba(226, 232, 240, 0.4);
  color: rgba(240, 245, 252, 0.95);
}
#app-footer #sign-out:focus-visible {
  outline: 2px solid #3d8bfd;
  outline-offset: 1px;
}
