/* ==========================================================================
   Nachklang — Erklärvideo-Widget (wiederverwendbar: Checkout, Einrichtung, App)
   Bubble unten rechts → Klick öffnet Player-Karte (Desktop) / Bottom-Sheet (mobil).
   ========================================================================== */

/* ---------- Bubble (Thumbnail, fliegt nach ~1 s ein) ---------- */
.vw-bubble {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 60;
  width: 120px;
  height: 120px;
  padding: 0;
  border: 3px solid var(--color-white, #fff);
  border-radius: 50%;
  background-color: #12473a;
  box-shadow: 0 6px 24px rgba(4, 42, 33, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px) scale(0.7);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vw-bubble.is-da {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: vw-puls 2.4s ease-in-out 0.6s 3;
}

@keyframes vw-puls {
  0%, 100% { box-shadow: 0 6px 24px rgba(4, 42, 33, 0.35); }
  50% { box-shadow: 0 6px 24px rgba(4, 42, 33, 0.35), 0 0 0 10px rgba(18, 71, 58, 0.18); }
}

.vw-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.vw-bubble .vw-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  color: #12473a;
  font-size: 15px;
  line-height: 36px;
  text-align: center;
  pointer-events: none;
}

.vw-bubble .vw-zu {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.vw-bubble .vw-zu:hover { background-color: rgba(0, 0, 0, 0.85); }

/* ---------- Dauerhafter Mini-Button (nach Wegklicken) ---------- */
.vw-mini {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 60;
  border: 1px solid rgba(4, 42, 33, 0.15);
  border-radius: 999px;
  padding: 9px 14px;
  background-color: var(--color-white, #fff);
  color: #12473a;
  font-family: var(--font-sans, sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 3px 14px rgba(4, 42, 33, 0.18);
  cursor: pointer;
}

.vw-mini:hover { box-shadow: 0 5px 18px rgba(4, 42, 33, 0.28); }

/* Checkout: fixe Bottom-Nav (Weiter-Button) nicht verdecken */
.co-body .vw-bubble, .co-body .vw-mini { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* ---------- Player: Overlay + Karte ---------- */
.vw-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  background-color: rgba(4, 42, 33, 0.45);
}

.vw-overlay.is-open { display: block; }

.vw-karte {
  position: absolute;
  right: 16px;
  bottom: 20px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background-color: var(--color-white, #fff);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(4, 42, 33, 0.4);
  animation: vw-rein 0.25s ease;
}

@keyframes vw-rein {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.vw-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 8px 14px;
}

.vw-kopf p {
  margin: 0;
  font-family: var(--font-sans, sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #12473a;
}

.vw-kopf .vw-x {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background-color: rgba(4, 42, 33, 0.08);
  color: #12473a;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.vw-kopf .vw-x:hover { background-color: rgba(4, 42, 33, 0.16); }

.vw-video {
  display: block;
  width: 100%;
  height: auto;
  background-color: #000;
}

/* Mobil: Bottom-Sheet über die volle Breite */
@media (max-width: 640px) {
  .vw-karte {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ---------- Inline-Modus (Platzhalter in Einrichtung/App) ---------- */
.vw-inline {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background-color: #000;
}
