/* t12 — Notes panel.
   Drops inside ShotDetailModal. Fits the existing modal cream-card
   palette: light cream background, leaf-green resolve button, amber
   version tag. Each note has avatar + meta + body + (admin-only)
   resolve action. */

.notes-panel {
  margin-top: 18px;
  padding: 14px 16px 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--cream) 55%, transparent);
  /* v06p — fixed total height so the popup doesn't shift up/down
     when notes are added, resolved or version-switched. The list
     scrolls inside; the textarea + post button always sit below. */
  height: 320px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.notes-panel .notes-list {
  /* v06p — list has a fixed inner height and scrolls when notes
     exceed it. Combined with the fixed panel height above, adding a
     note no longer pushes anything down the page. */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
/* v07zc — Hugo: when AssetNotesSection started reusing .notes-panel
   for visual parity with shot notes, it inherited the shot-modal's
   fixed 320 px height — which made the section ENORMOUS inside the
   tighter asset / media modal layout. Override here so the asset
   variant sizes naturally to its content, with a max so a long
   thread doesn't blow up the modal. */
.asset-notes .notes-panel {
  margin-top: 12px;
  padding: 12px 14px 14px;
  height: auto;
  min-height: 0;
}
.asset-notes .notes-panel .notes-list {
  /* Asset variant: list grows to fit, scrolls only when very long. */
  flex: 0 1 auto;
  max-height: 220px;
  overflow-y: auto;
}
.notes-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.notes-title {
  font-size: var(--fs-11-5);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-14);
  color: var(--ink);
  text-transform: uppercase;
}
.notes-version {
  font-size: var(--fs-10-5);
  color: var(--ink-muted);
  font-style: italic;
  letter-spacing: var(--track-04);
}
/* v944 — notes scope switch: "This image" | "All notes". Same compact pill
   language as the panel's resolved-toggle; fixed height so flipping it never
   moves the header row (invariant #20). */
.notes-scope {
  display: inline-flex;
  border: 1px solid color-mix(in srgb, var(--tan-deep) 28%, transparent);
  border-radius: var(--r-round);
  overflow: hidden;
  height: 20px;
  flex: 0 0 auto;
}
.notes-scope-btn {
  border: none;
  background: transparent;
  font: inherit;
  font-size: var(--fs-10);
  font-weight: var(--fw-semi);
  letter-spacing: var(--track-03);
  color: var(--ink-muted);
  padding: 0 9px;
  cursor: pointer;
  line-height: 18px;
  white-space: nowrap;
}
.notes-scope-btn + .notes-scope-btn { border-left: 1px solid color-mix(in srgb, var(--tan-deep) 22%, transparent); }
.notes-scope-btn:hover { background: color-mix(in srgb, var(--tan-deep) 8%, transparent); color: var(--ink); }
.notes-scope-btn.is-active {
  background: color-mix(in srgb, color-mix(in srgb, var(--surface-forest) 68%, var(--mix-light)) 18%, transparent);
  color: var(--ink);
}
.notes-error {
  margin-bottom: 8px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--danger-soft-2) 45%, transparent);
  background: color-mix(in srgb, var(--danger-soft-2) 10%, transparent);
  color: var(--danger-ink);
  border-radius: var(--r-sm);
  font-size: var(--fs-12);
}
/* v07zn — Hugo: cream overlay was leaking onto the dashboard's
   Today's Notes panel when empty. Scoped to .notes-panel (the shot
   / grid modal's notes block) so it never paints inside the
   dashboard NotesCard. */
.notes-panel .notes-empty {
  padding: 14px;
  text-align: center;
  color: var(--ink-muted);
  font-size: var(--fs-12-5);
  font-style: italic;
  border: 1px dashed var(--card-border);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--cream) 30%, transparent);
}
.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--r-panel);
  background: color-mix(in srgb, var(--cream) 70%, transparent);
  overflow: hidden;
}
.notes-list--resolved { margin-top: 6px; opacity: 0.85; }
/* v07zz344 — fade the notes in when they first appear (matches the shot-modal hero/strip
   reveal) instead of popping. Runs once on mount of the list / empty-state; silent sync
   refreshes update the existing <ul> in place so it does NOT re-animate. */
@keyframes notesFadeIn { from { opacity: 0; } to { opacity: 1; } }
.notes-fade { animation: notesFadeIn var(--dur-6) ease-out; }
.note-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
}
.note-row:last-child { border-bottom: none; }
.note-row--resolved { background: color-mix(in srgb, color-mix(in srgb, var(--foil) 55%, var(--mix-light)) 30%, transparent); }
.note-row--resolved .note-text { text-decoration: line-through; color: var(--ink-muted); }

.note-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--olive-8) 0%, var(--olive-3) 100%);
  color: var(--ink-cream);
  display: grid;
  place-items: center;
  font-size: var(--fs-10-5);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-04);
  text-transform: uppercase;
  margin-top: 2px;
}
.note-body { min-width: 0; }
.note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-11);
  color: var(--ink-muted);
  margin-bottom: 3px;
}
.note-author { font-weight: var(--fw-bold); color: var(--ink); }
.note-version-tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: var(--r-round);
  border: 1px solid color-mix(in srgb, var(--gold-6) 45%, transparent);
  background: color-mix(in srgb, var(--gold-16) 18%, transparent);
  color: color-mix(in srgb, var(--ink-tan-deep) 81%, var(--mix-dark));
  font-size: var(--fs-9-5);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-06);
  text-transform: uppercase;
}
/* v07zz — Asset notes: the per-note pill is a real filename
   (e.g. columbus_wip_v006.png), not a short "v2" tag. Show it in
   lowercase and truncate long names so it doesn't SHOUT or wrap the
   meta row (keeps row height stable — invariant #20). */
.asset-notes .note-version-tag {
  text-transform: none;
  letter-spacing: var(--track-02);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-time { font-feature-settings: "tnum"; }
.note-resolved-tag {
  font-size: var(--fs-10);
  color: var(--ink-forest-5);
  font-weight: var(--fw-semi);
  letter-spacing: var(--track-04);
  text-transform: uppercase;
}
.note-text {
  font-size: var(--fs-12-5);
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.45;
}

.note-resolve {
  font: inherit;
  font-family: var(--font-body);
  font-size: var(--fs-10-5);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-04);
  padding: 4px 10px;
  border-radius: var(--r-round);
  border: 1px solid color-mix(in srgb, var(--olive-2) 85%, transparent);
  background: color-mix(in srgb, var(--leaf) 85%, transparent);
  color: var(--ink-cream);
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-start;
  transition: background var(--dur-1) ease;
}
.note-resolve:hover { background: color-mix(in srgb, var(--olive-2) 95%, transparent); }
.note-resolve--undo {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--card-border);
}
.note-resolve--undo:hover {
  background: color-mix(in srgb, var(--tan-deep) 10%, transparent);
  color: var(--ink);
}

.notes-toggle-resolved {
  font: inherit;
  font-family: var(--font-body);
  font-size: var(--fs-11);
  font-weight: var(--fw-semi);
  letter-spacing: var(--track-04);
  margin-top: 8px;
  padding: 4px 10px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-round);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background var(--dur-1) ease, color var(--dur-1) ease;
}
.notes-toggle-resolved:hover { background: color-mix(in srgb, var(--tan-deep) 8%, transparent); color: var(--ink); }

.note-add-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-add-input {
  font: inherit;
  font-family: var(--font-body);
  font-size: var(--fs-12-5);
  color: var(--ink);
  background: color-mix(in srgb, var(--cream) 85%, transparent);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  outline: none;
  resize: vertical;
  min-height: 56px;
}
.note-add-input:focus {
  border-color: color-mix(in srgb, var(--leaf) 70%, transparent);
  box-shadow: 0 0 0 var(--ring-w) color-mix(in srgb, var(--leaf) 15%, transparent);
}
.note-add-submit {
  align-self: flex-end;
  font: inherit;
  font-family: var(--font-body);
  font-size: var(--fs-11-5);
  font-weight: var(--fw-bold);
  letter-spacing: var(--track-06);
  padding: 6px 16px;
  border-radius: var(--r-round);
  border: 1px solid color-mix(in srgb, var(--olive-2) 85%, transparent);
  background: color-mix(in srgb, var(--leaf) 85%, transparent);
  color: var(--ink-cream);
  cursor: pointer;
  transition: background var(--dur-1) ease;
}
.note-add-submit:hover:not(:disabled) { background: color-mix(in srgb, var(--olive-2) 95%, transparent); }
.note-add-submit:disabled { opacity: 0.50; cursor: not-allowed; }

/* ─── v07zz603 — FROM EDIT REVIEW group (shot modal NotesPanel) ─────────────
   Review-edit comments Gemini-linked to this shot. Pinned above version notes,
   version-independent, visible until resolved. Thumb = the exact frame the
   note was left on; clicking it (or the edit tag) jumps to the Edit Review
   modal seeked to the note's timecode. */
.notes-review-group { margin-bottom: 10px; }
.notes-review-head {
  font-size: var(--fs-10); font-weight: var(--fw-heavy); letter-spacing: var(--track-14);
  color: var(--ink-blue-16); opacity: 0.85; margin: 2px 0 6px;
}
.note-row--review {
  border-left: 2px solid color-mix(in srgb, var(--blue-16) 45%, transparent); padding-left: 8px;
  /* v07zz618 — the base .note-row grid reserves 30px for the round avatar; the
     74px frame thumb overflowed that column and painted OVER the author/text
     (Hugo: "looks all wonky"). Review rows get a first column sized to the thumb. */
  grid-template-columns: 74px 1fr auto;
}
.note-frame-thumb {
  flex: 0 0 auto; width: 74px; height: 42px; padding: 0;
  border: 1px solid color-mix(in srgb, var(--blue-16) 40%, transparent); border-radius: var(--r-xs);
  overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--blue-16) 12%, transparent);
}
.note-frame-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-frame-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: color-mix(in srgb, var(--ink-blue-16) 70%, transparent); font-size: var(--fs-13); }
.note-edit-tag {
  font: inherit; font-size: var(--fs-10); font-weight: var(--fw-bold); letter-spacing: var(--track-03);
  border: 1px solid color-mix(in srgb, var(--blue-16) 55%, transparent); border-radius: var(--r-xs); padding: 1px 7px;
  background: color-mix(in srgb, var(--mix-light) 50%, transparent); color: var(--ink-blue-16); cursor: pointer;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.note-edit-tag:hover { background: color-mix(in srgb, var(--blue-16) 12%, transparent); }
