.tvbd-rich-editor {
  max-width: 100%;
  margin: 0;
  text-align: left;
}

.tvbd-rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-bottom: 0;
  padding: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px 10px 0 0;
}

.tvbd-rich-editor-toolbar button,
.tvbd-rich-editor-toolbar select,
.tvbd-rich-editor-toolbar label {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.tvbd-rich-editor-toolbar button {
  min-width: 32px;
  height: 32px;
  padding: 4px 8px;
  border: 1px solid #475569;
  border-radius: 6px;
  background: #0f172a;
  cursor: pointer;
}

.tvbd-rich-editor-toolbar button:hover,
.tvbd-rich-editor-toolbar button.is-active {
  background: #1d4ed8;
  border-color: #3b82f6;
}

.tvbd-rich-editor-toolbar select {
  height: 32px;
  padding: 2px 6px;
  border: 1px solid #475569;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
}

.tvbd-rich-editor-toolbar .tvbd-rich-editor-separator {
  width: 1px;
  height: 24px;
  background: #475569;
  margin: 0 4px;
}

.tvbd-rich-editor-surface {
  min-height: 180px;
  max-height: 520px;
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid #334155;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #0b1220;
  color: #e2e8f0;
  line-height: 1.55;
  outline: none;
}

.tvbd-rich-editor-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.tvbd-rich-editor-surface.is-empty::before {
  content: attr(data-placeholder);
  color: #64748b;
  pointer-events: none;
}

.tvbd-rich-editor-surface img,
.tvbd-rich-editor-surface .tvbd-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 8px 0;
  border-radius: 8px;
}

.tvbd-rich-editor-surface.is-dragover {
  background: #122033;
  outline: 2px dashed #3b82f6;
}

.tvbd-rich-editor-surface ul,
.tvbd-rich-editor-surface ol {
  margin: 0.5rem 0 0.5rem 1.25rem;
}

.tvbd-rich-editor-surface blockquote {
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid #3b82f6;
  background: rgba(30, 41, 59, 0.7);
  color: #cbd5e1;
}

.tvbd-rich-editor-emoji-picker {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border: 1px solid #334155;
  border-top: none;
  background: #111827;
}

.tvbd-rich-editor-emoji-picker.is-open {
  display: flex;
}

.tvbd-rich-editor-emoji-picker span {
  cursor: pointer;
  font-size: 1.2rem;
  padding: 2px 4px;
  border-radius: 4px;
}

.tvbd-rich-editor-emoji-picker span:hover {
  background: #1e293b;
}

.tvbd-rich-editor-status {
  min-height: 1.25rem;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.tvbd-rich-editor-status.is-error {
  color: #fca5a5;
}

.tvbd-rich-editor-compact .tvbd-rich-editor-surface {
  min-height: 110px;
  max-height: 320px;
}

.tvbd-rich-editor-compact .tvbd-rich-editor-toolbar button {
  min-width: 28px;
  height: 28px;
  font-size: 0.82rem;
}

.tvbd-rich-editor-wrap .tvbd-markup-toolbar,
.tvbd-rich-editor-wrap textarea.tvbd-markup-editor,
.tvbd-rich-editor-wrap textarea.posts-compose-text,
.tvbd-rich-editor-wrap textarea.tvbd-rich-source {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.tvbd-rich-editor-host {
  position: relative;
}
