/* Editor tools - scoped so existing articles/layout remain unchanged */
.news-editor-tool-dialog { width: min(620px, calc(100vw - 32px)); max-width: 100%; }
.news-editor-preview-dialog { width: min(920px, calc(100vw - 32px)); max-width: 100%; max-height: min(90vh, 900px); overflow-y: auto; }
.news-editor-tool-dialog label { display: block; margin: 12px 0 6px; font-weight: 600; }
.news-editor-tool-dialog textarea, .news-editor-tool-dialog input,
.news-editor-preview-dialog textarea { width: 100%; max-width: 100%; box-sizing: border-box; font: inherit; color: var(--text-color, #e5e5e5); background: var(--card-bg, #1e2635); border: 1px solid var(--border-color, #5b6475); border-radius: 6px; padding: 10px; }
.news-editor-tool-dialog textarea { resize: vertical; white-space: pre-wrap; min-height: 150px; }
.news-editor-preview-dialog textarea { resize: vertical; font-family: monospace; white-space: pre; overflow: auto; }
.news-editor-tool-help { color: var(--text-secondary, #aaa); line-height: 1.45; }
.news-editor-tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.news-editor-preview-rendered { padding: 16px; border: 1px solid var(--border-color, #596273); border-radius: 8px; max-height: 52vh; overflow: auto; overflow-wrap: anywhere; }
.news-editor-preview-rendered p { margin: 0 0 1em; }
.news-editor-preview-rendered img { max-width: 100%; height: auto; }
.news-editor-link-error { margin-top: 8px; color: #ffb4b4; }
.news-editor-preview-dialog details { margin-top: 14px; }
#editor-toolbar button[aria-label^="Отменить"], #editor-toolbar button[aria-label^="Повторить"] { min-width: 32px; }
@media (max-width: 600px) { .news-editor-preview-rendered { max-height: 40vh; padding: 10px; } .news-editor-tool-actions button { flex: 1; } }
