/**
 * TikTok LIVE — Kommentare + Eingabe (kein Messenger, keine lobby-* Klassen).
 */

#ansicht-video.video-tiktok-layout .video-live-ui {
  position: absolute;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: var(--vt-chat-rand-rechts, calc(var(--vt-rail-breite, 48px) + max(4px, env(safe-area-inset-right, 0px)) + 6px));
  width: auto;
  max-width: var(--vt-zone-chat-links-breite, 320px);
  bottom: max(6px, env(safe-area-inset-bottom, 0px));
  top: calc(var(--vt-kopf-hoehe, 52px) + 6px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
  box-sizing: border-box;
}

#ansicht-video.video-tiktok-layout .video-live-ui[hidden] {
  display: none !important;
}

#ansicht-video.video-tiktok-layout.video-paar-chat-aktiv .video-live-ui {
  display: flex;
}

/* Kommentare: durchklickbar außer auf Text (Video-Taps) */
#ansicht-video.video-tiktok-layout.video-paar-chat-aktiv .video-live-kommentare {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(26vh, 180px);
  max-width: min(100%, 320px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 0;
  margin: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 100%);
}

#ansicht-video.video-tiktok-layout.video-eigen-mini .video-live-kommentare,
#ansicht-video.video-tiktok-layout.video-partner-mini .video-live-kommentare {
  padding-inline-end: calc(var(--vt-pip-breite, 104px) + 6px);
  box-sizing: border-box;
}

#ansicht-video.video-tiktok-layout .video-live-kommentar {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  max-width: 100%;
  pointer-events: none;
  animation: video-live-kommentar-ein 0.25s ease;
}

@keyframes video-live-kommentar-ein {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#ansicht-video.video-tiktok-layout .video-live-kommentar--aus {
  animation: video-live-kommentar-aus 0.35s ease forwards;
}

@keyframes video-live-kommentar-aus {
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

#ansicht-video.video-tiktok-layout .video-live-kommentar-portraet {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

#ansicht-video.video-tiktok-layout .video-live-kommentar-portraet-bild {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#ansicht-video.video-tiktok-layout .video-live-kommentar-inhalt {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  word-break: break-word;
}

#ansicht-video.video-tiktok-layout .video-live-kommentar-name {
  font-weight: 700;
  margin-inline-end: 4px;
}

#ansicht-video.video-tiktok-layout .video-live-kommentar-text {
  font-weight: 400;
  opacity: 0.95;
}

/* Eingabe: eine Pille (TikTok) */
#ansicht-video.video-tiktok-layout .video-live-boden {
  flex: 0 0 auto;
  width: 100%;
  pointer-events: auto;
  touch-action: manipulation;
}

#ansicht-video.video-tiktok-layout .video-live-eingabe-pille {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  max-height: 40px;
  padding: 0 4px 0 14px;
  gap: 2px;
  box-sizing: border-box;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#ansicht-video.video-tiktok-layout .video-live-eingabe-feld {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  line-height: 22px;
  box-shadow: none !important;
}

#ansicht-video.video-tiktok-layout .video-live-eingabe-feld::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#ansicht-video.video-tiktok-layout .video-live-eingabe-senden {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#ansicht-video.video-tiktok-layout .video-live-eingabe-senden.chat-senden--leer {
  opacity: 0.35;
  pointer-events: none;
}

#ansicht-video.video-tiktok-layout .video-live-eingabe-senden:not(.chat-senden--leer) {
  background: #fe2c55;
  color: #fff;
}

#ansicht-video.video-tiktok-layout .video-live-eingabe-senden-symbol {
  font-size: 1rem;
  line-height: 1;
}
