/* ==========================================================================
   Peacode Consent Video – Clean CSS
   - YouTube-only, DSGVO-Consent Overlay
   - Aspect Ratios: 16:9, 9:16, 4:3, 1:1
   - Play-Button mit SVG-Icon (kein Pseudo-Element-Overlay)
   ========================================================================== */

/* ---- Modulcontainer ---- */
.pc-consent-video {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #111;
  color: #fff;
  border-radius: 12px;
}

/* ---- Aspect Ratio Varianten ---- */
.pcv-ratio-16x9 { aspect-ratio: 16 / 9; }
.pcv-ratio-9x16 { aspect-ratio: 9 / 16; }
.pcv-ratio-4x3  { aspect-ratio: 4 / 3; }
.pcv-ratio-1x1  { aspect-ratio: 1 / 1; }

/* ---- Stage (Inhaltsebene) ---- */
.pcv-stage,
.pcv-iframe-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

/* ---- Posterbild (optional) ---- */
.pcv-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
}

/* ---- Consent-Overlay (zentriert, klickbar) ---- */
.pcv-consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 18px 20px;
  text-align: center;

  /* dezentes Dimmen, damit der Button präsent ist */
  background: rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pcv-text {
  margin: 0;
  max-width: min(680px, 92%);
  font-size: 14px;
  line-height: 1.45;
  color: #f2f2f2;
}
.pcv-text a { color: #aad2ff; text-decoration: underline; }

/* ---- Play-Button mit SVG-Icon ---- */
.pcv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;

  padding: 12px 20px;
  border: 0;
  border-radius: 999px;

  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;

  color: #fff;
  background: var(--pcv-btn-color, #ff0000);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);

  cursor: pointer;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}

.pcv-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor; /* nimmt Button-Textfarbe */
  flex: 0 0 auto;
}

.pcv-btn:hover {
  background: color-mix(in srgb, var(--pcv-btn-color, #ff0000) 90%, white);
  transform: translateY(-1px);
}
.pcv-btn:active {
  transform: translateY(0);
  opacity: .95;
}

/* Tastaturfokus zugänglich halten */
.pcv-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---- Iframe-Fit ---- */
.pcv-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---- Wenn Video läuft (iframe eingebettet), Overlay ausblenden ---- */
.pc-consent-video.playing .pcv-consent {
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s step-end;
}

/* ---- Reduzierte Bewegung respektieren ---- */
@media (prefers-reduced-motion: reduce) {
  .pcv-btn,
  .pcv-consent,
  .pcv-poster {
    transition: none !important;
  }
}
