/* Match only the RO case and the new media panel, not the other Food projects. */
.vs-food-page .vs-food-case[aria-labelledby="vs-food-ro"] { align-items: start; }
.vs-food-page .vsfg-panel {
  container: vsfg / inline-size;
  box-sizing: border-box; min-width: 0; padding: clamp(14px, 2vw, 22px);
  background: #f5f8fc; border: 1px solid #dce4ed; border-radius: 8px;
}
.vs-food-page .vsfg-panel .vsfg-title {
  margin: 0 0 12px; padding: 0; color: #173e61; font-size: 17px; font-weight: 600;
}
.vs-food-page .vsfg-tiles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 14px);
}
.vs-food-page .vsfg-tiles figure { min-width: 0; margin: 0; }
.vs-food-page .vsfg-tiles figure:first-child { grid-column: 1 / -1; }
.vs-food-page .vsfg-preview {
  position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 2;
  background: #fff; border: 1px solid #d5dfe8; border-radius: 5px; cursor: zoom-in;
}
.vs-food-page .vsfg-tiles figure:first-child .vsfg-preview { aspect-ratio: 16 / 9; }
/* Once the panel itself is wide enough, all three views fit on one line. */
@container vsfg (min-width: 576px) {
  .vs-food-page .vsfg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vs-food-page .vsfg-tiles figure:first-child { grid-column: auto; }
  .vs-food-page .vsfg-preview { aspect-ratio: 16 / 9; }
}
.vs-food-page .vsfg-preview img.vs-food-image {
  display: block; width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: cover;
  position: absolute; inset: 0;
}
.vs-food-page .vsfg-preview::after {
  content: ""; position: absolute; right: 7px; bottom: 7px; width: 23px; height: 23px; border-radius: 50%;
  background: linear-gradient(white, white) center / 11px 2px no-repeat,
              linear-gradient(white, white) center / 2px 11px no-repeat, #174667;
}
.vs-food-page .vsfg-tiles figcaption { margin-top: 5px; color: #33485a; line-height: 1.35; }
.vs-food-page .vsfg-panel a:focus-visible, .vsfg-dialog button:focus-visible { outline: 3px solid #056bb3; outline-offset: 3px; }
/* Compatibility for old bookmarks, not used by the gallery controls. */
.vs-food-page #vs-food-ro-front { scroll-margin-top: calc(150px + var(--wp-admin--admin-bar--height, 0px)); }
.vsfg-dialog {
  box-sizing: border-box; width: min(92vw, 920px); max-width: 96vw;
  max-height: 92vh; max-height: 92dvh; position: fixed; inset: 0; margin: auto;
  padding: clamp(12px, 2vw, 22px); background: #fff; color: #173e61;
  border: 0; border-radius: 8px; box-shadow: 0 12px 45px #0004; overflow: auto; overscroll-behavior: contain;
}
.vsfg-dialog:not([open]) { display: none; }
html:has(.vsfg-dialog) { scrollbar-gutter: stable; }
html:has(.vsfg-dialog[open]) { overflow: hidden; }
.vsfg-dialog::backdrop { background: rgb(15 27 42 / 78%); }
.vsfg-dialog .vsfg-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.vsfg-dialog .vsfg-label { font-size: clamp(16px, 2vw, 20px); font-weight: 600; line-height: 1.25; }
.vsfg-dialog button {
  flex: none; font: inherit; min-height: 44px; padding: 5px 14px;
  color: #173e61; background: #fff; border: 1px solid #a9bac6; border-radius: 5px; cursor: pointer;
}
.vsfg-dialog img { display: block; width: auto; height: auto; max-width: 100%; max-height: 66vh; max-height: 66dvh; object-fit: contain; margin: 0 auto; }
