/* ===================================================
   STAPES GmbH — Produkt-Videos: Frontend-Styles
   =================================================== */

/* .images-container als Positionierungskontext für .scroll-box-arrows */
.images-container {
  position: relative;
}

/* Abschnitts-Label über den Video-Thumbnails */
.stapesvideos-section-label {
  display: block !important;
  margin: 14px 0 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #333;
  line-height: 1;
}

/* Video-Thumbnail-Reihe */
.stapesvideos-thumb-row {
  margin-top: 4px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.stapesvideos-list {
  display: inline-block;
  white-space: nowrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Einzelnes Video-Thumbnail — gleiche Grösse wie Bild-Thumbs */
.stapesvideos-item {
  display: inline-block !important;
  width: 80px;
  vertical-align: top;
  margin-right: 13px; /* passt zu .images-container margin-right: .8125rem */
  cursor: pointer;
}

.stapesvideos-item:hover .stapesvideos-video-thumb,
.stapesvideos-item.selected .stapesvideos-video-thumb {
  border: #24b9d7 3px solid; /* Theme-Akzentfarbe */
}

.stapesvideos-video-thumb {
  width: 80px;
  height: 56px; /* 16:9-ähnliches Verhältnis */
  overflow: hidden;
  border-radius: 1px;
  border: 3px solid transparent;
  box-sizing: border-box;
  position: relative;
  cursor: pointer;
  display: block;
  margin-bottom: 10px;
}

.stapesvideos-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stapesvideos-no-thumb {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
}

/* Play-Button-Overlay */
.stapesvideos-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.stapesvideos-item:hover .stapesvideos-play-btn svg circle {
  fill: rgba(0, 0, 0, 0.75);
}

/* ===================================================
   Video-Modal
   =================================================== */
#stapesvideos-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stapesvideos-modal[hidden] {
  display: none !important;
}

.stapesvideos-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.stapesvideos-dialog {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: 920px;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.85);
}

.stapesvideos-close {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 2;
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  transition: color 0.15s;
}

.stapesvideos-close:focus {
  outline: none;
  box-shadow: none;
}

.stapesvideos-close:hover {
  color: #ddd;
}

.stapesvideos-modal-title {
  padding: 10px 44px 10px 14px;
  color: #eee;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stapesvideos-modal-title:empty {
  display: none;
}

/* 16:9-Iframe-Container */
.stapesvideos-iframe-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.stapesvideos-iframe-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
