/* THE SHARED SNIPPETS' STYLESHEET (docs/claude/shared-snippets.md), linked by {% render 'mbs-head' %}.
   Structure only. Every rule sits in :where() (specificity 0), so a theme restyles any of it with plain CSS, and
   every colour, size and radius is a --mbs-* custom property a theme sets once on :root. Classes are BEM under mbs-
   (mbs-qb, mbs-qb__row, ...); the .js-mbs-* hooks never carry style. */

:where(:root) {
  --mbs-text: #222;
  --mbs-muted: #666;
  --mbs-accent: #26c;
  --mbs-danger: #b00020;
  --mbs-surface: #fff;
  --mbs-border: #e6e6e6;
  --mbs-radius: 4px;
  --mbs-gap: 0.5rem;
  --mbs-font-size-small: 0.875em;
  --mbs-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  --mbs-z-modal: 9995;
  --mbs-z-banner: 9994;
}

:where([hidden]) { display: none; }

/* a button inside the shared chrome (a theme's own buttons are its own) */
:where(.mbs-button) {
  display: inline-block;
  padding: 0.6em 1.2em;
  border: 1px solid var(--mbs-text);
  border-radius: var(--mbs-radius);
  background: var(--mbs-text);
  color: var(--mbs-surface);
  font: inherit;
  cursor: pointer;
}

/* the shared modals (support.js removes .mfp-hide when no magnific is on the page) */
:where(.mbs-modal) {
  position: fixed;
  inset: 0;
  z-index: var(--mbs-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
}
:where(.mbs-modal.mfp-hide) { display: none; }
:where(.mbs-modal__body) {
  max-width: 28rem;
  width: 100%;
  padding: 1.5rem;
  border-radius: var(--mbs-radius);
  background: var(--mbs-surface);
  color: var(--mbs-text);
  box-shadow: var(--mbs-shadow);
}
:where(.mbs-modal__title) { margin: 0 0 var(--mbs-gap); }
:where(.mbs-modal__note) { color: var(--mbs-muted); font-size: var(--mbs-font-size-small); }

/* the support chrome */
:where(.mbs-support__code-box) { margin: 1rem 0; text-align: center; }
:where(.mbs-support__code-label) { color: var(--mbs-muted); font-size: var(--mbs-font-size-small); }
:where(.mbs-support__code) { font-size: 2em; letter-spacing: 0.15em; font-weight: 600; }
:where(.mbs-support__dot) {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--mbs-muted);
}
:where(.mbs-support__status.is-connected .mbs-support__dot) { background: var(--mbs-accent); }
:where(.mbs-support-banner) {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--mbs-z-banner);
  display: none;
  align-items: center;
  gap: var(--mbs-gap);
  padding: 0.6rem 1rem;
  background: var(--mbs-text);
  color: var(--mbs-surface);
}
:where(.mbs-support-banner.is-visible) { display: flex; }
:where(.mbs-support-banner__text) { flex: 1; }
:where(.support-toast) {
  position: fixed;
  left: 50%;
  bottom: 4rem;
  z-index: var(--mbs-z-banner);
  transform: translateX(-50%);
  padding: 0.6rem 1rem;
  border-radius: var(--mbs-radius);
  background: var(--mbs-text);
  color: var(--mbs-surface);
  opacity: 0;
  transition: opacity 0.2s;
}
:where(.support-toast.is-visible) { opacity: 1; }
@media (prefers-reduced-motion: reduce) { :where(.support-toast) { transition: none; } }

/* the displays (piece 2): structure and the --mbs-* look, nothing a theme cannot override */
:where(.mbs-price__current) { text-decoration: none; font-weight: 600; }
:where(.mbs-price__compare) { color: var(--mbs-muted); margin-left: 0.4em; }
:where(.mbs-price__from) { color: var(--mbs-muted); font-size: var(--mbs-font-size-small); }
:where(.mbs-price__as-low-as, .mbs-price__label) { display: block; color: var(--mbs-accent); font-size: var(--mbs-font-size-small); }
:where(.mbs-level-note) { display: block; color: var(--mbs-accent); font-size: var(--mbs-font-size-small); font-weight: 600; }
:where(.mbs-price__label) { color: var(--mbs-muted); }
:where(.mbs-stock--low) { color: var(--mbs-accent); }
:where(.mbs-stock--sold_out, .mbs-stock--unavailable) { color: var(--mbs-muted); }
:where(.mbs-qb) { margin: var(--mbs-gap) 0; }
:where(.mbs-qb__rows) { list-style: none; margin: 0; padding: 0; }
:where(.mbs-qb__row) { padding: 0.25em 0; border-bottom: 1px solid var(--mbs-border); }
:where(.mbs-qb--compact .mbs-qb__row) { padding: 0.1em 0; font-size: var(--mbs-font-size-small); }
:where(.mbs-qb__your-price) { margin: var(--mbs-gap) 0 0; font-weight: 600; }
:where(.mbs-qty) { display: inline-flex; align-items: center; gap: 0.25em; }
:where(.mbs-qty__input) { width: 4.5em; text-align: center; }
:where(.mbs-qty__step) { min-width: 2.2em; min-height: 2.2em; border: 1px solid var(--mbs-border); border-radius: var(--mbs-radius); background: var(--mbs-surface); cursor: pointer; }
:where(.mbs-qty__case-note, .mbs-qty__words) { color: var(--mbs-muted); font-size: var(--mbs-font-size-small); }
:where(.mbs-line__special, .mbs-line__tag, .mbs-line__nudge) { display: block; font-size: var(--mbs-font-size-small); }
:where(.mbs-line__tag) { color: var(--mbs-muted); }
:where(.mbs-line__nudge, .mbs-cart-nudge) { color: var(--mbs-accent); }
:where(.mbs-line__remove) { border: 0; background: none; font-size: 1.2em; cursor: pointer; color: var(--mbs-muted); }
