/* Стили для Trix редактора в админке (тёмная тема) */

/* Панель инструментов */
trix-toolbar {
  background-color: rgba(88, 28, 135, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.5rem;
}

trix-toolbar .trix-button-group {
  margin-bottom: 0;
  border-color: rgba(139, 92, 246, 0.4);
  border-radius: 0.375rem;
  overflow: hidden;
}

trix-toolbar .trix-button-group:not(:first-child) {
  margin-left: 0.5rem;
}

trix-toolbar .trix-button {
  background-color: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.3);
  color: #e9d5ff;
  padding: 0.5rem;
}

trix-toolbar .trix-button:hover {
  background-color: rgba(139, 92, 246, 0.4);
  color: #ffffff;
}

trix-toolbar .trix-button.trix-active {
  background-color: rgba(139, 92, 246, 0.6);
  color: #ffffff;
}

trix-toolbar .trix-button:disabled {
  opacity: 0.4;
}

/* Иконки кнопок */
trix-toolbar .trix-button::before {
  filter: invert(1) brightness(2);
}

/* Редактор */
trix-editor {
  background-color: rgba(88, 28, 135, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  color: #f3f4f6;
  min-height: 300px;
  padding: 1rem;
}

trix-editor:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.5);
  border-color: rgba(139, 92, 246, 0.5);
}

/* Placeholder */
trix-editor:empty:not(:focus)::before {
  color: #9ca3af;
}

/* Контент внутри редактора */
trix-editor h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e9d5ff;
  margin-bottom: 0.75rem;
}

trix-editor a {
  color: #c084fc;
  text-decoration: underline;
}

trix-editor a:hover {
  color: #e9d5ff;
}

trix-editor blockquote {
  border-left: 3px solid #8b5cf6;
  padding-left: 1rem;
  margin-left: 0;
  color: #d1d5db;
  font-style: italic;
}

trix-editor pre {
  background-color: rgba(0, 0, 0, 0.4);
  padding: 0.75rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.875rem;
}

trix-editor ul,
trix-editor ol {
  padding-left: 1.5rem;
}

trix-editor li {
  margin-bottom: 0.25rem;
}

/* Диалоги (ссылки и т.д.) */
trix-toolbar .trix-dialog {
  background-color: #1e1b4b;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

trix-toolbar .trix-dialog__link-fields {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

trix-toolbar .trix-dialog input[type="text"],
trix-toolbar .trix-dialog input[type="url"] {
  background-color: rgba(88, 28, 135, 0.5);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 0.375rem;
  color: #f3f4f6;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

trix-toolbar .trix-dialog input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

trix-toolbar .trix-dialog .trix-button-group {
  margin: 0;
}

trix-toolbar .trix-dialog .trix-button {
  font-size: 0.875rem;
}

