/* ── SCEditor fixes ── */

/* Remove forced height — let it size naturally */
.sceditor-container {
  height: auto !important;
  min-height: 250px;
  border: 1px solid var(--tekbb-border) !important;
  border-radius: .375rem !important;
}

/* Dark mode for the editor toolbar and container */
[data-bs-theme="dark"] .sceditor-container {
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .sceditor-toolbar {
  background: #1e293b !important;
  border-bottom-color: #334155 !important;
}

[data-bs-theme="dark"] .sceditor-button {
  background: transparent !important;
}

[data-bs-theme="dark"] .sceditor-button:hover {
  background: #334155 !important;
}

[data-bs-theme="dark"] .sceditor-button div {
  filter: invert(1);
}

[data-bs-theme="dark"] .sceditor-group {
  border-color: #334155 !important;
  background: transparent !important;
}

/* Dark mode for editor dropdown menus */
[data-bs-theme="dark"] .sceditor-dropdown {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .sceditor-dropdown label {
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .sceditor-dropdown input,
[data-bs-theme="dark"] .sceditor-dropdown textarea {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

/* Source mode textarea */
[data-bs-theme="dark"] .sceditor-container textarea {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}