/* Notes mode (web/notes-mode.js): the bar, the "not sent" chip, the hover outline and where the
   room's pins and note box sit. The pins (.rr-pin) and the note box (.rr-editor in .rr-bubble) are
   the review room's own, styled by work-review.css with the room's tokens on .nm-root.
   Grey, black and white; above everything else on the page. */

.nm-root { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; font-family: var(--font); }
.nm-root > :is(.nm-bar, .nm-chip, .nm-picker) { pointer-events: auto; }
.nm-root [hidden] { display: none !important; }
.nm-pins { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.nm-pins > .rr-pin.is-editing { transform: translate(-50%, -50%) scale(1.12); }
.nm-pins > .rr-bubble { pointer-events: auto; }

/* While marking: the page is a surface to point at, not to press. */
html.nm-marking, html.nm-marking body * { cursor: crosshair !important; }
html.nm-marking .nm-root * { cursor: auto !important; }
html.nm-marking .nm-root :is(button, a, .rr-pin) { cursor: pointer !important; }
html.nm-marking .nm-root textarea { cursor: text !important; }
html.nm-marking iframe { pointer-events: none !important; }
html.nm-marking body { -webkit-user-select: none; user-select: none; }
html.nm-marking .nm-root textarea { -webkit-user-select: text; user-select: text; }
.nm-root.is-on::before { content: ""; position: fixed; inset: 0; box-shadow: inset 0 0 0 2px rgba(29, 29, 31, 0.5); pointer-events: none; }

/* What a click would pin to */
.nm-hover {
  position: fixed; border-radius: 8px; pointer-events: none;
  box-shadow: 0 0 0 1.5px rgba(29, 29, 31, 0.42); background: rgba(29, 29, 31, 0.03);
  transition: left 70ms ease-out, top 70ms ease-out, width 70ms ease-out, height 70ms ease-out;
}

/* The bar */
.nm-bar {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; height: 40px; max-width: calc(100vw - 24px); box-sizing: border-box;
  padding: 0 5px 0 14px; border-radius: 12px; background: var(--ink, #1d1d1f); color: #fff;
  box-shadow: 0 10px 30px rgba(29, 29, 31, 0.22), 0 1px 3px rgba(29, 29, 31, 0.2);
  font: 500 13px/1 var(--font); white-space: nowrap; animation: nm-in 160ms ease-out;
}
html.nexus-mac :is(.nm-bar, .nm-chip) { top: calc(var(--mac-titlebar, 28px) + 6px); }
.nm-mark { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.nm-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16); }
.nm-dot.is-sent { box-shadow: none; }
.nm-title { font-weight: 620; letter-spacing: -0.005em; }
.nm-sep { color: rgba(255, 255, 255, 0.38); flex: none; }
.nm-status { display: inline-flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; color: rgba(255, 255, 255, 0.74); }
.nm-status.is-error { display: block; max-width: 300px; text-overflow: ellipsis; color: #ffb3a7; }
.nm-count { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.nm-link { padding: 0; border: 0; background: none; font: inherit; color: rgba(255, 255, 255, 0.58); cursor: pointer; }
.nm-link:hover, .nm-link:focus-visible { color: #fff; }
.nm-link.is-danger { color: #ffb3a7; font-weight: 600; }
.nm-gap { flex: 1 0 12px; }
.nm-target {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; max-width: 220px; height: 30px;
  padding: 0 7px 0 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.1); color: #fff; font: 500 13px/1 var(--font);
}
.nm-target:hover, .nm-target[aria-expanded="true"] { background: rgba(255, 255, 255, 0.17); }
.nm-target-to { flex: none; color: rgba(255, 255, 255, 0.55); margin-right: 2px; }
.nm-target-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nm-target svg { flex: none; opacity: 0.7; }
.nm-send {
  flex: none; height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: #fff; color: var(--ink, #1d1d1f);
  font: 600 13px/1 var(--font); transition: opacity 120ms ease;
}
.nm-send:disabled { opacity: 0.32; cursor: default !important; }
.nm-send:not(:disabled):hover { opacity: 0.88; }
.nm-bar[data-state="sending"] .nm-send { opacity: 0.6; }
.nm-done {
  flex: none; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: rgba(255, 255, 255, 0.8);
  font: 500 13px/1 var(--font);
}
.nm-done:hover, .nm-done:focus-visible { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nm-open { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.45); }
.nm-open:hover { text-decoration-color: #fff; }
.nm-bar :focus-visible { outline: 2px solid #fff !important; outline-offset: 1px; }

/* "3 notes not sent": the bar while it's put away */
.nm-chip {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px;
  border: 1px solid rgba(29, 29, 31, 0.14); border-radius: 999px; background: #fff; color: var(--ink, #1d1d1f);
  box-shadow: var(--rr-lift); font: 600 12.5px/1 var(--font); cursor: pointer; animation: nm-in 160ms ease-out;
}
.nm-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink, #1d1d1f); }
.nm-chip:hover { border-color: rgba(29, 29, 31, 0.26); }

/* Where the notes go */
.nm-picker {
  position: fixed; width: 320px; max-height: min(380px, calc(100vh - 80px)); overflow-y: auto; box-sizing: border-box; padding: 6px;
  border: 1px solid rgba(29, 29, 31, 0.12); border-radius: 13px; background: #fff; color: var(--ink, #1d1d1f);
  box-shadow: 0 1px 1px rgba(29, 29, 31, 0.04), 0 14px 36px rgba(29, 29, 31, 0.14); animation: rise 140ms ease;
}
.nm-options { display: grid; gap: 1px; }
.nm-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; text-align: left; }
.nm-option:hover, .nm-option:focus-visible { background: var(--rr-soft); outline: none; }
.nm-option-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.nm-option-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 550 14px/1.3 var(--font); }
.nm-option-sub { font-size: 12px; line-height: 1.3; color: var(--tertiary); }
.nm-check { flex: none; width: 16px; font-weight: 700; text-align: center; }
.nm-option-label { padding: 10px 10px 4px; border-top: 1px solid var(--rr-line); margin-top: 4px; font: 600 11.5px/1.2 var(--font); color: var(--tertiary); }
.nm-option-note { padding: 8px 10px 10px; font-size: 13px; color: var(--tertiary); }

/* On a phone: the bar stays at the top, the note box docks above the keyboard. */
@media (max-width: 600px) {
  .nm-bar { left: 12px; right: 12px; transform: none; max-width: none; padding-left: 12px; gap: 4px; }
  .nm-title, .nm-sep-lead { display: none; }
  .nm-mark { gap: 0; margin-right: 6px; }
  .nm-status { flex: 0 0 auto; gap: 8px; }
  .nm-gap { flex-basis: 4px; }
  .nm-target { max-width: 96px; padding: 0 5px 0 8px; }
  .nm-send { padding: 0 12px; }
  .nm-done { padding: 0 8px; }
  .nm-target-to { display: none; }
  .nm-pins > .rr-bubble.nm-docked { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; transform: none; }
}

/* The Work list: a session notes started */
.work-fix-label {
  display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; vertical-align: 1px;
  border: 1px solid rgba(29, 29, 31, 0.18); color: var(--secondary, #5c5957);
  font-size: 10.5px; font-weight: 600; line-height: 15px; letter-spacing: 0.02em;
}

@keyframes nm-in { from { opacity: 0; transform: translate(-50%, -3px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 600px) { @keyframes nm-in { from { opacity: 0; } to { opacity: 1; } } }
@media (prefers-reduced-motion: reduce) {
  .nm-bar, .nm-chip, .nm-picker { animation: none; }
  .nm-hover { transition: none; }
}
