/* Toolbar above Chatwoot's article editor (editor-toolbar.js). Neutral greys after the dashboard's
   own palette; dark mode follows Chatwoot's `dark`/`light` class on <html>, else the system. */
.sos-editor-toolbar {
  --sos-tb-bg: #ffffff;
  --sos-tb-border: #e5e7eb;
  --sos-tb-fg: #4b5563;
  --sos-tb-fg-strong: #111827;
  --sos-tb-hover: rgba(17, 24, 39, 0.06);
  --sos-tb-active: rgba(17, 24, 39, 0.1);
  --sos-tb-hint: #6b7280;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  box-sizing: border-box;
  margin: 0 0 8px;
  padding: 4px;
  border: 1px solid var(--sos-tb-border);
  border-radius: 8px;
  background: var(--sos-tb-bg);
  color: var(--sos-tb-fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1;
}
:root.dark .sos-editor-toolbar,
body.dark .sos-editor-toolbar {
  --sos-tb-bg: #1c1c1c;
  --sos-tb-border: #333333;
  --sos-tb-fg: #c9c9c9;
  --sos-tb-fg-strong: #f5f5f5;
  --sos-tb-hover: rgba(255, 255, 255, 0.08);
  --sos-tb-active: rgba(255, 255, 255, 0.14);
  --sos-tb-hint: #9a9a9a;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) .sos-editor-toolbar {
    --sos-tb-bg: #1c1c1c;
    --sos-tb-border: #333333;
    --sos-tb-fg: #c9c9c9;
    --sos-tb-fg-strong: #f5f5f5;
    --sos-tb-hover: rgba(255, 255, 255, 0.08);
    --sos-tb-active: rgba(255, 255, 255, 0.14);
    --sos-tb-hint: #9a9a9a;
  }
}
.sos-tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-width: 32px;
  padding: 0 6px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sos-tb-fg);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}
.sos-tb-btn:hover { background: var(--sos-tb-hover); color: var(--sos-tb-fg-strong); }
.sos-tb-btn:active { background: var(--sos-tb-active); }
.sos-tb-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }
.sos-tb-btn svg { display: block; }
.sos-tb-glyph { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
.sos-tb-glyph--bold { font-weight: 800; font-size: 14px; }
.sos-tb-glyph--italic { font-style: italic; font-family: Georgia, "Times New Roman", serif; font-size: 15px; }
.sos-tb-glyph--strike { text-decoration: line-through; }
.sos-tb-sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--sos-tb-border);
}
.sos-tb-spacer { flex: 1 1 auto; min-width: 8px; }
/* Right end: where the article lives, then "Premakni…" (icon plus text). */
.sos-tb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 40%;
  height: 26px;
  margin-right: 4px;
  padding: 0 10px;
  border: 1px solid var(--sos-tb-border);
  border-radius: 999px;
  color: var(--sos-tb-hint);
  font-size: 12px;
  white-space: nowrap;
}
.sos-tb-pill svg { flex: none; }
.sos-tb-pill-text { overflow: hidden; text-overflow: ellipsis; }
.sos-tb-pill--error { border-style: dashed; }
.sos-tb-btn--move {
  gap: 6px;
  padding: 0 10px;
  white-space: nowrap;
}
.sos-tb-label { font-size: 13px; font-weight: 500; }
.sos-tb-hint {
  margin-left: 8px;
  padding: 0 4px;
  color: var(--sos-tb-hint);
  font-size: 12px;
}
.sos-tb-hint[hidden] { display: none; }

/* The "Premakni…" dialog (editor-toolbar.js, decision D37): the dashboard's modal look, same
   palette handling as the toolbar. */
.sos-move-dialog-backdrop {
  --sos-dlg-bg: #ffffff;
  --sos-dlg-border: #e5e7eb;
  --sos-dlg-fg: #4b5563;
  --sos-dlg-fg-strong: #111827;
  --sos-dlg-muted: #6b7280;
  --sos-dlg-field-bg: #ffffff;
  --sos-dlg-hover: rgba(17, 24, 39, 0.06);
  --sos-dlg-primary: #1f93ff;
  --sos-dlg-primary-fg: #ffffff;
  --sos-dlg-error-bg: #fef2f2;
  --sos-dlg-error-fg: #b91c1c;
  --sos-dlg-ok-bg: #ecfdf5;
  --sos-dlg-ok-fg: #047857;
  --sos-dlg-note-bg: #f3f4f6;
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.45);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--sos-dlg-fg);
}
:root.dark .sos-move-dialog-backdrop,
body.dark .sos-move-dialog-backdrop {
  --sos-dlg-bg: #1c1c1c;
  --sos-dlg-border: #333333;
  --sos-dlg-fg: #c9c9c9;
  --sos-dlg-fg-strong: #f5f5f5;
  --sos-dlg-muted: #9a9a9a;
  --sos-dlg-field-bg: #262626;
  --sos-dlg-hover: rgba(255, 255, 255, 0.08);
  --sos-dlg-error-bg: #3a1d1d;
  --sos-dlg-error-fg: #fca5a5;
  --sos-dlg-ok-bg: #12332a;
  --sos-dlg-ok-fg: #6ee7b7;
  --sos-dlg-note-bg: #262626;
  background: rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) .sos-move-dialog-backdrop {
    --sos-dlg-bg: #1c1c1c;
    --sos-dlg-border: #333333;
    --sos-dlg-fg: #c9c9c9;
    --sos-dlg-fg-strong: #f5f5f5;
    --sos-dlg-muted: #9a9a9a;
    --sos-dlg-field-bg: #262626;
    --sos-dlg-hover: rgba(255, 255, 255, 0.08);
    --sos-dlg-error-bg: #3a1d1d;
    --sos-dlg-error-fg: #fca5a5;
    --sos-dlg-ok-bg: #12332a;
    --sos-dlg-ok-fg: #6ee7b7;
    --sos-dlg-note-bg: #262626;
    background: rgba(0, 0, 0, 0.6);
  }
}
.sos-move-dialog {
  box-sizing: border-box;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px 24px 20px;
  border: 1px solid var(--sos-dlg-border);
  border-radius: 12px;
  background: var(--sos-dlg-bg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.sos-move-dialog-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--sos-dlg-fg-strong);
}
.sos-move-dialog-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--sos-dlg-muted);
}
.sos-move-dialog-form { display: flex; flex-direction: column; gap: 12px; }
.sos-move-dialog-field { display: flex; flex-direction: column; gap: 4px; }
.sos-move-dialog-label { font-size: 13px; font-weight: 500; color: var(--sos-dlg-fg-strong); }
.sos-move-dialog-select {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--sos-dlg-border);
  border-radius: 8px;
  background: var(--sos-dlg-field-bg);
  color: var(--sos-dlg-fg-strong);
  font: inherit;
  font-size: 14px;
}
/* The dashboard transitions every button and select; state changes here should be instant. */
.sos-move-dialog-select, .sos-move-dialog-btn { transition: none; }
.sos-move-dialog-select:disabled { opacity: 0.6; cursor: not-allowed; }
.sos-move-dialog-select:focus-visible { outline: 2px solid #3b82f6; outline-offset: -1px; }
.sos-move-dialog-hint {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--sos-dlg-note-bg);
  font-size: 12.5px;
  color: var(--sos-dlg-fg);
}
.sos-move-dialog-hint[hidden] { display: none; }
.sos-move-dialog-status {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--sos-dlg-note-bg);
  font-size: 13px;
  color: var(--sos-dlg-fg);
}
.sos-move-dialog-status[hidden] { display: none; }
.sos-move-dialog-status--error { background: var(--sos-dlg-error-bg); color: var(--sos-dlg-error-fg); }
.sos-move-dialog-status--success { background: var(--sos-dlg-ok-bg); color: var(--sos-dlg-ok-fg); }
/* Bulk move from the article list: the articles that did not move, one card each. */
.sos-move-dialog-summary {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 40vh;
  overflow: auto;
}
.sos-move-dialog-summary[hidden] { display: none; }
.sos-move-dialog-summary-item {
  padding: 8px 10px;
  border: 1px solid var(--sos-dlg-border);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--sos-dlg-fg);
  overflow-wrap: anywhere;
}
.sos-move-dialog-summary-item strong { color: var(--sos-dlg-fg-strong); font-weight: 600; }
.sos-move-dialog-summary-note { display: block; margin-top: 2px; color: var(--sos-dlg-muted); }
.sos-move-dialog-status--progress::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sos-move-spin 0.8s linear infinite;
}
@keyframes sos-move-spin { to { transform: rotate(360deg); } }
.sos-move-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.sos-move-dialog-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--sos-dlg-border);
  border-radius: 8px;
  background: var(--sos-dlg-bg);
  color: var(--sos-dlg-fg-strong);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.sos-move-dialog-btn:hover { background: var(--sos-dlg-hover); }
.sos-move-dialog-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: 1px; }
.sos-move-dialog-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.sos-move-dialog-btn--primary {
  border-color: var(--sos-dlg-primary);
  background: var(--sos-dlg-primary);
  color: var(--sos-dlg-primary-fg);
}
.sos-move-dialog-btn--primary:hover:not(:disabled) { background: #1a7fe0; border-color: #1a7fe0; }
.sos-move-dialog-backdrop--busy { cursor: progress; }

/* "Premakni v portal" in the article list's bulk action bar (editor-toolbar.js). The button
   normally carries the classes of the bar's own buttons; these rules only size the icon and, when
   no bar button was there to copy from (--own), give it the same look by hand. */
.sos-bulk-move-btn { white-space: nowrap; }
.sos-bulk-move-icon { display: inline-flex; width: 16px; height: 16px; }
.sos-bulk-move-icon svg { width: 16px; height: 16px; }
.sos-bulk-move-btn--own {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(100, 116, 139, 0.1);
  color: #111827;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.sos-bulk-move-btn--own:hover { background: rgba(100, 116, 139, 0.2); }
.sos-bulk-move-btn--own:focus-visible { outline: 2px solid #3b82f6; outline-offset: 1px; }
:root.dark .sos-bulk-move-btn--own, body.dark .sos-bulk-move-btn--own { color: #f5f5f5; }
@media (prefers-color-scheme: dark) {
  :root:not(.light) .sos-bulk-move-btn--own { color: #f5f5f5; }
}
