/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* =================== CMS RICH TEXT (Trix-authored) =================== */
/* Applies to any `.trix-content` wrapper around sanitized HTML from the CMS API
   (section.body, item.description, product.short_description, ...). Each page
   stylesheet resets bare elements globally (`em`, `ul`, `a`, ...) for its own
   hand-built markup — these class-scoped rules are always more specific than
   those bare-element resets, so content authored with the trix-toolbar (bold,
   italic, links, lists, quotes) keeps its own formatting on every page,
   regardless of stylesheet load order. */
.trix-content { }
.trix-content > *:last-child { margin-bottom: 0; }
.trix-content p { margin: 0 0 0.75em; color: inherit; }
.trix-content span { color: inherit; }
.trix-content strong, .trix-content b { font-weight: 700; color: inherit; }
.trix-content em, .trix-content i { font-style: italic; color: inherit; }
.trix-content ul, .trix-content ol {
  list-style: revert;
  padding-left: 1.25em;
  margin: 0.5em 0;
}
.trix-content li { color: inherit; }
.trix-content a { color: var(--accent); text-decoration: underline; }
.trix-content a:hover { color: var(--accent-dark, var(--accent)); }
.trix-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1em;
  margin: 0.5em 0;
  font-style: italic;
}
.trix-content pre {
  background: rgba(0, 0, 0, 0.06);
  padding: 0.75em 1em;
  border-radius: 6px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.9em;
}
/* Image/file attachments (see ApplicationHelper#render_rich_text_attachments). Gallery
   wrappers are Trix's own `.attachment-gallery--N` divs around consecutive images. */
.trix-content figure.attachment { margin: 1.25em 0; text-align: center; }
.trix-content figure.attachment img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.trix-content .attachment__caption {
  margin-top: 0.5em;
  font-size: 0.875em;
  color: var(--text-dim, inherit);
  text-align: center;
}
.trix-content .attachment__size { margin-left: 0.5em; opacity: 0.7; }
.trix-content .attachment-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  margin: 1.25em 0;
}
.trix-content .attachment-gallery > figure.attachment { flex: 1 1 calc(50% - 1em); margin: 0; }
