/* PROJ-12: Lightning Talk Live-Vote — eigenständige Styles
   Nur projektspezifische Anpassungen, die Bootstrap 5 nicht abdeckt. */

/* ---------- Audience (Teilnehmende, Smartphone) ---------- */

.lv-vote-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 auto;
}

.lv-vote-btn {
  flex: 1 1 0;
  font-size: clamp(2rem, 12vw, 4rem);
  font-weight: 700;
  border-radius: 1.25rem;
  min-height: 30vh;
}

/* Mindesthöhe der Buttons füllt 80%+ des Viewports (Mobile-first) */
@media (min-width: 768px) {
  .lv-vote-buttons {
    flex-direction: row;
  }
}

/* ---------- Display (Beamer) ---------- */

.lv-display-question {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.15;
}

.lv-display-hint {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
}

.lv-display-count {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 800;
  line-height: 1;
}

/* Ergebnis-Balken */
.lv-bar-track {
  height: 4rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.08);
}

.lv-bar-fill {
  height: 100%;
  transition: width 0.6s ease;
  min-width: 0;
}

.lv-result-label {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
}

.lv-result-value {
  font-size: clamp(1.25rem, 3vw, 2.25rem);
  font-weight: 600;
}

/* Großer Live-Counter Punkt */
.lv-pulse {
  animation: lv-pulse 1.4s ease-in-out infinite;
}

@keyframes lv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Countdown bis zur automatischen Ergebnisanzeige (Beamer) */
.lv-countdown-track {
  height: 1.25rem;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.12);
}

/* Kein CSS-Transition: der Balken wird per requestAnimationFrame fluessig
   aktualisiert (lokaler Countdown), eine Transition wuerde nachziehen. */
.lv-countdown-track .progress-bar {
  transition: none;
}

/* QR-Code unten rechts (Beamer) */
.lv-qr-corner {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1030;
  text-align: center;
}

.lv-qr-box {
  background: #fff;
  padding: 0.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.4);
  line-height: 0;
}

.lv-qr-box canvas,
.lv-qr-box img {
  display: block;
}

.lv-qr-caption {
  background: #fff;
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.1rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Warte-Zustand: QR-Code groß und zentriert (responsiv). */
.lv-qr-corner--large {
  position: fixed;
  right: auto;
  bottom: auto;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
}

.lv-qr-corner--large .lv-qr-box {
  padding: 1rem;
  border-radius: 1.25rem;
}

/* QR-Canvas füllt die Box, bleibt aber innerhalb des Viewports. */
.lv-qr-corner--large .lv-qr-box canvas,
.lv-qr-corner--large .lv-qr-box img {
  width: 100%;
  height: auto;
  max-width: min(45vw, 45vh);
}

.lv-qr-corner--large .lv-qr-caption {
  margin-top: 0.75rem;
  font-size: clamp(1rem, 2vw, 1.5rem);
  padding: 0.25rem 1rem;
}

/* Beamer-Footer mit rechtlichen Links. */
.lv-display-footer {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  font-size: 0.95rem;
  z-index: 1030;
}

.lv-display-footer a {
  text-decoration: none;
}

.lv-display-footer a:hover {
  text-decoration: underline;
}

/* Gesamtergebnis-Balken (Ja/Nein nebeneinander) — Beamer + Audience */
.lv-summary-bar {
  display: flex;
  height: 1.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: rgba(128, 128, 128, 0.2);
}

.lv-summary-bar-ja {
  background-color: var(--bs-success);
  transition: width 0.6s ease;
}

.lv-summary-bar-nein {
  background-color: var(--bs-danger);
  transition: width 0.6s ease;
}

/* Gesamtergebnis-Tabelle (Beamer) */
.lv-summary-table {
  font-size: clamp(1rem, 2.2vw, 1.75rem);
}

.lv-summary-table .lv-summary-bar {
  height: 2rem;
}

/* Audience: Ergebnis-Balken einer Frage */
.lv-aud-bar {
  height: 1.75rem;
  border-radius: 0.5rem;
}

/* Audience: Gesamtergebnis-Liste scrollbar */
.lv-summary-list {
  overflow-y: auto;
  min-height: 0;
}

.lv-summary-card {
  border-left: 4px solid var(--bs-secondary);
}

/* ---------- Presenter (Smartphone, Steuerung) ---------- */

.lv-question-item.active {
  border-width: 2px;
  border-color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.06);
}

.lv-control-btn {
  font-size: 1.1rem;
  padding: 0.85rem 1rem;
}
