/* style — ElevenLabs Dialogue & Voiceover: the speakers and the script
   (js/panel/50g5-eleven-dialogue-card.js). Simon, 1 Nov 2026: "add one
   speaker after the other and explain how they're speaking and what they're
   saying." */
.field.dlg-field, #fields .field.dlg-field { flex: 1 1 100%; width: 100%; max-width: none; display: flex; flex-direction: column; align-items: stretch;
  gap: 6px; min-width: 0; padding: 0; background: none; border: 0; height: auto; min-height: 0; }
.dlg-field .dlg-head { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-top: 4px; }
.dlg-field .dlg-cast, .dlg-field .dlg-lines { display: flex; flex-direction: column; gap: 6px; }

/* a speaker: colour, name, voice, play, remove */
.dlg-field .dlg-sp { display: flex; align-items: center; gap: 6px; }
.dlg-field .dlg-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.dlg-field .dlg-sname { flex: 0 0 110px; min-width: 0; height: 30px; padding: 0 8px; background: var(--surface-sunk); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-bright); font: inherit; font-weight: 600; }
.dlg-field .dlg-sname:focus, .dlg-field .dlg-how:focus, .dlg-field .dlg-text:focus { outline: none; border-color: var(--accent); }
.dlg-field .vp-drop { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  background: var(--surface-sunk); border: 1px solid var(--border); border-radius: 8px; color: var(--text-bright); font: inherit; cursor: pointer; }
.dlg-field .vp-drop:hover, .dlg-field .vp-drop.open { border-color: var(--accent); }
.dlg-field .vp-drop .vp-name { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-field .vp-caret { flex: none; color: var(--text-dim); font-size: 11px; }
.dlg-field .dlg-play { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-sunk);
  color: var(--text); cursor: pointer; font-size: 10px; line-height: 1; padding: 0 0 0 2px; }
.dlg-field .dlg-play:hover { border-color: var(--accent); color: var(--accent); }
.dlg-field .dlg-play.on { background: var(--accent); border-color: var(--accent); color: #fff; padding: 0; }
.dlg-field .dlg-play.busy { opacity: .6; padding: 0; }
.dlg-field .dlg-sdel, .dlg-field .dlg-del, .dlg-field .dlg-dup { flex: none; width: 24px; height: 24px; background: none; border: 0; border-radius: 6px;
  color: var(--text-faint); font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.dlg-field .dlg-dup { font-size: 13px; }
.dlg-field .dlg-sdel:hover, .dlg-field .dlg-del:hover, .dlg-field .dlg-dup:hover { color: var(--text-bright); background: var(--card-hover); }
.dlg-field .dlg-sdel:disabled { visibility: hidden; }

/* a line: grip, who / how / dup / delete, then what they say */
.dlg-field .dlg-line { --sp: var(--accent); display: flex; gap: 6px; padding: 6px 6px 6px 0; background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--sp); border-radius: 8px; }
.dlg-field .dlg-line.dragging { opacity: .5; }
.dlg-field .dlg-line.drop-before { box-shadow: 0 -2px 0 var(--accent); }
.dlg-field .dlg-line.drop-after { box-shadow: 0 2px 0 var(--accent); }
.dlg-field .dlg-grip { flex: none; width: 18px; display: flex; align-items: flex-start; justify-content: center; padding-top: 6px;
  color: var(--text-faint); cursor: grab; user-select: none; font-size: 13px; }
.dlg-field .dlg-grip:hover { color: var(--text-bright); }
.dlg-field .dlg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dlg-field .dlg-top { display: flex; align-items: center; gap: 6px; }
.dlg-field .dlg-who { flex: 0 0 auto; max-width: 130px; height: 28px; padding: 0 6px; background: var(--surface-sunk); border: 1px solid var(--border);
  border-radius: 6px; color: var(--sp); font: inherit; font-weight: 600; cursor: pointer; }
.dlg-field .dlg-how { flex: 1; min-width: 0; height: 28px; padding: 0 8px; background: var(--surface-sunk); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font: inherit; font-style: italic; }
.dlg-field .dlg-text { width: 100%; box-sizing: border-box; min-height: 44px; resize: vertical; padding: 6px 8px; background: var(--surface-sunk);
  border: 1px solid var(--border); border-radius: 6px; color: var(--text-bright); font: inherit; line-height: 1.45; }
.dlg-field .dlg-sent { font-size: var(--fs-small); color: var(--text-dim); font-family: var(--font-mono); }
.dlg-field .dlg-sent:empty { display: none; }
.dlg-field .dlg-sent.off { font-family: inherit; color: var(--warn); }

.dlg-field .dlg-add, .dlg-field .dlg-addsp { align-self: flex-start; height: 28px; padding: 0 12px; background: none; border: 1px dashed var(--border-dash);
  border-radius: 8px; color: var(--text-dim); font: inherit; cursor: pointer; }
.dlg-field .dlg-add { align-self: stretch; color: var(--accent); border-color: rgba(var(--accent-rgb), .45); }
.dlg-field .dlg-add:hover, .dlg-field .dlg-addsp:hover { border-color: var(--accent); color: var(--text-bright); }
.dlg-field .dlg-addsp:disabled { opacity: .4; cursor: default; }

/* The panel's own text-box rules are stronger than a class; the name and the
   direction keep their boxes. */
#fields .dlg-field input.dlg-sname, #fields .dlg-field input.dlg-how { background: var(--surface-sunk); border: 1px solid var(--border); border-radius: 6px; }
#fields .dlg-field input.dlg-sname:focus, #fields .dlg-field input.dlg-how:focus { border-color: var(--accent); }

.dlg-field .dlg-meter { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-small); color: var(--text-dim); padding: 2px 2px 0; }
.dlg-field .dlg-count.over { color: var(--red); }
.dlg-field .dlg-cost { color: var(--text-bright); font-weight: 600; }
.dlg-field .dlg-note { font-size: var(--fs-small); color: var(--warn); }
.dlg-field .dlg-note:empty { display: none; }
