/* ==========================================================================
   Gemeinsame Bausteine für Foto-Stream und Slideshow:
   Hintergrund, Foto-Rahmen mit Glow, Einblenden der Fotos, Hinweis "Noch keine Fotos".
   ========================================================================== */

html, body {
  margin: 0;
  padding: 0;
}
html { background-color: #1e1e1e; }

.frame {
  position: relative;
  display: block;
  line-height: 0;
}

/* Fallback-Schatten (bis der geditherte Glow berechnet ist / ohne JS) –
   entspricht den Werten des Canvas-Glows (js/glow.js) */
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  box-shadow: 0 0 200px 0 rgba(255, 255, 255, 0.10);
}
.frame.has-glow::before { display: none; }

/* Gedithertes Glow-Canvas (weicher Verlauf ohne Stufen) */
.frame canvas.glow {
  position: absolute;
  z-index: -1;
  max-width: none;
  pointer-events: none;
  mix-blend-mode: lighten;     /* überlappende Glows addieren sich nicht */
  image-rendering: pixelated;
}

/* Fotos blenden weich ein, sobald sie geladen sind (statt aufzupoppen) */
.frame img {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.frame img.is-loaded { opacity: 1; }

.empty {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font: 300 18px/1.5 system-ui, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .frame img { transition: none; }
}
