/* Live visual workspace mirror and freehand annotation layer. */
#workspace-share-overlay.workspace-share-viewer {
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
}

.workspace-share-viewer .workspace-share-canvas {
  padding: 0;
  min-height: 0;
  aspect-ratio: var(--scene-aspect);
  overflow: auto;
  background: #dfe8dc;
  touch-action: none;
  cursor: crosshair;
}

.workspace-share-viewer .workspace-share-canvas.is-drawing {
  cursor: none;
  user-select: none;
}

.workspace-scene-mirror {
  position: absolute;
  inset: 0;
  overflow: auto;
  pointer-events: none;
  background: #e9f0e5;
  transform-origin: top left;
}

.workspace-scene-mirror > * { max-width: 100%; }
.workspace-scene-mirror .farm-mode-stage,
.workspace-scene-mirror .bakery-workspace,
.workspace-scene-mirror .delivery-garage-workspace,
.workspace-scene-mirror .grocery-scene-layout,
.workspace-scene-mirror .community-workspace {
  width: 100%;
  margin: 0;
  min-height: 100%;
  box-sizing: border-box;
}

.workspace-scene-mirror svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.workspace-annotation-layer { z-index: 8; }
.workspace-annotation-layer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.share-drawn-line {
  fill: none;
  stroke: #ed563f;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 #fff);
}

.share-drawn-highlight {
  fill: none;
  stroke: #ffe15a;
  stroke-opacity: .62;
  stroke-width: 18;
  stroke-linecap: round;
  stroke-linejoin: round;
  mix-blend-mode: multiply;
}

.share-ping-svg {
  fill: none;
  stroke: #ed563f;
  stroke-width: 4;
  transform-box: fill-box;
  transform-origin: center;
  animation: sharePingSvg 1s infinite;
}

#workspace-share-overlay.workspace-share-owner {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  pointer-events: none;
}

.workspace-share-owner > .workspace-share-banner {
  position: fixed;
  z-index: 20;
  top: 14px;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
  pointer-events: auto;
  border-radius: 14px;
  box-shadow: 0 10px 32px #173d324d;
}

.owner-workspace-annotation {
  position: fixed;
  z-index: 18;
  pointer-events: none;
  overflow: hidden;
}

.owner-workspace-annotation .workspace-annotation-layer {
  position: absolute;
  inset: 0;
}

@keyframes sharePingSvg { to { r: 7; opacity: 0; } }

@media (max-width: 700px) {
  #workspace-share-overlay.workspace-share-viewer { width: calc(100vw - 18px); }
  .workspace-share-tools button,
  .workspace-follow-row button { white-space: nowrap; }
}
