/*
 * Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
 * the trix-editor content (whether displayed or under editing). Feel free to incorporate this
 * inclusion directly in any other asset bundle and remove this file.
 *
 *= require trix
*/

/*
 * We need to override trix.css's image gallery styles to accommodate the
 * <action-text-attachment> element we wrap around attachments. Otherwise,
 * images in galleries will be squished by the max-width: 33%; rule.
*/
.trix-content .attachment-gallery > action-text-attachment,
.trix-content .attachment-gallery > .attachment {
  flex: 1 0 33%;
  padding: 0 0.5em;
  max-width: 33%;
}

.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--2 > .attachment, .trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
  flex-basis: 50%;
  max-width: 50%;
}

.trix-content action-text-attachment .attachment {
  padding: 0 !important;
  max-width: 100% !important;
}

/* Custom Trix Styles with Tailwind */
trix-toolbar {
  margin-bottom: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.25rem;
  background-color: #f9fafb;
}

trix-toolbar .trix-button-group {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
}

trix-toolbar .trix-button {
  border: none;
  background-color: white;
  padding: 0.375rem;
  border-radius: 0.25rem;
}

trix-toolbar .trix-button:hover {
  background-color: #f3f4f6;
}

trix-toolbar .trix-button.trix-active {
  background-color: #e5e7eb;
}

trix-editor {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  min-height: 8rem;
  padding: 0.5rem;
  background-color: white;
  overflow-y: auto;
}

.trix-content {
  max-width: none;
}

.trix-content ul {
  list-style-type: disc;
  padding-left: 1.25rem;
}

.trix-content ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
}

.trix-content h1 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.trix-content blockquote {
  border-left: 4px solid #d1d5db;
  padding-left: 1rem;
  font-style: italic;
}