/* ==========================================================================
   BKG YouTube DSGVO – Styles
   Einmal global im Theme einbinden.
   ========================================================================== */

.bkg-yt-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: #1a1a2e;
  overflow: hidden;
  cursor: default;
}

/* ---- CSS-Fallback: Text wenn Wrap leer (JS nicht geladen / kein Consent) ---- */
.bkg-yt-wrap[data-video-id]:not([data-yt-facade]):not([data-yt-loaded])::after {
  content: 'Dieses Video kann erst nach Zustimmung zu Marketing-Cookies angezeigt werden.';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #e2e8f0;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  max-width: 420px;
  padding: 24px;
}

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

/* ---- Facade: Thumbnail ---- */
.bkg-yt-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Facade: Play-Button ---- */
.bkg-yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bkg-yt-play:hover {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 0.9;
}

.bkg-yt-play:focus-visible {
  outline: 3px solid rgba(51, 85, 159, 0.5);
  outline-offset: 4px;
  border-radius: 4px;
}

.bkg-yt-play:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.bkg-yt-play svg {
  display: block;
  width: 68px;
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* Gesamter Wrap als Klickflaeche mit Hover-Effekt */
.bkg-yt-wrap[data-yt-facade] {
  cursor: pointer;
}

.bkg-yt-wrap[data-yt-facade]:hover .bkg-yt-thumb {
  filter: brightness(0.85);
  transition: filter 0.25s ease;
}

/* ---- Hinweis bei fehlendem Consent ---- */
.bkg-yt-notice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #e2e8f0;
  font-size: 15px;
  line-height: 1.6;
  max-width: 100%;
  gap: 16px;
}

.bkg-yt-notice-icon svg {
  width: 48px;
  height: 48px;
  opacity: 0.6;
}

.bkg-yt-notice-text {
  max-width: 420px;
}

.bkg-yt-notice-btn {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.bkg-yt-notice-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.bkg-yt-notice-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.4);
  outline-offset: 3px;
}

.bkg-yt-notice-btn:active {
  background: rgba(255, 255, 255, 0.08);
}
