/* Baymard-konformer Video-Einstieg auf der PDP.
 * Querformatvideos bleiben normale Galerie-Slides. Alle Hochformatvideos
 * teilen sich genau eine Galerie-Kachel und werden erst im Viewer einzeln.
 */

#product-offer #gallery .kh-shorts-gallery-slide .inner {
  overflow: hidden;
  border-radius: 14px;
  background: #eaf5fb;
}

.kh-shorts-gallery-launch {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #fff;
  text-align: left;
  cursor: pointer;
  background-color: #081f2b;
  background-position: center 44%;
  background-repeat: no-repeat;
  background-size: cover;
}

.kh-shorts-gallery-launch::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 31, 43, .16) 0%, rgba(8, 31, 43, .04) 42%, rgba(8, 31, 43, .82) 100%);
}

.kh-shorts-gallery-launch__badge {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(8, 31, 43, .72);
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(7px);
}

.kh-shorts-gallery-launch__play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  background: rgba(8, 31, 43, .55);
  box-shadow: 0 8px 24px rgba(8, 31, 43, .3);
  transform: translate(-50%, -50%);
  transition: background-color .16s ease, transform .16s ease;
  backdrop-filter: blur(5px);
}

.kh-shorts-gallery-launch__play svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.kh-shorts-gallery-launch:hover .kh-shorts-gallery-launch__play,
.kh-shorts-gallery-launch:focus-visible .kh-shorts-gallery-launch__play {
  background: var(--brand-primary, #017ec7);
  transform: translate(-50%, -50%) scale(1.06);
}

.kh-shorts-gallery-launch:focus-visible {
  outline: 3px solid var(--brand-primary, #017ec7);
  outline-offset: -3px;
}

.kh-shorts-gallery-launch__copy {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}

.kh-shorts-gallery-launch__copy strong {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.15;
}

.kh-shorts-gallery-launch__copy small {
  font-size: 14px;
  font-weight: 600;
}

/* Kompakte Vorschau im JTL-Thumbnail-Strip: Poster, Play und Anzahl. */
#product-offer #gallery_preview .kh-shorts-gallery-thumb .inner {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

#product-offer #gallery_preview .kh-shorts-gallery-thumb .rt-gallery-thumb-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.kh-shorts-gallery-thumb__count {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: rgba(8, 31, 43, .78);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.kh-shorts-gallery-thumb:focus-visible .inner {
  outline: 3px solid var(--brand-primary, #017ec7);
  outline-offset: -3px;
}

/* Orientierung im Vollbild-Viewer bei zwei bis zehn Shorts. */
.kh-sv__count {
  position: absolute;
  z-index: 6;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  min-width: 52px;
  padding: 7px 11px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(8, 31, 43, .58);
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(7px);
}

.kh-sv__playlist {
  display: none;
}

@media (min-width: 992px) {
  .kh-sv__playlist {
    position: absolute;
    z-index: 5;
    top: 72px;
    right: 22px;
    bottom: 150px;
    display: flex;
    width: 76px;
    flex-direction: column;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 3px;
    scrollbar-width: thin;
  }

  .kh-sv__playlist-item {
    position: relative;
    flex: 0 0 104px;
    width: 68px;
    height: 104px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #081f2b;
    cursor: pointer;
    opacity: .68;
    transition: border-color .15s ease, opacity .15s ease, transform .15s ease;
  }

  .kh-sv__playlist-item:hover,
  .kh-sv__playlist-item:focus-visible,
  .kh-sv__playlist-item.is-active {
    border-color: #fff;
    opacity: 1;
    transform: translateX(-2px);
  }

  .kh-sv__playlist-poster {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .kh-sv__playlist-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 58%, rgba(8, 31, 43, .76));
  }

  .kh-sv__playlist-number {
    position: absolute;
    z-index: 2;
    right: 7px;
    bottom: 5px;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    font-weight: 800;
  }
}

@media (max-width: 767px) {
  .kh-shorts-gallery-launch__badge {
    top: 14px;
    left: 14px;
  }

  .kh-shorts-gallery-launch__play {
    width: 60px;
    height: 60px;
  }

  .kh-shorts-gallery-launch__copy {
    right: 16px;
    bottom: 16px;
    left: 16px;
  }

  .kh-shorts-gallery-launch__copy small {
    font-size: 13px;
  }
}
