/* Presentation tools: drawing, highlighter, laser pointer */

.annotation-canvas {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  touch-action: none;
}

body.annotation-active .annotation-canvas {
  pointer-events: auto;
}

body.annotation-mode-pen,
body.annotation-mode-highlight {
  cursor: crosshair;
}

body.annotation-mode-eraser {
  cursor: grab;
}

.presentation-toolbar {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 180;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  opacity: 0.88;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.presentation-toolbar:hover {
  opacity: 1;
}

.presentation-toolbar.is-collapsed {
  transform: translateY(-50%) translateX(calc(100% - 2.4rem));
}

.presentation-toolbar button {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.presentation-toolbar button:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.16);
}

.presentation-toolbar button.is-active {
  border-color: rgba(34, 211, 238, 0.9);
  background: rgba(34, 211, 238, 0.28);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.25);
}

.presentation-toolbar .toolbar-divider {
  height: 1px;
  margin: 0.15rem 0;
  background: rgba(255, 255, 255, 0.16);
}

.presentation-toolbar .color-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.28rem;
}

.presentation-toolbar .color-dot {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
}

.presentation-toolbar .color-dot.is-active {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.annotation-laser-dot {
  position: fixed;
  z-index: 95;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 999px;
  pointer-events: none;
  background: rgba(248, 113, 113, 0.95);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.95), 0 0 36px rgba(248, 113, 113, 0.6);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.annotation-laser-dot.is-visible {
  opacity: 1;
}

.annotation-hint {
  position: fixed;
  right: 4.1rem;
  top: 50%;
  z-index: 180;
  max-width: 18rem;
  transform: translateY(-50%);
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.72rem;
  line-height: 1.5;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.presentation-toolbar:hover + .annotation-hint {
  opacity: 1;
}

.reveal.overview ~ .annotation-canvas,
.reveal.overview ~ .presentation-toolbar,
.reveal.overview ~ .annotation-hint,
.reveal.overview ~ .annotation-laser-dot {
  display: none;
}

@media print {
  .annotation-canvas,
  .presentation-toolbar,
  .annotation-hint,
  .annotation-laser-dot {
    display: none !important;
  }
}
