/* ScoreAbroad Classroom — teacher ink overlay and toolbar (js/classroom-ink.js).
 * The canvas sits above the page (z 55) but below the toast (z 60); <dialog> modals
 * are in the top layer and always above it. Viewers never get pointer events. */

.cr-ink-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 55; pointer-events: none; }
.cr-ink-canvas.is-drawing { pointer-events: auto; touch-action: none; cursor: crosshair; }
.cr-ink-canvas.is-drawing[data-tool="eraser"] { cursor: cell; }

.cr-ink-bar { position: fixed; left: 16px; bottom: 16px; z-index: 56; display: flex; align-items: center; gap: 4px; padding: 5px;
  max-width: calc(100vw - 32px); flex-wrap: wrap; border-radius: 14px; background: var(--bg-overlay); border: 1px solid var(--glass-border-bright);
  box-shadow: var(--shadow-lg); color: var(--text-2); }
.cr-ink-bar[hidden] { display: none !important; }
.cr-ink-bar.is-active { border-color: var(--brand-border); }
:root[data-theme="light"] .cr-ink-bar { background: var(--bg-raised); }

.cr-ink-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--text-2); font-size: .92rem; cursor: pointer; padding: 0; line-height: 1; transition: background .15s, color .15s, border-color .15s; }
.cr-ink-btn:hover { background: var(--glass-2); color: var(--text-1); }
.cr-ink-btn:focus-visible { outline: 3px solid rgba(255,92,53,0.55); outline-offset: 2px; }
.cr-ink-btn[aria-pressed="true"] { background: var(--brand-dim); border-color: var(--brand); color: var(--text-1); }
.cr-ink-btn svg { display: block; }

.cr-ink-btn[data-ink-action="clear"]:hover { color: #F87171; }
:root[data-theme="light"] .cr-ink-btn[data-ink-action="clear"]:hover { color: #B91C1C; }

.cr-ink-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--bg-overlay), 0 0 0 3px var(--glass-border-bright); }
:root[data-theme="light"] .cr-ink-dot { box-shadow: 0 0 0 2px var(--bg-raised), 0 0 0 3px var(--glass-border-bright); }
.cr-ink-btn[aria-pressed="true"] .cr-ink-dot { box-shadow: 0 0 0 2px var(--bg-overlay), 0 0 0 3px var(--ink); }
:root[data-theme="light"] .cr-ink-btn[aria-pressed="true"] .cr-ink-dot { box-shadow: 0 0 0 2px var(--bg-raised), 0 0 0 3px var(--ink); }

.cr-ink-sep { width: 1px; height: 22px; background: var(--glass-border-bright); margin: 0 2px; }
.cr-ink-status { font-size: .72rem; font-weight: 700; color: #F87171; padding: 0 .4rem; white-space: nowrap; }
:root[data-theme="light"] .cr-ink-status { color: #B91C1C; }
.cr-ink-status[hidden] { display: none; }
.cr-ink-bar.is-error { border-color: rgba(239,68,68,0.5); }

@media (max-width: 420px) {
  .cr-ink-bar { left: 8px; bottom: 8px; max-width: calc(100vw - 16px); gap: 2px; padding: 4px; }
  .cr-ink-btn { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) { .cr-ink-btn { transition: none; } }
@media print { .cr-ink-canvas, .cr-ink-bar { display: none !important; } }
