/* ══════════════════════════════════════════════════════════════════════════
   Feature dialogs (settings, broadcast, OBS overlay, admin confirmations)
   — UI-Redesign, 2026-10-22. The modal shell itself is components.css.
   Tokens only.
   ══════════════════════════════════════════════════════════════════════════ */

/* Muted-channels bulk list (Einstellungen) — scrolls past a handful. */
.settings-channel-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  max-height: calc(var(--s-16) * 2.5);
  overflow-y: auto;
}

/* Broadcast dialog: account multi-select, one row per account. */
.broadcast-account-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-px);
  max-height: calc(var(--s-16) * 3);
  overflow-y: auto;
  padding: var(--s-1);
  background: var(--color-bg-input);
  border: var(--bw) solid var(--color-border);
  border-radius: var(--r-md);
}
.broadcast-account-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--control-h-md);
  padding: 0 var(--s-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--color-text-primary);
  cursor: pointer;
}
.broadcast-account-row:hover { background: var(--color-bg-hover); }

/* ── Einstellungen: side navigation + fixed-height content ─────────────── */
.settings-modal-title { display: flex; align-items: center; gap: var(--s-2); }
#settings-form { display: flex; flex-direction: column; gap: var(--s-4); }
.settings-body { display: flex; gap: var(--s-5); align-items: flex-start; }
.settings-nav { display: flex; flex-direction: column; gap: var(--s-px); width: calc(var(--s-16) * 2.6); flex-shrink: 0; }
/* Own class (never .nav-tab, CLAUDE.md); same look as the sidebar rows. */
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  height: var(--nav-row-h);
  padding: 0 var(--s-2);
  background: none;
  border: none;
  border-radius: var(--r-md);
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast);
}
.settings-nav-item .icon { color: var(--color-text-tertiary); }
.settings-nav-item:hover { background: var(--color-bg-hover); color: var(--color-text-primary); }
.settings-nav-item.active { background: var(--color-bg-active); color: var(--color-text-primary); }
.settings-nav-item.active .icon { color: var(--color-accent-text); }
/* Fixed height (tallest pane + buffer): switching panes never resizes the
   dialog; on short screens the pane scrolls instead. */
.settings-content { flex: 1; min-width: 0; height: min(calc(var(--s-16) * 8.5), calc(100vh - var(--s-16) * 3)); overflow-y: auto; padding-right: var(--s-1); }
.settings-pane { display: flex; flex-direction: column; gap: var(--s-4); }
.settings-pane-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--color-text-primary); }
.settings-empty-hint { color: var(--color-text-tertiary); }
@media (max-width: 767px) {
  .settings-body { flex-direction: column; gap: var(--s-3); }
  .settings-nav { flex-direction: row; width: 100%; overflow-x: auto; }
  .settings-nav-item { width: auto; white-space: nowrap; }
  .settings-content { height: auto; max-height: calc(100vh - var(--s-16) * 3.5); }
}

/* "Namensfarben lesbar machen" preview — on the chat's own background so
   the contrast shown is the contrast the chat gets. */
.readable-colors-preview {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  background: var(--color-bg-panel);
  border: var(--bw) solid var(--color-border);
  border-radius: var(--r-md);
}
.readable-colors-preview-row { display: flex; align-items: baseline; gap: var(--s-3); }
.readable-colors-preview-label { flex: 0 0 calc(var(--s-12) + var(--s-1)); font-size: var(--fs-2xs); color: var(--color-text-tertiary); }
.readable-colors-preview-names { display: flex; flex-wrap: wrap; gap: var(--s-0-5) var(--s-2); min-width: 0; }
.readable-colors-preview-name { font-family: var(--chat-font-family); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }

/* ── OBS overlay: settings left, live preview right ────────────────────── */
.overlay-modal { display: grid; grid-template-columns: minmax(0, 1fr) calc(var(--popover-w) + var(--s-1)); gap: var(--s-5); }
.overlay-modal-settings { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.overlay-modal-preview { min-height: 0; }
.overlay-url-row { display: flex; gap: var(--s-2); align-items: center; }
.overlay-url-row input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0; }
.overlay-url-row .btn { flex: none; }
.overlay-opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
/* Transparent source on a checkerboard, like OBS shows it. color-scheme
   normal: the overlay page declares none, and an iframe whose scheme
   differs from its document's gets an opaque backdrop (the app is dark). */
.overlay-preview {
  color-scheme: normal;
  width: 100%;
  height: 100%;
  min-height: calc(var(--s-16) * 6);
  border: var(--bw) solid var(--color-border);
  border-radius: var(--r-md);
  background-color: var(--color-bg-raised);
  background-image:
    linear-gradient(45deg, var(--color-bg-overlay) 25%, transparent 25%, transparent 75%, var(--color-bg-overlay) 75%),
    linear-gradient(45deg, var(--color-bg-overlay) 25%, transparent 25%, transparent 75%, var(--color-bg-overlay) 75%);
  background-size: var(--s-4) var(--s-4);
  background-position: 0 0, var(--s-2) var(--s-2);
}
.overlay-modal-actions { justify-content: space-between; }
/* Link regenerated in another tab: a short flash on the field (+ toast). */
#overlay-url.is-updated { animation: overlay-url-flash 1.2s ease-out; }
@keyframes overlay-url-flash {
  from { box-shadow: 0 0 0 var(--bw-thick) var(--color-accent); }
  to { box-shadow: 0 0 0 var(--bw-thick) transparent; }
}
@media (max-width: 720px) {
  .overlay-modal { grid-template-columns: 1fr; }
  .overlay-preview { min-height: calc(var(--s-16) * 3.75); }
}
