/*
 * Action Text styles for Lexxy [https://lexxy.dev/docs/css-setup]
 *
 * The editor and rendered-content styles ship with the lexxy gem
 * (stylesheet_link_tag "lexxy"). This file only carries Action Text-specific
 * overrides for attachments rendered inside .lexxy-content.
 */

.lexxy-content {
  action-text-attachment .attachment {
    padding: 0;
    max-width: 100%;
  }

  .attachment--file {
    display: inline-block;
    line-height: 1;
    margin: 0 2px 2px 2px;
    padding: 0.4em 1em;
    border: 1px solid var(--border, #bbb);
    border-radius: 5px;
  }

  .attachment__caption {
    text-align: center;
    font-size: 0.9em;
    color: var(--muted-foreground, #666);
  }

  .attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;

    .attachment {
      flex: 1 0 33%;
      max-width: 33%;
      padding: 0;
    }
  }
}
