/* Virtual Room (public/js/virtual-room.js) — the 3D view that replaces the call
   stage grid while it's switched on. The grid stays mounted underneath (hidden)
   so switching back is instant and tile state survives. */
.call-stage.vroom-on .stage-grid { display: none; }
.vroom-host {
  position: relative; flex: 1; min-height: 0;
  margin: 0 22px 16px;
  border-radius: var(--radius-lg, 12px); overflow: hidden;
  background: var(--bg-floating);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.vroom-canvas { position: absolute; inset: 0; }
.vroom-canvas canvas {
  display: block; width: 100%; height: 100%;
  cursor: grab; touch-action: none; outline: none;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.vroom-canvas canvas.dragging { cursor: grabbing; }
.vroom-canvas canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-2, var(--accent)); }

.vroom-hud {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  pointer-events: none;
}
.vroom-hud-left { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.vroom-hint, .vroom-share {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 6px 10px; border-radius: var(--radius, 8px);
  background: rgba(10, 11, 14, 0.72); color: var(--text-bright, #f2f3f5);
  font-size: 12px; line-height: 16px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.vroom-hint { color: #c9ccd3; transition: opacity var(--dur-panel, .24s) var(--ease-out, ease); }
.vroom-hint.faded { opacity: 0; pointer-events: none; }
.vroom-share[hidden] { display: none; }
.vroom-share svg { flex: none; color: var(--ok); }
.vroom-share-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vroom-tools { display: flex; gap: 6px; flex: none; pointer-events: auto; }
.vroom-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; min-width: 32px; padding: 0 9px;
  border-radius: var(--radius, 8px); border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 11, 14, 0.72); color: var(--text-bright, #f2f3f5);
  font-size: 12px; font-weight: 600; box-shadow: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.vroom-btn:hover { background: rgba(30, 32, 40, 0.88); }
.vroom-btn:focus-visible { outline: 2px solid var(--accent-2, var(--accent)); outline-offset: 2px; }
.vroom-btn svg { width: 16px; height: 16px; }
.vroom-share .vroom-btn { height: 24px; min-width: 0; padding: 0 6px; margin: -2px -4px -2px 4px; font-size: 11px; }
.vroom-share .vroom-btn svg { width: 14px; height: 14px; color: inherit; }

.vroom-status {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 24px; text-align: center; color: var(--muted); font-size: 14px;
}
.vroom-status.error { color: var(--text); }

/* The mobile class is driven by isMobileLayout() in resize(). */
.vroom-host.mobile { margin: 8px 8px 4px; border-radius: var(--radius, 8px); }
.vroom-host.mobile .vroom-hud { top: 8px; left: 8px; right: 8px; }
.vroom-host.mobile .vroom-exit span { display: none; }
@media (prefers-reduced-motion: reduce) {
  .vroom-hint { transition: none; }
}

.vroom-host, .vroom-host * { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.call-stage.vroom-on .stage-chat, .call-stage.vroom-on .stage-chat-toggle { display: none !important; }
.vroom-mini { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); padding: 6px; border-radius: 10px; background: var(--bg-floating); color: var(--text); }
.vroom-mini-avatars { display: flex; gap: 4px; overflow-x: auto; min-width: 0; }
.vroom-mini-avatar { flex: none; width: 32px; height: 32px; padding: 2px; border: 2px solid transparent; border-radius: 8px; background: var(--bg-3); }
.vroom-mini-avatar .avatar { width: 24px; height: 24px; border-radius: 8px; }
.vroom-mini-avatar.speaking { border-color: var(--ok); }
.vroom-mini .vroom-btn { flex: none; background: var(--bg-3); border: 0; }
.vroom-mini .vroom-btn[aria-pressed="true"] { color: var(--danger); }

/* Room activities dock above the lounge, inside the fullscreen call stage. */
.call-stage.vroom-on .stage-main > .watch-slot { display: none; }
.vroom-activity-dock { position: absolute; z-index: 2; pointer-events: none; border-radius: 10px; }
.vroom-activity-dock[hidden] { visibility: hidden; pointer-events: none; }
.vroom-activity-dock .ytm-slot { height: 100%; margin: 0; overflow: auto; pointer-events: auto; }
.vroom-activity-dock .ytm-slot[hidden] { display: none; }
.vroom-activity-managed { user-select: none; -webkit-touch-callout: none; }
.vroom-activity-managed.vroom-activity-hidden { visibility: hidden !important; pointer-events: none !important; }

/* Fullscreen: the stage is the fullscreen element; float the call controls over the room's bottom edge so they never get pushed off-screen. */
.call-stage.vroom-on:fullscreen .vroom-host,
.call-stage.vroom-on:-webkit-full-screen .vroom-host { margin: 0; border: 0; border-radius: 0; position: absolute; inset: 0; }
.call-stage.vroom-on:fullscreen > .call-controls,
.call-stage.vroom-on:-webkit-full-screen > .call-controls {
  position: absolute; bottom: 16px; left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: calc(100% - 24px);
  z-index: 30; background: color-mix(in srgb, var(--bg-2) 88%, transparent); backdrop-filter: blur(8px);
}
.call-stage.vroom-on:fullscreen > .stage-head,
.call-stage.vroom-on:-webkit-full-screen > .stage-head { position: absolute; top: 0; left: 0; right: 0; z-index: 5; pointer-events: none; }
