.maettig-tafel-gallery[data-enhanced] { display: block; margin: 0; overflow-anchor: none; }
.maettig-tafel-gallery .maettig-gallery-stage { display: grid; touch-action: pan-y; border-radius: 12px; }
.maettig-tafel-gallery .maettig-gallery-stage > figure.wp-block-image {
  grid-area: 1 / 1; width: 100%; margin: 0; display: none; align-self: start;
}
.maettig-tafel-gallery .maettig-gallery-stage > figure.is-current { display: block; }
.maettig-tafel-gallery .maettig-gallery-stage > figure.wp-block-image figcaption {
  box-sizing: border-box; min-height: calc(1lh + 24px);
}
.maettig-tafel-gallery .maettig-gallery-stage > figure.wp-block-image:not(:has(figcaption))::after {
  font-size: var(--global-font-size-small, 16px);
  height: calc(1lh + 24px); min-height: calc(1lh + 24px);
}
.maettig-tafel-gallery .maettig-gallery-stage > figure.wp-block-image img {
  width: 100% !important; height: auto !important; aspect-ratio: 4 / 3;
  object-fit: contain; background: #fff;
}
.maettig-tafel-gallery .maettig-gallery-controls {
  display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 16px;
}
.maettig-tafel-gallery .maettig-gallery-controls button {
  position: relative; display: grid; place-items: center; box-sizing: border-box;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0;
  border: 0; border-radius: 8px; color: #006ab2; background: transparent;
  font-size: 15px; line-height: 1; box-shadow: none; transition: none;
}
.maettig-tafel-gallery .maettig-gallery-controls button::before {
  content: ""; position: absolute; width: 28px; height: 28px; box-sizing: border-box;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  border: 1px dashed #006ab2; border-radius: 8px; background: #fff;
}
.maettig-tafel-gallery .maettig-gallery-controls button > span {
  position: relative; display: grid; place-items: center; width: 28px; height: 28px;
  font-family: Arial, sans-serif; font-size: 15px; line-height: 1;
}
.maettig-tafel-gallery .maettig-gallery-controls button:hover { color: #006ab2; background: transparent; }
.maettig-tafel-gallery .maettig-gallery-controls button:not(:disabled):hover::before { border-style: solid; }
.maettig-tafel-gallery .maettig-gallery-controls button:disabled { opacity: .35; cursor: default; }
.maettig-tafel-gallery .maettig-gallery-controls [role=status] {
  color: #006ab2; min-width: 2.8em; text-align: center; font-size: 15px; line-height: 1;
}
.maettig-tafel-gallery .maettig-gallery-thumbnails {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 16px;
}
.maettig-tafel-gallery .maettig-gallery-thumbnails button {
  padding: 3px; border: 2px solid transparent; border-radius: 8px; background: #fff; min-width: 0; min-height: 44px;
}
.maettig-tafel-gallery .maettig-gallery-thumbnails button[aria-pressed=true] { border-color: #c6a158; }
.maettig-tafel-gallery .maettig-gallery-thumbnails img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 4px;
}
.maettig-tafel-gallery :is(button, .maettig-gallery-stage):focus-visible { outline: 3px solid #006ab2; outline-offset: 3px; }
@media (max-width: 600px) {
  .maettig-tafel-gallery .maettig-gallery-thumbnails { gap: 4px; }
  .maettig-tafel-gallery .maettig-gallery-stage figcaption { padding: 12px 16px; }
}
