/* pureref.css
   Full-screen PureRef-style reference board: toolbar, free canvas with
   draggable/resizable images, draw-over layer, bottom bar.
   Depends on: variables.css (--teal/--teal-m/--coral used for active states). */

.pureref {
  position: fixed;
  inset: 0;
  background: #2c2c2c;
  z-index: 250;
  display: none;
  flex-direction: column;
}
.pureref.open { display: flex; }

.pureref-tb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #222;
  border-bottom: 1px solid #3a3836;
  flex-shrink: 0;
  flex-wrap: wrap;
  z-index: 260;
}
.pureref-tb button {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  background: #3a3836;
  color: #ccc;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pureref-tb button:hover { background: #4a4846; color: #fff; }
.pureref-tb button.active { background: var(--teal); color: #fff; border-color: var(--teal-m); }
.pureref-tb .dv { width: 1px; height: 24px; background: #4a4846; margin: 0 4px; }
.pureref-tb label { font-size: 10px; color: #888; font-weight: 500; }
.pureref-tb input[type="range"] { width: 70px; accent-color: var(--teal); height: 4px; cursor: pointer; }
.pureref-tb .cs { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #555; cursor: pointer; flex-shrink: 0; }
.pureref-tb .cs.active { border-color: #fff; box-shadow: 0 0 0 2px var(--teal); }

.pureref-canvas { flex: 1; position: relative; overflow: hidden; cursor: grab; }
.pureref-canvas.drawing { cursor: crosshair; }
.pureref-canvas:active { cursor: grabbing; }

.pureref-canvas .pr-img {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: move;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.pureref-canvas .pr-img:hover { border-color: var(--teal-m); }
.pureref-canvas .pr-img.selected { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.pureref-canvas .pr-img .pr-resize {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 14px;
  height: 14px;
  background: var(--teal);
  border-radius: 50%;
  cursor: nwse-resize;
  border: 2px solid #fff;
}
.pureref-canvas .pr-img .pr-del {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  background: var(--coral);
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #fff;
  opacity: 0;
  transition: opacity .15s;
}
.pureref-canvas .pr-img:hover .pr-del { opacity: 1; }

.pureref-draw-canvas { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.pureref-draw-canvas.active { pointer-events: auto; cursor: crosshair; }

.pureref-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #222;
  border-top: 1px solid #3a3836;
  flex-shrink: 0;
}
.pureref-bottom .info { font-size: 11px; color: #888; }
