/* image-trail runtime — full-bleed pointer photo trail hero.
   Alles gescoped unter .ms-image-trail (kein globales CSS, keine festen IDs).
   Das Content-Window-Panel (.hud*) stammt aus _shared/hero-chrome.css —
   der Preview-Host und die Demo binden es selbst ein (BB-Adapter enqueuet
   es als geteiltes Asset), damit file:// und Builder-Kontexte funktionieren.
   Die .content__img*-Klassen sind der DOM-Vertrag der ImageTrail-Klassen
   (React-Bits, oben in runtime.js inline) und bewusst unveraendert. */

.ms-image-trail {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  touch-action: none;
  cursor: auto;
}

/* The photo sits behind the trail (type Image), Overlay dazwischen. */
.ms-image-trail .msit-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.ms-image-trail .msit-photo.is-on { opacity: 1; }

.ms-image-trail .msit-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--msit-overlay-color, transparent);
  opacity: var(--msit-overlay-opacity, 0.4);
  pointer-events: none;
}

.ms-image-trail .msit-host {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ms-image-trail .content__img {
  width: var(--msit-w, 190px);
  height: var(--msit-h, 173px);
  max-width: min(42vw, 100%);
  max-height: min(36vh, 100%);
  border-radius: 15px;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  overflow: hidden;
  will-change: transform, filter;
  pointer-events: none;
}

.ms-image-trail .content__img-inner {
  background-position: 50% 50%;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  background-size: cover;
  position: absolute;
  top: -10px;
  left: -10px;
}

@media (prefers-reduced-motion: reduce) {
  .ms-image-trail .msit-photo { transition: none; }
}
