/* Ink captures gestures only on the slide. */
.slide-canvas[data-draw-tool] {
  cursor: crosshair;
  user-select: none;
}

.slide-canvas.ink-draw-touch { touch-action: none; }
.slide-canvas[data-draw-tool] > :is(.slide-element, .object-handles),
.slide-canvas[data-draw-tool] > .object-handles > .object-handle { pointer-events: none; }
.slide-canvas[data-draw-tool="eraser"] { cursor: cell; }
.ink-element:focus-visible { outline: 2px solid var(--orange, #ed5a2a); }
.ink-converted-shape { overflow: visible; }

.ink-gesture,
.ink-ruler-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.ink-gesture { z-index: 7; }
.ink-erase-preview { opacity: .2 !important; }
.ink-replay-hidden { visibility: hidden; }
.ink-selection-outline { fill: #df6f2e29; stroke: #c25923; stroke-width: 2; stroke-dasharray: 7 5; }
.ink-eraser-outline { fill: #ffffff53; stroke: #404451; stroke-width: 1.5; }

.ink-ruler-body { cursor: move; outline: none; }
.ink-ruler-body rect {
  fill: #252b36;
  fill-opacity: .89;
  stroke: #fff;
  stroke-opacity: .65;
  pointer-events: all;
}
.ink-ruler-body:focus-visible rect { stroke: #e87537; stroke-opacity: 1; stroke-width: 3; }
.ink-ruler-ticks { fill: none; stroke: #f3e4d9; stroke-width: 1; }
.ink-ruler-angle { font: 600 13px system-ui, sans-serif; fill: #fff4eb; }

.ink-replay-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  padding: .5rem .75rem;
  color: var(--ink, #242424);
  background: var(--panel, #faf9f8);
  border-block-start: 1px solid var(--line, #ccc);
}
.ink-replay-panel strong { margin-inline-end: .35rem; }
.ink-replay-panel select { color: inherit; background: var(--surface, var(--panel)); }
.ink-replay-panel progress { width: 5.5rem; accent-color: var(--orange, #ed5a2a); }
.ink-replay-panel output { font-size: .8rem; }

.brasa-insert-form {
  display: grid;
  gap: 11px;
}

.brasa-insert-checkbox {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
}

.brasa-insert-checkbox input { accent-color: var(--orange, #ed5a2a); }

.brasa-icon-grid,
.brasa-symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 7px;
}

.brasa-icon-grid .dialog-button {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-height: 76px;
  padding: 7px 4px;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.brasa-symbol-grid { grid-template-columns: repeat(auto-fit, minmax(36px, 1fr)); }
.brasa-symbol-grid .dialog-button { padding: 3px; font-size: 1.15rem; }
.brasa-icon-on-dark { border-radius: 4px; background: #343434; }

.brasa-equation-preview {
  display: grid;
  place-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid var(--line, #ded9d6);
  border-radius: 6px;
  font-family: Georgia, serif;
  font-size: 1.2rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.brasa-media-error { color: #a92424; }
.brasa-media-error:empty { display: none; }

.brasa-model-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 12px;
}

.brasa-model-preview {
  width: min(100%, 530px);
  height: auto;
  border: 1px solid var(--line, #ded9d6);
  border-radius: 8px;
  background: #f7f6f5;
}

.brasa-model-interactive { cursor: grab; touch-action: none; }
.brasa-model-rotating { cursor: grabbing; }
.brasa-model-interactive:focus-visible { outline: 2px solid #2d6cff; outline-offset: 2px; }
