/* Editor TipTap: toolbar + área de contenido. */
.tt-wrap {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--bg);
}

.tt-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  padding: var(--sp-2);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  position: sticky; top: var(--header-h); z-index: 5;
}
.tt-btn {
  min-width: 30px; height: 30px;
  padding: 0 var(--sp-2);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--text-soft);
  cursor: pointer;
  line-height: 1;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.tt-btn:hover { background: var(--bg-hover); color: var(--text); }
.tt-btn.active { background: var(--text); color: var(--accent-inv); border-color: var(--text); }
.tt-sep { width: 1px; height: 20px; background: var(--border-strong); margin: 0 var(--sp-1); }

/* Área de contenido (ProseMirror). Crece con el contenido, SIN scroll interno:
   la página entera hace scroll. */
.tt-editor .ProseMirror {
  min-height: 480px;
  padding: var(--sp-6);
  outline: none;
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--text);
  /* Base ProseMirror necesaria para el renderizado correcto del texto. */
  position: relative;
  white-space: pre-wrap;
  word-wrap: break-word;
  -webkit-font-variant-ligatures: none;
  font-variant-ligatures: none;
}
.tt-editor .ProseMirror:focus, .tt-editor .ProseMirror-focused { outline: none; }
.tt-editor .ProseMirror [contenteditable="false"] { white-space: normal; }
.tt-editor .ProseMirror > * + * { margin-top: 0.75em; }
.tt-editor .ProseMirror h2 { font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: 600; }
.tt-editor .ProseMirror h3 { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 600; }
.tt-editor .ProseMirror p { margin: 0; }
.tt-editor .ProseMirror ul, .tt-editor .ProseMirror ol { padding-left: var(--sp-6); }
.tt-editor .ProseMirror li > p { margin: 0; }
.tt-editor .ProseMirror blockquote {
  border-left: 3px solid var(--border-strong);
  padding-left: var(--sp-4);
  color: var(--text-soft);
  font-style: italic;
}
.tt-editor .ProseMirror a { color: var(--state-shared-fg); text-decoration: underline; }
.tt-editor .ProseMirror img { max-width: 100%; height: auto; border-radius: var(--r-sm); }
/* Placeholder cuando está vacío (TipTap añade .is-editor-empty al primer nodo) */
.tt-editor .ProseMirror p.is-editor-empty:first-child::before {
  content: 'Escribe el cuerpo de la noticia…';
  color: var(--text-muted);
  float: left;
  height: 0;
  pointer-events: none;
}

.noticia-load-banner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--state-shared-bg);
  color: var(--state-shared-fg);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-3);
}
