/*
 * 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.
 * 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.
 */

@import url('https://unpkg.com/trix@2.0.8/dist/trix.css');

.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;
}

/* Style for greek terms in both editor and show view using class-based span */
.trix-content greek,
.actiontext-content greek {
  display: inline-block;
  color: #0052cc;
  font-family: monospace;
  font-size: 1.2em;
  text-transform: lowercase;
  background-color: #e6f3ff;
  padding: 0 0.2em !important;
  border-radius: 0.2em;
  border: 1px solid #0052cc;
}

.trix-content span[data-trix-attribute="greek"], 
.actiontext-content span[data-trix-attribute="greek"] {
  color: #0052cc;
  font-family: monospace;
  font-size: 1.2em;
  text-transform: lowercase;
  background-color: #e6f3ff;
}

.trix-content pre {
  background-color: #1f2937;
  color: #fff;
  padding: 1em;
  border-radius: 0.5em;
}