/*
 * Lexxy theme overrides
 */

:root.dark {
  /* Lexxy Dark Mode Colors */
  --lexxy-color-ink: oklch(90% 0 0);
  --lexxy-color-ink-medium: oklch(80% 0 0);
  --lexxy-color-ink-light: oklch(60% 0 0);
  --lexxy-color-ink-lighter: oklch(40% 0 0);
  --lexxy-color-ink-lightest: oklch(25% 0 0);
  --lexxy-color-ink-inverted: #111827;
  /* Dark background matching Tailwind bg-gray-900 */

  --lexxy-color-canvas: #1f2937;
  /* Editor background matching Tailwind bg-gray-800 */

  --lexxy-color-table-header-bg: #374151;
  /* Tailwind gray-700 */
  --lexxy-color-table-cell-border: #4b5563;
  /* Tailwind gray-600 */
  --lexxy-color-code-bg: #111827;
  /* Tailwind gray-900 */

  --lexxy-focus-ring-color: #60a5fa;
  /* Tailwind blue-400 */
}

/* Base text color explicitly handled if Lexxy misses any */
.dark .lexxy-content {
  color: #f9fafb;
}

.dark .lexxy-content h1,
.dark .lexxy-content h2,
.dark .lexxy-content h3,
.dark .lexxy-content h4,
.dark .lexxy-content h5,
.dark .lexxy-content h6 {
  color: #ffffff;
}

.dark .lexxy-content strong {
  color: #ffffff;
}

.dark .lexxy-content code {
  background-color: #111827;
  color: #f3f4f6;
  border-color: #374151;
}

.dark .lexxy-content pre {
  background-color: #111827;
  border-color: #374151;
  color: #f9fafb;
}

.dark .lexxy-content a {
  color: #60a5fa;
}

.dark .lexxy-content a:hover {
  color: #93c5fd;
}

.dark .lexxy-content blockquote {
  border-left-color: #4b5563;
  color: #d1d5db;
}

.dark .lexxy-content .attachment--file {
  border-color: #4b5563;
  color: #e5e7eb;
}

.dark .lexxy-content .attachment:hover {
  background-color: rgba(75, 85, 99, 0.3);
}

.dark .lexxy-content .attachment--preview .attachment__caption {
  color: #9ca3af;
}

.dark .lexxy-editor--empty .lexxy-editor__content::before {
  color: #9ca3af;
}

/* Editor Toolbar Overrides for Dark Mode */

.dark lexxy-toolbar {
  background-color: #1f2937;
  border-bottom-color: #374151;
}

.dark .lexxy-editor__toolbar-button {
  color: #e5e7eb;
}

.dark .lexxy-editor__toolbar-button:hover:not([aria-disabled="true"]) {
  background-color: #374151;
  color: #ffffff;
}

.dark .lexxy-editor__toolbar-button[aria-pressed="true"] {
  background-color: #4b5563;
  color: #ffffff;
}

.dark .lexxy-editor__toolbar-button[aria-disabled="true"] {
  color: rgba(255, 255, 255, 0.3);
}

.dark .lexxy-editor__toolbar-group-end::after {
  background-color: #4b5563;
}

.dark .lexxy-editor__toolbar-dropdown summary~* {
  background-color: #1f2937;
  border-color: #4b5563;
  box-shadow: 0 0.3em 1em rgba(0, 0, 0, 0.5);
  color: #f9fafb;
}

.dark .lexxy-editor__toolbar-dropdown[open]>.lexxy-editor__toolbar-button {
  background-color: #374151;
}

.dark lexxy-link-dropdown input[type="url"] {
  background-color: #111827;
  border-color: #4b5563;
  color: #f9fafb;
}

.dark lexxy-link-dropdown button {
  background-color: #374151;
  color: #e5e7eb;
}

.dark lexxy-link-dropdown button[type="submit"] {
  background-color: #60a5fa;
  color: #ffffff;
}

.dark lexxy-link-dropdown button[type="submit"]:hover {
  background-color: #3b82f6;
}

.dark lexxy-code-language-picker select {
  background-color: #111827;
  border-color: #4b5563;
  color: #f9fafb;
}