/* ==========================================================================
   transformis® · Video-Slider
   --------------------------------------------------------------------------
   Nutzt tm-slider Basis (Pfeile, Dots, Track, JS).
   Eigene Styles nur für Video-Karten und Lightbox.
   ========================================================================== */

/* ── Stage: breiter als Viewport für Pfeil-Platz ── */
.tm-video-slider .tm-slider__stage {
  width: calc(1.5 * var(--_card-w) + 0.5 * var(--_gap)) !important;
  height: auto !important;
  overflow: visible !important;
}

.tm-video-slider .tm-slider__viewport {
  height: auto !important;
  overflow: hidden !important;
}

/* ── Video-Karte ── */
.tm-video-slider .tm-slider__card {
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.15) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  height: auto !important;
}

/* ── Thumbnail-Wrapper: 16:9, Bild füllt komplett ── */
.tm-video-slider__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

.tm-video-slider__thumb img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.tm-video-slider__poster-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--tm-blue, #05132C);
}

/* ── Play-Button ── */
.tm-video-slider__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
  padding: 0 0 0 4px;
}

.tm-video-slider__play:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%) scale(1.08);
}

.tm-video-slider__play svg {
  width: 24px;
  height: 28px;
}

/* ── Text-Overlay: ausgeblendet (Thumbnail deckt alles ab) ── */
.tm-video-slider__overlay {
  display: none !important;
}


/* ==========================================================================
   Lightbox
   ========================================================================== */

.tm-video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tm-video-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.tm-video-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.tm-video-lightbox__content {
  position: relative;
  width: 90vw;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  z-index: 1;
}

.tm-video-lightbox__player {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.tm-video-lightbox__player video,
.tm-video-lightbox__player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.tm-video-lightbox__close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.tm-video-lightbox__close:hover {
  opacity: 1;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1300px) {
  .tm-video-slider {
    --tm-slider-card-w: 480px !important;
  }
}

@media (max-width: 1100px) {
  .tm-video-slider {
    --tm-slider-card-w: 420px !important;
  }
}

@media (max-width: 960px) {
  .tm-video-slider {
    --tm-slider-card-w: min(380px, 70vw) !important;
  }
  .tm-video-slider .tm-slider__stage {
    width: calc(1.3 * var(--_card-w) + 0.3 * var(--_gap)) !important;
  }
}

@media (max-width: 699px) {
  .tm-video-slider {
    --tm-slider-card-w: calc(100vw - 48px) !important;
  }
  .tm-video-slider .tm-slider__stage {
    width: var(--_card-w) !important;
  }

  /* Pfeile auf Mobil anzeigen für Video-Slider */
  .tm-video-slider .tm-slider__arrow {
    display: grid !important;
    width: 40px;
    height: 40px;
  }
  .tm-video-slider .tm-slider__arrow--prev {
    left: -12px;
  }
  .tm-video-slider .tm-slider__arrow--next {
    right: -12px;
  }
  .tm-video-slider .tm-slider__arrow svg {
    width: 12px;
    height: 14px;
  }

  .tm-video-slider__play {
    width: 56px;
    height: 56px;
  }

  .tm-video-slider__play svg {
    width: 18px;
    height: 22px;
  }

  .tm-video-lightbox__close {
    top: -40px;
    font-size: 28px;
  }
}
