/* Wrap toolbar and shrink icons on tablets and phones (< lg) */
@media (max-width: 991.98px) {
  trix-toolbar .trix-button-row {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 4px;
  }

  trix-toolbar .trix-button-group-spacer {
    display: none;
  }

  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 0;
  }

  trix-toolbar .trix-button {
    padding: 0 0.3em;
  }

  trix-toolbar .trix-button--icon {
    width: 2em;
    height: 1.3em;
    max-width: none;
  }
}

/* Embedded image in Trix content is clickable to open the preview modal */
.trix-content .attachment__preview-link {
  display: inline-block;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.trix-content .attachment__preview-link:hover {
  opacity: 0.85;
}
