/* Offline-Ersatz fuer die CM4all-Fotowidgets (Galerie, Raster, Slideshow) */
.cm-widget_photoalbum,
.cm-widget_photoslideshow { opacity: 1 !important; }

.cm-w_pha-more { display: none !important; }

/* Galerie + Raster */
.cm-w_pha-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 1em 0;
}
.cm-w_pha-item { margin: 0; cursor: zoom-in; min-width: 0; }
.cm-w_pha-uro-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8e8e8;
  border-radius: 4px;
}
.cm-w_pha-uro-item picture,
.cm-w_pha-uro-item img { display: block; width: 100%; height: 100%; }
.cm-w_pha-uro-item img { object-fit: cover; transition: transform .25s ease; }
.cm-w_pha-item:hover .cm-w_pha-uro-item img { transform: scale(1.04); }
.cm-w_pha-title { font-size: .85em; line-height: 1.3; margin-top: 4px; overflow-wrap: anywhere; }

/* Slideshow */
.cm-widget_photoslideshow { position: relative; margin: 1em 0; }
.cm-widget_photoslideshow > ul { list-style: none; margin: 0; padding: 0; position: relative; }
.cm-widget_photoslideshow > ul > li { display: none; margin: 0; padding: 0; cursor: zoom-in; }
.cm-widget_photoslideshow > ul > li.ofl-active { display: block; }
.cm-w_phs-uro-item { background: #111; border-radius: 4px; overflow: hidden; }
.cm-w_phs-uro-item picture,
.cm-w_phs-uro-item img { display: block; width: 100%; }
.cm-w_phs-uro-item img { height: min(70vh, 640px); object-fit: contain; }
.cm-w_phs-prev, .cm-w_phs-next, .cm-w_phs-lbTrigger,
.cm-w_phs-swipe-r, .cm-w_phs-swipe-l { display: none !important; }
.ofl-ss-cap { text-align: center; margin-top: 6px; }
.ofl-ss-btn {
  position: absolute; top: calc(min(70vh, 640px) / 2); transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 26px; line-height: 44px;
  cursor: pointer; z-index: 2; padding: 0;
}
.ofl-ss-btn:hover, .ofl-ss-btn:focus-visible { background: rgba(0,0,0,.8); }
.ofl-ss-prev { left: 8px; }
.ofl-ss-next { right: 8px; }
.ofl-ss-count { text-align: center; font-size: .85em; opacity: .75; }

/* Lightbox */
.ofl-lb {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  touch-action: none; overscroll-behavior: contain;
}
.ofl-lb[hidden] { display: none; }
.ofl-lb-img { max-width: 94vw; max-height: 84vh; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.ofl-lb-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 60px;
  color: #eee; text-align: center; font: 15px/1.4 system-ui, sans-serif;
}
.ofl-lb-btn {
  position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff;
  width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 48px;
  cursor: pointer; padding: 0;
}
.ofl-lb-btn:hover, .ofl-lb-btn:focus-visible { background: rgba(255,255,255,.28); }
.ofl-lb-close { top: 12px; right: 12px; }
.ofl-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.ofl-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.ofl-lb-count { position: absolute; top: 22px; left: 20px; color: #ccc; font: 14px system-ui, sans-serif; }
body.ofl-lb-open { overflow: hidden; }
