/* Action Text (Trix) custom styles */

trix-editor {
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 0.5rem;
  margin: 0;
  padding: 1rem;
  min-height: 10rem;
  outline: none;
  font-family: inherit;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

trix-editor:focus {
  border-color: #3b82f6; /* blue-500 */
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

trix-toolbar {
  border: 1px solid #d1d5db;
  border-bottom: none;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  background-color: #f9fafb; /* gray-50 */
  padding: 0.5rem;
}

trix-toolbar .trix-button-group {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: #ffffff;
  margin-bottom: 0;
}

trix-toolbar .trix-button {
  border-radius: 0;
  border: none;
  background-color: transparent;
  color: #374151; /* gray-700 */
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  transition: background-color 200ms ease;
}

trix-toolbar .trix-button:hover {
  background-color: #f3f4f6; /* gray-100 */
}

trix-toolbar .trix-button.trix-active {
  background-color: #dbeafe; /* blue-100 */
  color: #1d4ed8; /* blue-700 */
}

/* Trix attachments */

/* Ensure code/pre inside trix-content always have readable colors regardless
   of Tailwind Typography or inherited text-color utilities on the wrapper. */
.trix-content pre {
  background-color: #1e293b; /* slate-800 */
  color: #f1f5f9;            /* slate-100 */
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
}

.trix-content :not(pre) > code {
  background-color: #f1f5f9; /* slate-100 */
  color: #0f172a;            /* slate-900 */
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.875em;
}

.trix-content pre code {
  background-color: transparent;
  color: inherit;
  border-radius: 0;
  padding: 0;
  font-size: inherit;
}

/* The default ActionText stylesheet resets margin/padding on all children,
   which strips indentation from lists. Restore proper list layout. */
.trix-content ul,
.trix-content ol {
  padding-left: 1.5rem;
  font-size: inherit;
}

.trix-content ul {
  list-style-type: disc;
}

.trix-content ol {
  list-style-type: decimal;
}

.trix-content li {
  margin-left: 0;
  font-size: inherit;
}

.attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
  margin: 0.5rem 0;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: #f9fafb;
}

.attachment img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
}