/* app\assets\stylesheets\actiontext.css */

/* Override Trix image gallery styles to prevent squishing */
.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%;
}

/* General image styles inside Trix content */
.trix-content action-text-attachment .attachment {
  padding: 0 !important; /* Ensure padding is removed */
  max-width: 100% !important; /* Ensures the image fills the container */
  display: flex !important; /* Ensures the image is centered */
  justify-content: center !important; /* Centers the image */
}

/* Target all images inside the Trix editor's content and apply specific styles */
.trix-content action-text-attachment img {
  width: 5000px !important; /* Set the desired width */
  object-fit: cover !important; /* Maintain aspect ratio by cropping */
  border-radius: 0.5rem !important; /* Optional: rounds the corners of the image */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1) !important; /* Optional: adds a border around the image */
  max-width: 100% !important; /* Ensures the image doesn't overflow */
  height: auto !important; /* Keeps the aspect ratio if resized */
}
