/*
 * 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%;
  max-width: 33%;
}

.trix-content div {
  color: var(--black);
}

.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 .attachment-gallery figure.attachment {
  padding: 0 0.2rem;
}

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

.trix-content action-text-attachment .attachment--file {
  width: 100%;
}

.trix-content action-text-attachment .attachment img {
  margin: 0 auto;
  border-radius: 15px;
}

.trix-content action-text-attachment .attachment video {
  margin: 0 auto;
  border-radius: 15px;
  border: none;
}

.trix-content {
  display: flex;
  flex-direction: column;
}

.trix-content pre {
  margin: 0 auto;
  padding: 1rem;
  border-radius: 5px;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    Liberation Mono,
    Courier New,
    monospace !important;
}

.trix-content video {
  max-width: 100%;
  height: auto;
}

.trix-content a {
  text-decoration: underline;
  font-weight: 1000;
  position: relative;
  transition: border-color 0.5s ease;
  width: 100%;
}

.trix-content a::before {
  background: var(--sunglow-light);
  bottom: 0;
  content: "";
  height: 100%;
  position: absolute;
  transition: all 0.2s ease;
  width: 0;
  z-index: -1;
}

.trix-content a:hover {
  color: black;
}

.trix-content a:hover::before {
  width: 100%;
}
