/*!
 * WP-ImmoMakler gallery — image-element normalisation (shared base).
 *
 * Loaded as a dependency of every gallery preset stylesheet (see
 * HookInitializer::register_available_styles_scripts). Its sole job is to keep
 * the gallery layout intact when a third-party image-optimization plugin
 * (WebP/AVIF converters such as Converter for Media, ShortPixel, Optimole,
 * EWWW, ...) rewrites our markup.
 *
 * Our presets render a single `<img class="immomakler-gallery__image">` per
 * slide (via wp_get_attachment_image()) and size THAT element to fill its
 * slide. Optimizers commonly wrap the `<img>` in a `<picture>` that offers a
 * WebP/AVIF `<source>`, and many of them MOVE the class onto the `<picture>`,
 * leaving the inner `<img>` bare:
 *
 *   <picture class="immomakler-gallery__image">
 *     <source type="image/webp" srcset="...">
 *     <img src="..." width="100" height="75">   <-- no class, no sizing
 *   </picture>
 *
 * A `<picture>` is a non-replaced inline box: width/height/object-fit neither
 * size it nor reach its child, so the bare `<img>` falls back to its native
 * attribute size — thumbnails shrink away from their slide and main images
 * stop covering. (Confirmed on leonhard-immobilien.de: an optimizer-wrapped
 * horizontal-thumbs gallery rendered its <img> at native 100x75 / inline /
 * object-fit: fill inside a 147x110 slide, while an un-wrapped gallery on the
 * same site rendered correctly at 147x110 / object-fit: cover — the optimizer
 * only wraps some galleries, so the breakage is intermittent per property.)
 *
 * Fix: treat any `<picture>` inside a gallery as a transparent, box-filling
 * wrapper and let its inner `<img>` cover — independent of where the optimizer
 * left the class. The preset rules keep sizing .immomakler-gallery__image
 * (which, with the class on the `<picture>`, IS that `<picture>`); this base
 * file only adds the missing `display: block` (so the preset's height: 100%
 * applies to the now-block `<picture>`) and propagates the fill + cover to the
 * real `<img>`. `object-fit: cover` matches every preset — all gallery image
 * areas crop with cover. Galleries only ever contain image `<picture>`
 * elements, so the broad `.immomakler-gallery picture` scope is safe;
 * lightgallery's lightbox overlay is appended to `<body>`, outside this scope.
 */
.immomakler-gallery picture{display:block;width:100%;height:100%}.immomakler-gallery picture>img{display:block;width:100%;height:100%;object-fit:cover}