/* Galaxion core rich-text editor
 * Lightweight contenteditable-based editor with Bootstrap-friendly styling
 * and dark-mode support via [data-bs-theme="dark"].
 */

.gxn-editor {
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.375rem;
  background-color: var(--gxn-editor-bg, #ffffff);
  display: flex;
  flex-direction: column;
}

[data-bs-theme="dark"] .gxn-editor {
  --gxn-editor-bg: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.15);
}

.gxn-editor-toolbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.25rem;
  background-color: rgba(248, 249, 250, 0.9);
}

[data-bs-theme="dark"] .gxn-editor-toolbar {
  background-color: rgba(33, 37, 41, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

.gxn-editor-toolbar .btn {
  padding: 0.15rem 0.35rem;
  font-size: 0.8rem;
}

.gxn-editor-area {
  min-height: 160px;
  max-height: 480px;
  padding: 0.5rem 0.75rem;
  overflow-y: auto;
  background-color: transparent;
  color: inherit;
}

.gxn-editor-area:focus {
  outline: none;
}

.gxn-editor-area p {
  margin-bottom: 0.35rem;
}

.gxn-editor-area ul,
.gxn-editor-area ol {
  padding-left: 1.5rem;
}

.gxn-editor-area a {
  color: #0d6efd;
  text-decoration: underline;
}

[data-bs-theme="dark"] .gxn-editor-area a {
  color: #6ea8fe;
}

/* Hide the original textarea when enhanced */
.gxn-editor-source {
  display: none !important;
}
