/*
 * 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;
}

.trix-content {
  position: absolute;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  border: 0;
  padding: 2rem;
  outline: 0;
  overflow: auto;
}

.trix-button-group.trix-button-group--file-tools {
  display: none;
}

/* Custom styles for Tajo */

.trix--fullscreen .trix-content {
  position: absolute;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  border: 0;
  padding: 2rem;
  outline: 0;
  overflow: auto;
}

.trix--white .trix-button {
  background: white;
}

.trix--simple .trix-button--icon-strike,
.trix--simple .trix-button--icon-link,
.trix--simple .trix-button--icon-quote,
.trix--simple .trix-button--icon-code,
.trix--simple .trix-button--icon-decrease-nesting-level,
.trix--simple .trix-button--icon-increase-nesting-level {
  display: none;
}

.trix--minimal .trix-button--icon-strike,
.trix--minimal .trix-button--icon-link,
.trix--minimal .trix-button--icon-quote,
.trix--minimal .trix-button--icon-code,
.trix--minimal .trix-button--icon-decrease-nesting-level,
.trix--minimal .trix-button--icon-increase-nesting-level,
.trix--minimal .trix-button--icon-heading-1,
.trix--minimal .trix-button-group--history-tools {
  display: none;
}


/* Refactor this so that Trix can be used in various contexts */
trix-editor h1,
.trix-format h1 {
  font-size: 1.25rem;
  line-height: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

trix-editor p,
.trix-format p {
  margin-bottom: 1rem;
}

trix-editor ul,
.trix-format ul {
  list-style-position: inside;
  list-style-type: disc;
}

trix-editor ol,
.trix-format ol {
  list-style-position: inside;
  list-style-type: decimal;
}

trix-editor {
  overflow: auto;
}
