/**
 * Reactive Presentation pen mode: ink canvas and mode badge.
 * Both are body-level overlay roots (.rp-overlay-ui), never inside .slide.
 * Above the slides, below the detail panel (--z-modal) and tooltip (--z-toast).
 */

.rp-pen-canvas {
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--z-overlay);
  pointer-events: none;
  touch-action: none;
}

.rp-pen-canvas.active {
  pointer-events: auto;
}

.rp-pen-badge {
  position: fixed;
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-1);
  box-shadow: var(--shadow-2);
  color: var(--on-surface);
  font-size: calc(var(--rp-ui-rem, 1rem) * .833);
  line-height: var(--leading-normal);
  pointer-events: none;
  user-select: none;
}

.rp-pen-badge[hidden],
.rp-pen-swatch[hidden] {
  display: none;
}

.rp-pen-swatch {
  width: .9em;
  height: .9em;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.rp-pen-swatch-neutral {
  background: var(--on-surface-muted);
}

/* Magnifier lens: a circle above the pen canvas and below the detail panel and
   tooltip. The ring is a box-shadow so the content box (and the clone
   geometry) is exactly the lens size. */
.rp-lens {
  position: fixed;
  left: 0;
  top: 0;
  z-index: calc(var(--z-overlay) + 1);
  overflow: hidden;
  border-radius: 50%;
  background: var(--bg-primary);
  box-shadow: 0 0 0 2px var(--border), var(--shadow-2);
  pointer-events: none;
  user-select: none;
}

.rp-lens[hidden] {
  display: none;
}

.rp-lens-view {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

/* The cloned deck wrapper: design size, no deck scale or sidebar shift. */
.rp-lens-view > .slide-deck {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  transform: none !important;
  font-family: var(--font-main);
  font-size: 1rem;
}

.rp-lens-view .slide {
  display: flex !important;
  opacity: 1 !important;
  position: absolute !important;
  inset: 0 !important;
  animation: none !important;
  transition: none !important;
}

.rp-lens-ink {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
