/* ============================================================
   redline-player.css — Vorher/Nachher mit Live-Vorschau
   Das Plugin-Bild ist die Buehne, darunter nur drei Bedienelemente:
   Play, Umschalter, Zeitleiste. Rueckmeldung schon beim Druecken.
   ============================================================ */
.rp {
  --rp-red: #ff2938;
  --rp-ink: #f2f0ec;
  --rp-muted: #a7a2a2;
  --rp-line: #2a2626;
  display: grid;
  justify-items: center;
  gap: 28px;
  color: var(--rp-ink);
}

/* ---------- Plugin-Bild mit Live-Ebene ---------- */
.rp__plugin {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .7), 0 0 0 1px #1d1a1a, 0 30px 90px rgba(255, 41, 56, .10);
  user-select: none;
  -webkit-user-select: none;
}
.rp__bild, .rp__leinwand { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rp__bild--glut { opacity: 0; }
.rp__bild--aus { opacity: 0; transition: opacity .16s ease; }
.rp.aus .rp__bild--aus { opacity: 1; }
.rp__leinwand { pointer-events: none; }

/* BYPASS-Taste im Bild ist echt klickbar */
.rp__bypass {
  position: absolute; left: 41.5%; top: 93.6%; width: 17%; height: 3.8%;
  background: none; border: 0; padding: 0; cursor: pointer; border-radius: 3px;
}
.rp__bypass:focus-visible { outline: 2px solid var(--rp-red); outline-offset: 2px; }

/* ---------- Bedienung ---------- */
.rp__steuerung {
  width: min(100%, 440px);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px 16px;
}

.rp__play {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--rp-red); color: #080808; border: 0; cursor: pointer;
  transition: transform .1s ease-out, background-color .16s ease;
}
.rp__play:hover { background: #ff5260; }
.rp__play:active { transform: scale(.94); }
.rp__play svg { width: 22px; height: 22px; }
.rp__play .pause { display: none; }
.rp.spielt .rp__play .play { display: none; }
.rp.spielt .rp__play .pause { display: block; }
.rp.laedt .rp__play { background: #3a2a2b; cursor: progress; }
.rp__play:focus-visible, .rp__wahl:focus-visible { outline: 2px solid var(--rp-red); outline-offset: 3px; }

/* Umschalter: zwei Felder, ein gleitender Daumen */
.rp__schalter {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; border-radius: 10px;
  background: #111; border: 1px solid var(--rp-line);
}
.rp__schalter::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 7px; background: var(--rp-red);
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), background-color .16s ease;
}
.rp.aus .rp__schalter::before { transform: translateX(0); background: #3a3636; }
.rp__wahl {
  position: relative; z-index: 1;
  height: 40px; border: 0; background: none; cursor: pointer; border-radius: 7px;
  font: 700 12px/1 var(--font-display, system-ui), sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rp-muted);
  transition: color .16s ease, transform .1s ease-out;
}
.rp__wahl:active { transform: scale(.97); }
.rp__wahl[aria-checked="true"] { color: #080808; }
.rp.aus .rp__wahl[aria-checked="true"] { color: var(--rp-ink); }

/* Zeitleiste: duenne Linie, Kopf waechst mit */
.rp__zeit {
  grid-column: 1 / -1;
  height: 18px; display: grid; align-items: center; cursor: pointer;
  touch-action: none;
}
.rp__zeit-spur { position: relative; height: 3px; border-radius: 2px; background: var(--rp-line); overflow: hidden; }
.rp__zeit-kopf { position: absolute; inset: 0; background: var(--rp-red); transform-origin: left center; transform: scaleX(0); }
.rp.aus .rp__zeit-kopf { background: #8a8484; }
.rp__hinweis { grid-column: 1 / -1; margin: -4px 0 0; color: var(--rp-muted); font-size: 12px; line-height: 1.6; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .rp__bild--aus, .rp__schalter::before, .rp__play, .rp__wahl { transition: none; }
  .rp__play:active, .rp__wahl:active { transform: none; }
}
