/* Drawings on the board and the pen. The theme's own ink is dark in Light mode and light in
   Dark mode; this is view only, the saved colour stays 'ink'. */
:root { --hn-ink-auto: #202b35; }
body.hn-dark { --hn-ink-auto: #eef2f4; }

/* A drawing has no card chrome, and only its ink takes the pointer. */
.card.ink-card {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  pointer-events: none;
}
.card.ink-card:hover { box-shadow: none !important; }
.card.ink-card > .drag-handle { display: none !important; }
.card.ink-card > .card-body { padding: 0 !important; width: 100%; height: 100%; }
.card.ink-card > .connection-handle { pointer-events: auto; }
.ink-drawing { display: block; overflow: visible; }
.ink-drawing .ink-stroke { pointer-events: none; }
.ink-drawing .ink-hit { pointer-events: stroke; cursor: grab; }
.ink-drawing circle.ink-hit { pointer-events: fill; }
.card.ink-card.dragging .ink-hit { cursor: grabbing; }
.card.ink-card.selected { outline: 1.5px dashed rgba(228, 95, 66, .82) !important; outline-offset: 3px; }
body.hn-public-view .ink-drawing .ink-hit { cursor: default; }

/* The drawing layer covers the board while the pen is on. */
.hn-ink-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  cursor: crosshair;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.hn-ink-layer[hidden] { display: none; }
.hn-ink-layer.erasing { cursor: cell; }
.hn-ink-live { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hn-ink-live path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* The board's top edge, shown while a stroke runs past it (the ink is cut there). */
.hn-ink-live .hn-ink-edge { stroke: var(--hn-ink-auto, #202b35); stroke-width: 1.5; stroke-dasharray: 6 5; opacity: .5; }

/* The pen bar sits at the top of the board, clear of the rail and the header. */
.hn-ink-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 31;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--theme-border, #dfe3e6);
  border-radius: 12px;
  background: var(--theme-surface, #fff);
  color: var(--theme-ink, #26312d);
  box-shadow: var(--ui-shadow, 0 10px 30px rgba(30, 35, 40, .16));
  font: 500 13px/1 var(--ui-font, Arial), sans-serif;
  white-space: nowrap;
}
.hn-ink-bar[hidden] { display: none; }
.hn-ink-divider { width: 1px; height: 24px; margin: 0 4px; background: var(--theme-border, #dfe3e6); }
.hn-ink-button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.hn-ink-button:hover { background: var(--theme-hover, #f0f2f3); }
.hn-ink-button[aria-pressed=true] { background: var(--theme-raised, #eef0f2); box-shadow: inset 0 0 0 1.5px var(--theme-accent, #df5b3f); }
.hn-ink-tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hn-ink-colors { display: flex; gap: 2px; }
.hn-ink-swatch { min-width: 30px; width: 30px; padding: 0; }
.hn-ink-swatch::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--swatch, var(--hn-ink-auto)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22); }
.hn-ink-size-dot { display: block; border-radius: 50%; background: currentColor; }
.hn-ink-size:first-of-type .hn-ink-size-dot { width: 5px; height: 5px; }
.hn-ink-size .hn-ink-size-dot { width: 5px; height: 5px; }
.hn-ink-size + .hn-ink-size .hn-ink-size-dot { width: 11px; height: 11px; }
.hn-ink-done { padding: 0 14px; font-weight: 650; background: var(--theme-action, #26312d); color: var(--theme-action-ink, #fff); }
.hn-ink-done:hover { background: var(--theme-action, #26312d); opacity: .9; }

/* While the pen is on, the board shows no selection tools. */
.hn-pen-on .collaboration-overlay { pointer-events: none; }

/* Phones: the bar spans the top, under the header. */
.hn-mobile .hn-ink-bar { top: 8px; left: 8px; right: 8px; transform: none; justify-content: center; flex-wrap: wrap; row-gap: 4px; white-space: normal; }
.hn-mobile .hn-ink-divider { display: none; }
