/* Trix Custom Theming for DaisyUI */

/* Toolbar */
trix-toolbar {
  @apply bg-base-200 border-base-300 rounded-t-lg;
}

trix-toolbar .trix-button-group {
  @apply border-base-300;
}

trix-toolbar .trix-button {
  @apply text-base-content border-base-300;
}

trix-toolbar .trix-button:hover {
  @apply bg-base-300;
}

trix-toolbar .trix-button.trix-active {
  @apply bg-primary text-primary-content;
}

trix-toolbar .trix-button--icon::before {
  opacity: 0.8;
}

/* Editor */
trix-editor {
  @apply bg-base-100 text-base-content;
}

trix-editor:focus {
  @apply outline-none ring-2 ring-primary ring-offset-2;
}

/* Content Styles */
trix-editor h1 {
  @apply text-3xl font-bold my-4;
}

trix-editor h2 {
  @apply text-2xl font-bold my-3;
}

trix-editor h3 {
  @apply text-xl font-bold my-2;
}

trix-editor a {
  @apply text-primary underline;
}

trix-editor a:hover {
  @apply text-primary-focus;
}

trix-editor ul {
  @apply list-disc list-inside my-2;
}

trix-editor ol {
  @apply list-decimal list-inside my-2;
}

trix-editor blockquote {
  @apply border-l-4 border-base-300 pl-4 my-2 italic text-base-content/80;
}

trix-editor pre {
  @apply bg-base-200 p-4 rounded-lg my-2 overflow-x-auto;
}

trix-editor code {
  @apply bg-base-200 px-1 rounded text-sm font-mono;
}

/* Attachments */
trix-editor .attachment {
  @apply my-2;
}

trix-editor .attachment__caption {
  @apply text-sm text-base-content/70 mt-1;
}

/* Placeholder */
trix-editor:empty:not(:focus)::before {
  @apply text-base-content/40;
}
