/* v1.22.0 — Category pictures in retailer menus, delivery menus and brand catalogs. */
.mp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  margin-left: auto;
}
.mp-toggle > span {
  font: 650 10.5px/1 "DM Sans", sans-serif;
  color: var(--muted);
  padding: 0 6px 0 8px;
}
.mp-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 5px 10px;
  font: 650 11px/1 "DM Sans", sans-serif;
  color: var(--ink);
  cursor: pointer;
}
.mp-toggle button[aria-pressed="true"] {
  background: var(--brand, var(--forest));
  color: var(--paper, #fff);
}
.rp-page .menu-tools { flex-wrap: wrap; gap: 8px; }
.bc-filters { flex-wrap: wrap; }

/* shared picture + "all" glyph */
.mp-btn .mp-pic,
.mp-btn .mp-all {
  flex: none;
  display: block;
  object-fit: cover;
  background: var(--soft, #eef0e6);
}
.mp-btn .mp-all svg { fill: currentColor; opacity: .55; }
.mp-btn .mp-all { display: grid; place-items: center; color: var(--brand, var(--forest)); }

/* Pictures mode: main category row becomes picture tiles */
body[data-menupics="tiles"] .mp-menu .category-pills,
body[data-menupics="tiles"] .mp-menu .bc-filter-row:first-child .bc-filter-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 8px;
  scrollbar-width: thin;
  align-items: stretch;
}
body[data-menupics="tiles"] .mp-menu button.mp-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 104px;
  min-width: 104px;
  padding: 6px 6px 9px;
  border-radius: 14px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  font-size: 11.5px;
}
body[data-menupics="tiles"] .mp-menu button.mp-tile .mp-pic,
body[data-menupics="tiles"] .mp-menu button.mp-tile .mp-all {
  width: 90px;
  height: 90px;
  border-radius: 10px;
}
body[data-menupics="tiles"] .mp-menu button.mp-tile .mp-all { padding: 24px; box-sizing: border-box; }
body[data-menupics="tiles"] .mp-menu button.mp-tile[aria-pressed="true"] .mp-pic {
  box-shadow: 0 0 0 2px var(--paper, #fff);
}

/* Subcategory and third-level rows: picture chips */
body[data-menupics="tiles"] .mp-menu button.mp-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px 3px 3px;
  border-radius: 999px;
}
body[data-menupics="tiles"] .mp-menu button.mp-chip .mp-pic,
body[data-menupics="tiles"] .mp-menu button.mp-chip .mp-all {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
body[data-menupics="tiles"] .mp-menu button.mp-chip .mp-all { padding: 8px; box-sizing: border-box; }

/* Icons mode: every pill gets a small round picture */
body[data-menupics="icons"] .mp-menu button.mp-tile,
body[data-menupics="icons"] .mp-menu button.mp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 3px;
}
body[data-menupics="icons"] .mp-menu button.mp-tile .mp-pic,
body[data-menupics="icons"] .mp-menu button.mp-tile .mp-all,
body[data-menupics="icons"] .mp-menu button.mp-chip .mp-pic,
body[data-menupics="icons"] .mp-menu button.mp-chip .mp-all {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
body[data-menupics="icons"] .mp-menu .mp-all { padding: 5px; box-sizing: border-box; }

/* Side navigation: small square thumbnails (pictures and icons modes) */
.mp-menu button.mp-side .mp-pic,
.mp-menu button.mp-side .mp-all {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.mp-menu button.mp-side .mp-all { padding: 7px; box-sizing: border-box; }
body:not([data-menupics="text"]) .rp-page .side-nav button.mp-side,
body:not([data-menupics="text"]) .bc-side button.mp-side {
  display: flex;
  align-items: center;
  gap: 9px;
}
body:not([data-menupics="text"]) .rp-page .side-nav button.mp-side > span { flex: 1; }
body:not([data-menupics="text"]) .bc-side button.mp-side > .bc-name { flex: 1; }
body:not([data-menupics="text"]) .bc-side-sub button.mp-side .mp-pic { width: 22px; height: 22px; border-radius: 6px; }
body:not([data-menupics="text"]) .rp-page .side-subs button.mp-side .mp-pic { width: 22px; height: 22px; border-radius: 6px; }

/* Group headings in the featured menu */
h3.mp-head { display: inline-flex; align-items: center; gap: 10px; }
h3.mp-head .mp-pic { width: 34px; height: 34px; border-radius: 9px; }
body[data-menupics="icons"] h3.mp-head .mp-pic { width: 26px; height: 26px; border-radius: 50%; }

@media (max-width: 700px) {
  body[data-menupics="tiles"] .mp-menu button.mp-tile { width: 88px; min-width: 88px; font-size: 11px; }
  body[data-menupics="tiles"] .mp-menu button.mp-tile .mp-pic,
  body[data-menupics="tiles"] .mp-menu button.mp-tile .mp-all { width: 74px; height: 74px; }
  .mp-toggle { margin-left: 0; }
}
