/*
 * radio.css 1.0.6b – Hintergrund, Team-Slider, Webcam-UI, Login-Bild + Chat-Viewport für ET-Chat T-FISH
 * ET-Chat Copyright by SEDesign | ET-Chat v3.x.x Lizenz: CCPL
 * ET-Chat_T-FISH-MOD: Tommy (Thomas Kuhn) und Harlekin (Bernd Witte)
 *
 * Nach styles/style_chat/style.css einbinden. Werte: barrierefrei/bg/bg-vars.css
 * und/oder CSS-Variablen von bg.js. style.css selbst wird NICHT geändert.
 */

:root {
  --bf-bg-chat-url: none;
  --bf-bg-login-url: none;
  --bf-bg-chat-opacity: 0.50;
  --bf-bg-login-opacity: 0.25;
  --bf-bg-chat-fit: cover;
  --bf-bg-login-fit: cover;
  --bf-bg-chat-darken: 0;
  --bf-bg-login-darken: 0;
  --bf-bg-chat-attachment: fixed;
  --bf-bg-login-attachment: fixed;
  --bf-login-logo-url: none;
  --bf-login-logo-width: 280px;
}

/* ---------- Chat: Bild/GIF als Layer (Opacity steuerbar) ---------- */
html.bf-bg-chat-image #body_id,
html.bf-bg-chat-image body {
  background-color: #0a0e1f !important;
  background-image: none !important;
}
html.bf-bg-chat-image #body_id::before,
html.bf-bg-chat-image body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -100;
  pointer-events: none;
  background-image: var(--bf-bg-chat-url);
  background-size: var(--bf-bg-chat-fit);
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: var(--bf-bg-chat-attachment);
  opacity: var(--bf-bg-chat-opacity);
}
html.bf-bg-chat-image #video_background_chat {
  display: none !important;
  visibility: hidden !important;
}

/* ---------- Chat: eigenes MP4 über vorhandenes <video> ---------- */
html.bf-bg-chat-video #video_background_chat {
  opacity: var(--bf-bg-chat-opacity) !important;
  object-fit: var(--bf-bg-chat-fit) !important;
  z-index: -100 !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
}
html.bf-bg-chat-video #body_id,
html.bf-bg-chat-video body {
  background-image: none !important;
}

/* ---------- Login/Start: Bild/GIF ---------- */
html.bf-bg-login-image #body,
html.bf-bg-login-image body {
  background-color: #0a0e1f !important;
  background-image: none !important;
}
html.bf-bg-login-image #body::before,
html.bf-bg-login-image body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -100;
  pointer-events: none;
  background-image: var(--bf-bg-login-url);
  background-size: var(--bf-bg-login-fit);
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: var(--bf-bg-login-attachment);
  opacity: var(--bf-bg-login-opacity);
}
html.bf-bg-login-image #video_background_Login {
  display: none !important;
  visibility: hidden !important;
}

/* ---------- Login/Start: eigenes MP4 ---------- */
html.bf-bg-login-video #video_background_Login {
  opacity: var(--bf-bg-login-opacity) !important;
  object-fit: var(--bf-bg-login-fit) !important;
  z-index: -100 !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
}
html.bf-bg-login-video #body,
html.bf-bg-login-video body {
  background-image: none !important;
}

/* Theme blendet Videos unter 700px aus – mit *-mobile wieder an */
@media (max-width: 700px) {
  html.bf-bg-chat-video.bf-bg-chat-mobile #video_background_chat {
    display: block !important;
    visibility: visible !important;
  }
  html.bf-bg-login-video.bf-bg-login-mobile #video_background_Login {
    display: block !important;
    visibility: visible !important;
  }
  html.bf-bg-chat-image:not(.bf-bg-chat-mobile) #body_id::before,
  html.bf-bg-chat-image:not(.bf-bg-chat-mobile) body::before,
  html.bf-bg-login-image:not(.bf-bg-login-mobile) #body::before,
  html.bf-bg-login-image:not(.bf-bg-login-mobile) body::before {
    display: none !important;
  }
}

/* Fallback-Layer, falls Theme kein <video> hat */
#bf-custom-bg {
  position: fixed; inset: 0; z-index: -100; pointer-events: none; overflow: hidden;
}
#bf-custom-bg .bf-bg-img {
  position: absolute; inset: 0;
  background-repeat: no-repeat; background-position: center center;
  background-size: var(--bf-bg-chat-fit, cover);
  background-image: var(--bf-bg-chat-url, none);
  opacity: var(--bf-bg-chat-opacity, 0.5);
}
#bf-custom-bg .bf-bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: var(--bf-bg-chat-fit, cover);
  opacity: var(--bf-bg-chat-opacity, 0.5);
}
#bf-custom-bg .bf-bg-dim {
  position: absolute; inset: 0; background: #000;
  opacity: var(--bf-bg-chat-darken, 0);
}
html.bf-bg-login-page #bf-custom-bg .bf-bg-img {
  background-image: var(--bf-bg-login-url, none);
  background-size: var(--bf-bg-login-fit, cover);
  opacity: var(--bf-bg-login-opacity, 0.25);
}
html.bf-bg-login-page #bf-custom-bg .bf-bg-video {
  object-fit: var(--bf-bg-login-fit, cover);
  opacity: var(--bf-bg-login-opacity, 0.25);
}
html.bf-bg-login-page #bf-custom-bg .bf-bg-dim {
  opacity: var(--bf-bg-login-darken, 0);
}

html.bf-has-custom-bg #chatinhalt,
html.bf-has-custom-bg #chat_inhalt {
  background-image: none !important;
}

/* ---------- 1.0.3: Bildausschnitt oben halten (Disco-Wolf-Schriftzug) ---------- */
/* Wenn noetig "center top" z. B. auf "center 20%" aendern */
#video_background_Login,
#video_background_chat,
#bf-custom-bg .bf-bg-video {
  object-fit: cover !important;
  object-position: center top !important;
}
html.bf-bg-chat-image #body_id::before,
html.bf-bg-chat-image body::before,
html.bf-bg-login-image #body::before,
html.bf-bg-login-image body::before,
#bf-custom-bg .bf-bg-img {
  background-position: center top !important;
}


/* ---------- 1.0.4: Team-Slider (Login-/Startseite Footer) ---------- */
#bf-team-slider,
.bf-team {
  --bf-team-cyan: #00ccff;
  --bf-team-mag: #ff2bd6;
  width: 100%;
  max-width: 1100px;
  margin: 18px auto 8px;
  padding: 14px 12px 18px;
  color: #e8ecf8;
  position: relative;
  z-index: 2;
}
.bf-team[hidden] { display: none !important; }
.bf-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
}
.bf-team-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--bf-team-cyan), var(--bf-team-mag));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(0, 204, 255, .25);
}
.bf-team-nav { display: flex; gap: 8px; }
.bf-team-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--bf-team-cyan);
  background: rgba(11, 15, 26, .75);
  color: var(--bf-team-cyan);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 204, 255, .35);
  transition: background .2s, color .2s, opacity .2s, box-shadow .2s;
}
.bf-team-btn:hover,
.bf-team-btn:focus-visible {
  background: var(--bf-team-cyan);
  color: #041018;
  outline: none;
  box-shadow: 0 0 16px rgba(255, 43, 214, .45);
}
.bf-team-btn:disabled,
.bf-team-btn[aria-disabled="true"] {
  opacity: .35;
  cursor: default;
  box-shadow: none;
}
.bf-team-viewport {
  overflow: hidden;
  touch-action: pan-y;
  border-radius: 16px;
  padding: 6px 2px 10px;
}
.bf-team-track {
  display: flex;
  gap: 16px;
  will-change: transform;
}
.bf-team-card {
  flex: 0 0 calc(25% - 12px);
  min-width: 140px;
  max-width: 220px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 14px 10px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0, 204, 255, .35);
  background: linear-gradient(160deg, rgba(21, 27, 46, .92), rgba(11, 15, 26, .88));
  box-shadow: 0 0 18px rgba(0, 204, 255, .12), inset 0 0 18px rgba(255, 43, 214, .05);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.bf-team-card:hover,
a.bf-team-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--bf-team-mag);
  box-shadow: 0 0 22px rgba(255, 43, 214, .28);
  outline: none;
}
.bf-team-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 10px;
  border: 2px solid var(--bf-team-cyan);
  box-shadow: 0 0 16px rgba(0, 204, 255, .45), 0 0 28px rgba(255, 43, 214, .2);
  background: #0e1424;
}
.bf-team-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--bf-team-mag);
  border-color: var(--bf-team-mag);
}
.bf-team-name {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 2px;
  word-break: break-word;
}
.bf-team-role {
  color: var(--bf-team-cyan);
  font-weight: 700;
  font-size: .92rem;
  text-shadow: 0 0 8px rgba(0, 204, 255, .35);
}
.bf-team-text {
  margin-top: 6px;
  color: #9aa3b8;
  font-size: .82rem;
  line-height: 1.35;
  word-break: break-word;
}
@media (max-width: 900px) {
  .bf-team-card { flex-basis: calc(33.333% - 11px); }
}
@media (max-width: 700px) {
  .bf-team-card { flex-basis: calc(50% - 8px); min-width: 130px; }
  .bf-team-avatar { width: 84px; height: 84px; }
}
@media (max-width: 420px) {
  .bf-team-card { flex-basis: 78%; max-width: none; }
}


/* ========== 1.0.5 Webcam (Cyberpunk) / Cam 1.1.3 ========== */
#bf-cam-root { font-family: system-ui, sans-serif; }
.bf-cam-btn-slot { display: inline-flex; align-items: center; vertical-align: middle; margin-right: 6px; }
#bf-cam-toggle,
.bf-cam-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, #1a2240, #0e1424);
  color: #00ccff;
  border: 1px solid #00ccff;
  box-shadow: 0 0 10px rgba(0, 204, 255, .35);
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 800;
  cursor: pointer;
  z-index: 11000;
}
#bf-cam-toggle:hover { color: #ff2bd6; border-color: #ff2bd6; box-shadow: 0 0 14px rgba(255, 43, 214, .35); }
.bf-cam-panel {
  position: fixed;
  right: 12px;
  bottom: 72px;
  width: min(320px, calc(100vw - 20px));
  max-height: min(70vh, 480px);
  overflow: auto;
  z-index: 11050;
  background: linear-gradient(160deg, rgba(15, 20, 38, .96), rgba(8, 12, 24, .96));
  border: 1px solid rgba(0, 204, 255, .45);
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(0, 204, 255, .18), 0 0 28px rgba(255, 43, 214, .08);
  color: #e8ecf8;
  padding: 12px 12px 14px;
}
.bf-cam-panel-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bf-cam-panel-h strong {
  background: linear-gradient(90deg, #00ccff, #ff2bd6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 1.05rem;
}
.bf-cam-status { color: #9aa3b8; font-size: .8rem; }
.bf-cam-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.bf-cam-start {
  background: #00ccff; color: #041018; border: 0; border-radius: 8px;
  font-weight: 800; padding: 8px 12px; cursor: pointer;
}
.bf-cam-start.is-on { background: #ff2bd6; color: #1a0014; }
.bf-cam-mic { color: #c9d2e8; font-size: .9rem; font-weight: 600; }
.bf-cam-hint, .bf-cam-sub { color: #9aa3b8; font-size: .8rem; margin: 6px 0; }
.bf-cam-list, .bf-cam-viewers { list-style: none; margin: 0; padding: 0; }
.bf-cam-peer, .bf-cam-viewer {
  display: flex; gap: 8px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid #24304a; font-size: .92rem;
}
.bf-cam-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3ddc97;
  box-shadow: 0 0 8px #3ddc97; flex-shrink: 0;
}
.bf-cam-name { flex: 1; min-width: 0; word-break: break-word; font-weight: 700; }
.bf-cam-viewers { color: #00ccff; font-size: .8rem; }
.bf-cam-watch, .bf-cam-kick {
  background: #2a3550; color: #e8ecf8; border: 1px solid #00ccff;
  border-radius: 7px; padding: 3px 8px; cursor: pointer; font-weight: 700; font-size: .8rem;
}
.bf-cam-watch:disabled { opacity: .5; cursor: default; border-color: #445; }
.bf-cam-kick { border-color: #ff6b6b; color: #ffb4b4; }
.bf-cam-empty { color: #9aa3b8; font-size: .85rem; padding: 6px 0; }
.bf-cam-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 13000; background: #151b2e; color: #e8ecf8;
  border: 1px solid #00ccff; border-radius: 10px; padding: 8px 14px;
  box-shadow: 0 0 18px rgba(0, 204, 255, .25); max-width: 90vw;
}
.bf-cam-toast.err { border-color: #ff6b6b; }
.bf-cam-toast.ok { border-color: #3ddc97; }
.bf-cam-consent {
  position: fixed; inset: 0; z-index: 20000;
  background: rgba(4, 8, 18, .72);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.bf-cam-consent[hidden] { display: none !important; }
.bf-cam-consent-card {
  width: min(420px, 100%);
  background: #151b2e; border: 1px solid #ff2bd6; border-radius: 16px;
  padding: 20px; box-shadow: 0 0 28px rgba(255, 43, 214, .3);
  color: #e8ecf8;
}
.bf-cam-consent-card h2 { margin: 0 0 8px; color: #00ccff; }
.bf-cam-consent-btns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.bf-cam-allow, .bf-cam-deny {
  flex: 1; min-width: 120px; border: 0; border-radius: 8px;
  padding: 10px 14px; font-weight: 800; cursor: pointer;
}
.bf-cam-allow { background: #3ddc97; color: #04180c; }
.bf-cam-deny { background: #ff6b6b; color: #1a0000; }
.bf-cam-win {
  position: fixed; z-index: 12000;
  width: 280px; height: 220px;
  min-width: 200px; min-height: 150px;
  background: #0b0f1a;
  border: 1px solid #00ccff;
  border-radius: 12px;
  box-shadow: 0 0 22px rgba(0, 204, 255, .3), 0 0 18px rgba(255, 43, 214, .12);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.bf-cam-win.is-local { border-color: #ff2bd6; }
.bf-cam-win-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px; cursor: move;
  background: linear-gradient(90deg, rgba(0, 204, 255, .18), rgba(255, 43, 214, .14));
  user-select: none; touch-action: none;
}
.bf-cam-win-title { flex: 1; min-width: 0; font-size: .82rem; font-weight: 800; color: #e8ecf8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-cam-win-bar button {
  background: #2a3550; color: #e8ecf8; border: 0; border-radius: 6px;
  padding: 2px 7px; font-size: .75rem; font-weight: 700; cursor: pointer;
}
.bf-cam-win-x { font-size: 1rem !important; line-height: 1; }
.bf-cam-win video {
  flex: 1; width: 100%; height: 100%; object-fit: cover; background: #000;
  pointer-events: none;
}
.bf-cam-win-resize {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, #00ccff 50%);
}
@media (max-width: 700px) {
  .bf-cam-panel { left: 8px; right: 8px; width: auto; bottom: calc(8px + var(--bf-chat-lift, 56px) + env(safe-area-inset-bottom, 0px)); max-height: min(52vh, calc(100dvh - 16px - var(--bf-chat-lift, 56px))); }
  .bf-cam-win.is-docked { width: 100% !important; height: auto !important; min-height: 0 !important; left: auto !important; aspect-ratio: 4 / 3; }
  .bf-cam-win { width: min(96vw, 360px); height: 42vw; min-height: 180px; left: 2vw !important; }
}

/* ========== 1.1.3: kleinere Cam-Kacheln + Größenwahl S/M/L ========== */
.bf-cam-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, var(--bf-cam-tile, 160px)));
  justify-content: start;
  justify-items: stretch;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 6px 8px 8px;
  margin: 0 0 10px;
  background: rgba(18, 23, 46, .9);
  border: 1px solid #3d2a6b;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(61, 42, 107, .6);
  --bf-cam-tile: 160px;
}
.bf-cam-strip[data-bf-cam-size="s"] { --bf-cam-tile: 160px; }
.bf-cam-strip[data-bf-cam-size="m"] { --bf-cam-tile: 220px; }
.bf-cam-strip[data-bf-cam-size="l"] { --bf-cam-tile: 300px; }
.bf-cam-strip[hidden] { display: none !important; }
.bf-cam-sizes {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}
.bf-cam-size-btn {
  background: transparent;
  border: 1px solid rgba(0, 204, 255, .45);
  color: #00ccff;
  border-radius: 5px;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  cursor: pointer;
}
.bf-cam-size-btn:hover { background: rgba(0, 204, 255, .15); }
.bf-cam-size-btn.is-on { background: #00ccff; color: #041018; border-color: #00ccff; }
.bf-cam-win.is-docked {
  container-type: inline-size;
}
.bf-cam-win.is-docked .bf-cam-win-bar { gap: 3px; padding: 2px 3px; }
.bf-cam-win.is-docked .bf-cam-win-title { font-size: .68rem; }
.bf-cam-win.is-docked .bf-cam-win-bar button {
  padding: 1px 4px; font-size: .62rem; border-radius: 4px;
  flex-shrink: 0; white-space: nowrap;
}
.bf-cam-win.is-docked .bf-cam-win-mute {
  font-size: 0 !important; width: 20px; min-width: 20px; padding: 1px 0 !important;
}
.bf-cam-win.is-docked .bf-cam-win-mute::before { content: "🔊"; font-size: 11px; line-height: 1; }
.bf-cam-win.is-docked .bf-cam-win-mute.is-muted::before { content: "🔇"; font-size: 11px; line-height: 1; }
.bf-cam-win.is-docked .bf-cam-win-x { font-size: .85rem !important; }
.bf-cam-win.is-docked video,
.bf-cam-win.is-docked canvas {
  flex: 1; min-height: 0; width: 100%; height: auto; object-fit: cover;
}
.bf-cam-strip[data-bf-cam-size="m"] .bf-cam-win.is-docked .bf-cam-win-title,
.bf-cam-strip[data-bf-cam-size="l"] .bf-cam-win.is-docked .bf-cam-win-title { font-size: .75rem; }
.bf-cam-strip[data-bf-cam-size="m"] .bf-cam-win.is-docked .bf-cam-win-bar button,
.bf-cam-strip[data-bf-cam-size="l"] .bf-cam-win.is-docked .bf-cam-win-bar button {
  font-size: .7rem; padding: 2px 6px;
}
.bf-cam-strip[data-bf-cam-size="l"] .bf-cam-win.is-docked .bf-cam-win-mute {
  font-size: .7rem !important; width: auto; min-width: 0; padding: 2px 6px !important;
}
.bf-cam-strip[data-bf-cam-size="l"] .bf-cam-win.is-docked .bf-cam-win-mute::before { content: none; }
@media (max-width: 700px) {
  .bf-cam-strip {
    grid-template-columns: repeat(2, minmax(0, var(--bf-cam-tile, 130px)));
    gap: 6px;
  }
  .bf-cam-strip[data-bf-cam-size="s"] { --bf-cam-tile: 130px; }
  .bf-cam-strip[data-bf-cam-size="m"] { --bf-cam-tile: 170px; }
  .bf-cam-strip[data-bf-cam-size="l"] { --bf-cam-tile: 220px; }
}

/* ---------- 1.0.6a: Login-Bild (Logo auf der Start-/Loginseite) ---------- */
/* Ohne gesetztes Bild gibt es das Element nicht (Include gibt nichts aus). */
#bf-login-logo {
  display: flex;
  width: 100%;
  max-width: 1400px;
  margin: 12px auto 4px;
  padding: 0 16px;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  pointer-events: none;
}
#bf-login-logo.bf-login-logo-left { justify-content: flex-start; }
#bf-login-logo.bf-login-logo-center { justify-content: center; }
#bf-login-logo.bf-login-logo-right { justify-content: flex-end; }
#bf-login-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: var(--bf-login-logo-width, 280px);
  max-height: 220px;
  object-fit: contain;
  pointer-events: none;
}
@media (max-width: 700px) {
  #bf-login-logo { margin-top: 8px; padding: 0 10px; }
  #bf-login-logo img { max-width: min(var(--bf-login-logo-width, 280px), 90vw); max-height: 140px; }
}



/* ---------- 1.0.6b: Chat füllt das Fenster, kein Seiten-Scroll ---------- */
/* chat.js setzt alle 200ms height: innerHeight-150 (inline). !important hebt das auf. */
html.bf-chat-page,
html.bf-chat-page body#body_id {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}
html.bf-chat-page body#body_id #video_background_chat {
  position: fixed !important;
  z-index: -100;
  pointer-events: none;
}
html.bf-chat-page body#body_id #rahmen_um_alles {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 !important;
  padding: 6px 8px;
  overflow: hidden !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "kopf kopf"
    "cam cam"
    "ticker ticker"
    "chat list"
    "form form";
  gap: 6px;
  align-content: stretch;
}
html.bf-chat-page body#body_id a.img_fullscreen,
html.bf-chat-page body#body_id .img_fullscreen {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 30;
  margin: 0;
}
html.bf-chat-page body#body_id #kopf {
  grid-area: kopf;
  margin-bottom: 0 !important;
  max-height: 72px;
  box-sizing: border-box;
}
html.bf-chat-page body#body_id #bf-cam-strip {
  grid-area: cam;
  margin: 0 !important;
  max-height: 150px;
  min-height: 0;
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 6px;
  box-sizing: border-box;
}
html.bf-chat-page body#body_id #bf-cam-strip[hidden] {
  display: none !important;
}
html.bf-chat-page body#body_id #bf-cam-strip .bf-cam-sizes {
  grid-column: auto;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
html.bf-chat-page body#body_id #bf-cam-strip .bf-cam-win.is-docked {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  flex: 0 0 auto;
  width: 148px !important;
  max-width: 160px;
  height: 132px !important;
  max-height: 132px !important;
  min-height: 0 !important;
}
html.bf-chat-page body#body_id #bf-cam-ticker {
  grid-area: ticker;
  margin: 0 !important;
  box-sizing: border-box;
}
html.bf-chat-page body#body_id #bf-cam-ticker[hidden] {
  display: none !important;
}
html.bf-chat-page body#body_id #chatinhalt {
  grid-area: chat;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  margin: 0 !important;
  float: none !important;
  box-sizing: border-box;
}
html.bf-chat-page body#body_id #onlinelist {
  grid-area: list;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  width: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  margin: 0 !important;
  float: none !important;
  box-sizing: border-box;
}
html.bf-chat-page body#body_id #splitpane {
  display: none !important;
}
html.bf-chat-page body#body_id #form {
  grid-area: form;
  margin-top: 0 !important;
  height: auto !important;
  min-height: 50px;
  clear: none !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  box-sizing: border-box;
  z-index: 5;
}
html.bf-chat-page body#body_id #form_left,
html.bf-chat-page body#body_id #form_right {
  float: none !important;
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  box-sizing: border-box;
}
html.bf-chat-page body#body_id #form_left {
  flex: 1 1 200px;
  min-width: 0;
}
html.bf-chat-page body#body_id #message {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1025px) {
  html.bf-chat-page body#body_id #modal-userliste,
  html.bf-chat-page body#body_id #modal-userliste .modal-container,
  html.bf-chat-page body#body_id #modal-userliste .modal-content {
    display: contents;
  }
}

@media (max-width: 1024px) {
  html.bf-chat-page body#body_id #rahmen_um_alles {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "kopf"
      "cam"
      "ticker"
      "chat"
      "form";
  }
  html.bf-chat-page body#body_id #chatinhalt {
    grid-column: 1;
    grid-row: auto;
  }
  html.bf-chat-page body#body_id #onlinelist {
    /* bleibt im Modal, nicht im Grid */
    height: auto !important;
    max-height: min(70vh, calc(100dvh - 80px)) !important;
    width: 100% !important;
    float: none !important;
  }
}

@media (max-width: 700px) {
  html.bf-chat-page body#body_id #rahmen_um_alles {
    padding: 4px 6px;
    gap: 4px;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }
  html.bf-chat-page body#body_id #kopf {
    max-height: 64px;
    height: auto !important;
  }
  html.bf-chat-page body#body_id #bf-cam-strip {
    max-height: 120px;
  }
  html.bf-chat-page body#body_id #bf-cam-strip .bf-cam-win.is-docked {
    width: 120px !important;
    max-width: 130px;
    height: 104px !important;
    max-height: 104px !important;
  }
  html.bf-chat-page body#body_id #form {
    min-height: 48px;
  }
}
