/* writer-structure.css — structural editing on the manuscript chapter list:
   drag-to-reorder + inline developmental notes. Extends .wr-chap-row. */

.wr-struct-hint {
  font-size: 12.5px;
  color: var(--ink-3, oklch(0.52 0.02 60));
  font-style: italic;
  margin: 2px 0 12px;
  line-height: 1.4;
}
.wr-struct-hint span { font-style: normal; }

.wr-chap-row--struct {
  position: relative;
  flex-wrap: wrap;
  transition: box-shadow 140ms ease, opacity 140ms ease, transform 140ms ease;
}
.wr-chap-row--struct.is-dragging { opacity: 0.45; }
.wr-chap-row--struct.is-drop-above { box-shadow: inset 0 3px 0 -1px var(--plot-slate, #4a5d80); }
.wr-chap-row--struct.is-drop-below { box-shadow: inset 0 -3px 0 -1px var(--plot-slate, #4a5d80); }

.wr-cr-grip {
  display: flex; align-items: center; justify-content: center;
  width: 30px; align-self: stretch; flex: none;
  cursor: grab; color: var(--ink-4, oklch(0.66 0.018 60));
  font-size: 15px; user-select: none;
  transition: color 120ms ease;
}
.wr-cr-grip:hover { color: var(--ink, oklch(0.22 0.025 60)); }
.wr-cr-grip:active { cursor: grabbing; }
.wr-chap-row--struct.has-note { border-left: 3px solid var(--plot-ochre, #a37b2a); }

.wr-cr-notetag { color: var(--plot-ochre, #a37b2a); font-weight: 600; }

.wr-cr-notebtn {
  flex: none; align-self: center;
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--rule, rgba(42,36,25,0.12));
  background: transparent; cursor: pointer; font-size: 15px; line-height: 1;
  color: var(--ink-3, oklch(0.52 0.02 60));
  transition: background 130ms ease, border-color 130ms ease, color 130ms ease;
}
.wr-cr-notebtn:hover { background: var(--paper-2, oklch(0.945 0.014 78)); color: var(--ink, oklch(0.22 0.025 60)); }
.wr-cr-notebtn.is-on { background: var(--plot-ochre, #a37b2a); border-color: transparent; color: #fff; }

.wr-cr-note {
  flex-basis: 100%;
  margin-top: 10px;
  animation: wr-note-in 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes wr-note-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wr-cr-note-ta {
  width: 100%; box-sizing: border-box; resize: vertical;
  font-family: var(--sans, "DM Sans", system-ui, sans-serif);
  font-size: 13.5px; line-height: 1.5;
  color: var(--ink, oklch(0.22 0.025 60)); background: #fff;
  border: 1px solid var(--rule, rgba(42,36,25,0.12)); border-radius: 10px;
  padding: 9px 11px;
}
.wr-cr-note-ta:focus {
  outline: none; border-color: var(--plot-ochre, #a37b2a);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--plot-ochre, #a37b2a) 20%, transparent);
}
.wr-cr-note-foot { font-size: 11px; color: var(--ink-4, oklch(0.66 0.018 60)); margin-top: 5px; font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .wr-chap-row--struct, .wr-cr-note { transition: none; animation: none; }
}
