/* conf.lu – Konferenz-App (Prototyp). Farben wie auf der Website. */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/atkinson/AtkinsonHyperlegibleNext-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/atkinson/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2');
}

:root {
  --accent: #00a3e0;              /* Blau der Luxemburger Flagge (Pantone 299 C) */
  --accent-strong: #ef3340;       /* Rot der Luxemburger Flagge (Pantone 032 C) */
  --leave: #ef3340;
  --bg: #f3f9fc;
  --card: #ffffff;
  --text: #1a1f23;
  --meta: #555d63;
  --border: rgba(0, 0, 0, 0.15);
  --stage: #14181b;
  --tile: #232c33;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #00a3e0;
    --accent-strong: #ef3340;
    --bg: #14181b;
    --card: #1d252b;
    --text: #e6ecef;
    --meta: #9aa6af;
    --border: rgba(255, 255, 255, 0.2);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }
body {
  font-family: 'Atkinson Hyperlegible Next', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

.btn {
  display: inline-block;
  padding: 0.7em 1.4em;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn--outline { background: transparent; color: var(--text); }
.btn:hover { color: #111; }

/* ---------- Lobby ---------- */
.lobby {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
}
.lobby__card {
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.75rem;
  padding: 1.75rem;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.lobby__card--narrow { display: block; width: min(100%, 520px); text-align: center; }
@media (max-width: 700px) { .lobby__card { grid-template-columns: 1fr; padding: 1.25rem; } }

.preview {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--stage);
}
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview__off {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #d5dde2;
}
.no-video .preview__off { display: flex; }
.no-video .preview video { visibility: hidden; }

.lobby__form { display: flex; flex-direction: column; gap: 1rem; }
.lobby__form h1 { margin: 0; font-size: 1.5rem; }
.lobby__room { margin: -0.5rem 0 0; color: var(--meta); font-size: 0.9em; }
.lobby__form label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 700; }
.lobby__form label.check { flex-direction: row; align-items: center; gap: 0.5rem; font-weight: 400; }
.lobby__form input[type="text"], .lobby__form input:not([type]) {
  padding: 0.6em 0.8em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.lobby__form input[type="checkbox"] { width: 1.15em; height: 1.15em; accent-color: var(--accent); }
.error { margin: 0; color: var(--leave); }

/* ---------- Raum ---------- */
.room {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--stage);
}
.grid {
  --cols: 1;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: 1fr;
  gap: 0.6rem;
  padding: 0.6rem;
  min-height: 0;
}
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  margin: 0;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tile);
}
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile--local video { transform: scaleX(-1); }
.tile__avatar {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 5rem;
  height: 5rem;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-size: 1.8rem;
  font-weight: 700;
}
.tile--no-video video { visibility: hidden; }
.tile--no-video .tile__avatar { display: flex; }
.tile__name {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  max-width: calc(100% - 1.2rem);
  padding: 0.2em 0.6em;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.75rem;
}
.tool {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 5.5rem;
  padding: 0.55rem 0.8rem;
  border: 0;
  border-radius: 12px;
  background: #2c3740;
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.tool:hover { background: #3a4853; }
.tool svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool[aria-pressed="false"] { background: #e9ecef; color: #1c2b2f; }
.tool[aria-pressed="false"] svg { stroke: var(--leave); }
.tool--leave { background: var(--leave); color: #111; }
.tool--leave:hover { background: #ff5a65; }
.tool:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; }

/* Hinweise als eigene Zeile über der Werkzeugleiste: verdecken keine Kacheln oder Buttons */
.toast {
  order: 2;
  align-self: center;
  max-width: min(92vw, 560px);
  margin: 0.25rem 1rem 0;
  padding: 0.55em 1.1em;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: #1c2b2f;
  text-align: center;
}
.toolbar { order: 3; }

.room__title {
  margin: 0;
  padding: 0.6rem 1rem 0;
  color: #f2f5f7;
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Warteraum ---------- */
.spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Einlassliste der Moderation */
.queue {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: min(92vw, 340px);
  padding: 0.9rem 1rem;
  border-top: 4px solid var(--accent-strong);
  border-radius: 12px;
  background: #ffffff;
  color: #1a1f23;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.queue__title { margin: 0 0 0.5rem; font-size: 1rem; }
.queue__list { list-style: none; margin: 0; padding: 0; }
.queue__list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
}
.queue__list li + li { border-top: 1px solid rgba(0, 0, 0, 0.1); }
.queue__name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue__btn {
  padding: 0.35em 0.8em;
  border: 2px solid #1a1f23;
  border-radius: 999px;
  background: transparent;
  color: #1a1f23;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.queue__btn--admit { background: var(--accent); border-color: var(--accent); color: #111; }
.queue__btn:hover { border-color: var(--accent-strong); }
.queue__btn:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; }

/* „Entfernen“ auf den Kacheln (nur Moderation) */
.tile__remove {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.3em 0.8em;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.tile__remove:hover, .tile__remove[data-armed] { background: var(--leave); color: #111; }
.tile__remove:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Hand heben: Kennzeichen auf der Kachel, Rahmen, Button der Moderation */
.tile__hand {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-weight: 700;
  font-size: 0.9em;
}
.tile--hand { box-shadow: inset 0 0 0 3px var(--accent); }
.tile__lower {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  padding: 0.3em 0.8em;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.tile__lower:hover { background: var(--accent); color: #111; }
.tile__lower:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* gedrückter „Hand heben“-Button: hervorgehoben statt wie ein ausgeschaltetes Mikrofon */
#btn-hand[aria-pressed="true"] { background: var(--accent); color: #111; }
#btn-hand[aria-pressed="true"] svg { stroke: #111; }
#btn-hand[aria-pressed="false"] { background: #2c3740; color: #fff; }
#btn-hand[aria-pressed="false"] svg { stroke: currentColor; }

/* Bildschirm teilen: große Kachel über die volle Breite, Inhalt vollständig sichtbar */
.tile--screen {
  grid-column: 1 / -1;
  grid-row: span 2;
  background: #000;
}
.tile--screen video { object-fit: contain; }
#btn-share[aria-pressed="true"] { background: var(--accent); color: #111; }
#btn-share[aria-pressed="true"] svg { stroke: #111; }
#btn-share[aria-pressed="false"] { background: #2c3740; color: #fff; }
#btn-share[aria-pressed="false"] svg { stroke: currentColor; }

/* ---------- Chat ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.tool { position: relative; }
.tool__badge {
  position: absolute;
  top: 0.2rem;
  right: 0.5rem;
  min-width: 1.3em;
  padding: 0 0.35em;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #111;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3em;
}
#btn-chat[aria-pressed="true"] { background: var(--accent); color: #111; }
#btn-chat[aria-pressed="true"] svg { stroke: #111; }
#btn-chat[aria-pressed="false"] { background: #2c3740; color: #fff; }
#btn-chat[aria-pressed="false"] svg { stroke: currentColor; }

.chat {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 5.5rem;              /* über der Werkzeugleiste */
  z-index: 5;
  width: min(100vw, 360px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  color: var(--text);
  border-left: 1px solid var(--border);
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.25);
}
@media (min-width: 900px) {
  .room--chat .grid, .room--chat .room__title { margin-right: 360px; }
}
.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.chat__head h2 { margin: 0; font-size: 1.1rem; }
.chat__close {
  display: inline-flex;
  padding: 0.3rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.chat__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.chat__close:focus-visible, .chat__form textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chat__hint { margin: 0.8rem 0.9rem 0; color: var(--meta); font-size: 0.85rem; }
.chat__list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0.75rem 0.9rem;
}
.chat__msg {
  max-width: 85%;
  margin-bottom: 0.6rem;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  background: var(--bg);
}
.chat__msg--own { margin-left: auto; background: var(--accent); color: #111; }
.chat__msg--own a { color: #111; }
.chat__meta { font-size: 0.75rem; opacity: 0.8; }
.chat__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat__text a { color: inherit; text-decoration-thickness: 2px; }
.chat__form {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--border);
}
.chat__form textarea {
  flex: 1;
  resize: none;
  padding: 0.5em 0.7em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.chat__form .btn { align-self: flex-end; padding: 0.55em 1em; }

/* Schmalere Fenster: kompaktere Werkzeugleiste, damit alle Buttons in eine Zeile passen */
@media (max-width: 900px) {
  .toolbar { gap: 0.4rem; padding: 0.6rem 0.5rem; }
  .tool { min-width: 4.4rem; padding: 0.45rem 0.4rem; font-size: 0.72rem; }
}

/* Dateien im Chat */
.chat__attach {
  align-self: flex-end;
  display: inline-flex;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.chat__attach svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat__attach:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chat--drop { box-shadow: inset 0 0 0 4px var(--accent); }
.chat__file { display: flex; flex-direction: column; gap: 0.3rem; }
.chat__filename { font-weight: 700; overflow-wrap: anywhere; }
.chat__file progress { width: 100%; height: 0.5rem; accent-color: var(--accent-strong); }
.chat__filestatus { font-size: 0.8rem; opacity: 0.85; }
.chat__file--failed .chat__filestatus { color: var(--leave); opacity: 1; font-weight: 700; }
.chat__msg--own .chat__file--failed .chat__filestatus { color: #111; }
.chat__preview { align-self: flex-start; max-width: 100%; max-height: 180px; border-radius: 8px; object-fit: contain; background: #fff; }
.chat__download { font-weight: 700; color: inherit; }
.chat__cancel {
  align-self: flex-start;
  padding: 0.25em 0.8em;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.chat__cancel:hover { background: var(--leave); border-color: var(--leave); color: #111; }
.chat__cancel:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; }

/* Private Nachrichten */
.chat__form { flex-wrap: wrap; }
.chat__to {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.chat__to select {
  flex: 1;
  min-width: 0;
  padding: 0.3em 0.5em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}
.chat__to select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Hinweis, dass gerade privat geschrieben wird */
.chat__form--private { background: color-mix(in srgb, var(--accent-strong) 12%, transparent); }
.chat__form--private .chat__to select { border: 2px dashed var(--accent-strong); }
.chat__msg--private { outline: 2px dashed var(--accent-strong); outline-offset: -2px; }
.chat__reply {
  margin-top: 0.35rem;
  padding: 0.2em 0.7em;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.chat__reply:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Impressum und Datenschutz in Lobby, Warteraum und nach dem Verlassen */
.legal-links { margin: 0; font-size: 0.85rem; color: var(--meta); text-align: center; }
.legal-links a { color: inherit; }

/* Unterstützen nach dem Verlassen */
.support-hint { margin: 1rem 0 0; font-size: 0.9rem; color: var(--meta); }
.support-hint a { color: var(--text); font-weight: 700; }

/* ---------- Geräte: Kamera, Mikrofon, Lautsprecher (Lobby und Einstellungen im Raum) ---------- */
.lobby__media { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.devices { display: flex; flex-direction: column; gap: 0.6rem; }
.devices__row { display: flex; align-items: center; gap: 0.75rem; }
.devices__row .tool { flex: none; width: 6.5rem; }
.devices__field { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.devices select {
  width: 100%;
  padding: 0.55em 0.7em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
.devices select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.devices select:disabled { opacity: 0.6; }
.tool--static { cursor: default; background: transparent; color: var(--text); }
.tool--static:hover { background: transparent; }
/* Pegel des gewählten Mikrofons */
.meter { display: block; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.meter__bar { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.08s linear; }
.settings .devices { padding: 1rem; overflow-y: auto; }

/* ---------- Konferenz planen ---------- */
.lobby__plan { margin: 0; text-align: center; font-size: 0.95rem; }
.lobby__plan a { color: var(--link, #006f99); }
.plan { text-align: left; width: min(100%, 640px); }
.plan__intro { margin: -0.25rem 0 0; color: var(--meta); }
.plan__when { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0.75rem; }
@media (max-width: 520px) { .plan__when { grid-template-columns: 1fr 1fr; } .plan__when label:first-child { grid-column: 1 / -1; } }
.lobby__form input[type="date"], .lobby__form input[type="time"], .lobby__form select, .plan input, .plan textarea {
  width: 100%;
  min-width: 0;
  padding: 0.6em 0.8em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.plan textarea { resize: vertical; font-size: 0.9rem; }
.plan__result h2 { margin: 0 0 0.25rem; font-size: 1.4rem; }
.plan__result h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.plan__whenText { margin: 0 0 1rem; color: var(--meta); }
.plan__link { margin: 1.25rem 0 0; }
.plan__link--host { padding: 0.9rem 1rem; border-left: 4px solid var(--accent-strong); background: var(--bg); border-radius: 0 8px 8px 0; }
.plan__copy { display: flex; gap: 0.5rem; }
.plan__copy input { font-size: 0.85rem; }
.plan__hint { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--meta); }
.plan__hint--warn { color: var(--text); }
.plan__ics { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 0; }
.plan__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; }
.btn--small { padding: 0.45em 1em; font-size: 0.9rem; white-space: nowrap; }

/* ---------- Teilnehmende erkennen: Einladung, Vorschaubild, Kennwort ---------- */
.field-hint { font-weight: 400; font-size: 0.85rem; color: var(--meta); }
.lobby__form input[readonly] { background: var(--card); border-style: dashed; }
.queue__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.queue__snap { flex: none; width: 64px; height: 48px; object-fit: cover; border-radius: 6px; background: #d9dee2; }
.queue__badge { font-size: 0.8rem; color: #0b6b2e; }
.queue__warn { font-size: 0.8rem; color: #b3141f; font-weight: 700; }
.plan__personal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.plan__personal strong { display: block; margin-bottom: 0.25rem; }

/* Persönliche Links im Raum */
.invite { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; overflow-y: auto; }
.invite label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 700; }
.invite input {
  width: 100%;
  min-width: 0;
  padding: 0.55em 0.7em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}
.invite .btn { align-self: flex-start; }

/* Ausklappbare Gruppe in der Werkzeugleiste ("Einladen") */
.tool-group { position: relative; display: inline-flex; }
.tool-menu {
  position: absolute;
  bottom: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(calc(-50% + var(--shift, 0px)));
  z-index: 20;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 14px;
  background: #11181d;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.tool-menu[hidden] { display: none; }
.tool-menu::after {               /* kleiner Pfeil zum Button */
  content: '';
  position: absolute;
  top: 100%;
  left: calc(50% - var(--shift, 0px));
  margin-left: -8px;
  border: 8px solid transparent;
  border-top-color: #11181d;
}
.tool[aria-expanded="true"] { background: #3a4853; }

/* Offene Seitenfenster: Button blau wie beim Chat (Einstellungen; "Einladen" bei offenem Fenster "Persönlicher Link") */
#btn-settings[aria-expanded="true"], .tool.tool--active { background: var(--accent); color: #111; }
#btn-settings[aria-expanded="true"] svg, .tool.tool--active svg { stroke: #111; }

/* Rückfragen im Raum */
.confirm {
  position: fixed;
  left: 50%;
  bottom: 6.5rem;
  transform: translateX(-50%);
  z-index: 30;
  width: min(92vw, 480px);
  padding: 1rem 1.1rem;
  border-top: 4px solid var(--accent-strong);
  border-radius: 12px;
  background: #ffffff;
  color: #1a1f23;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}
.confirm[hidden] { display: none; }
.confirm p { margin: 0 0 0.8rem; }
.confirm__buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn--danger { background: var(--leave); border-color: var(--leave); color: #111; }
.waiting__nohost { margin: 0.5rem 0 1rem; padding: 0.6rem 0.8rem; border-radius: 8px; background: #fff4d6; color: #3d3000; }
/* Vertretung auf der Kachel (nur Moderation) */
.tile__promote {
  position: absolute;
  top: 2.6rem;
  right: 0.6rem;
  padding: 0.3em 0.8em;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.tile__promote:hover { background: var(--accent); color: #111; }
.tile__promote:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Band im Raum, solange keine Moderation anwesend ist */
.room__notice { align-self: center; margin: 0.5rem 1rem 0; padding: 0.5em 1em; border-radius: 10px; background: #fff4d6; color: #3d3000; font-size: 0.9rem; text-align: center; max-width: min(92vw, 640px); }
.room__notice[hidden] { display: none; }

.tile__promote[data-armed] { background: var(--accent); color: #111; }

/* ---------- Whiteboard ---------- */
#btn-board[aria-pressed="true"] { background: var(--accent); color: #111; }
#btn-board[aria-pressed="true"] svg { stroke: #111; }
.tool__badge--dot { min-width: 0.7em; height: 0.7em; padding: 0; }
.board { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.6rem 0.6rem 0; }
.board[hidden] { display: none; }
.board__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.board__group { display: flex; gap: 0.25rem; padding: 0.25rem; border-radius: 10px; background: #2c3740; }
.board__btn, .board__swatch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: #fff; cursor: pointer;
}
.board__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.board__btn:hover, .board__swatch:hover { background: #3a4853; }
.board__btn[aria-pressed="true"] { background: var(--accent); color: #111; }
.board__btn:disabled, .board__swatch:disabled { opacity: 0.35; cursor: not-allowed; }
.board__btn:focus-visible, .board__swatch:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.board__swatch::after { content: ''; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; }
.board__swatch[aria-pressed="true"] { background: #4a5a66; }
.board__swatch[aria-pressed="true"]::after { box-shadow: 0 0 0 3px var(--accent); }
.board__dot { width: var(--d); height: var(--d); border-radius: 50%; background: currentColor; }
.board__note { color: #e9ecef; font-size: 0.85rem; }
.board__close { margin-left: auto; background: #2c3740; }
.board__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.board__sheet { position: relative; background: #ffffff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); overflow: hidden; }
.board__sheet canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.board__lasers { position: absolute; inset: 0; pointer-events: none; }
.board__laser { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #ef3340; box-shadow: 0 0 10px 4px rgba(239, 51, 64, 0.6); transition: opacity 0.6s; }
.board__laser span { position: absolute; left: 16px; top: -4px; padding: 0 0.4em; border-radius: 6px; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 0.75rem; white-space: nowrap; }
.board__text { position: absolute; min-width: 8rem; padding: 0.2em 0.4em; border: 2px dashed var(--accent); border-radius: 6px; background: rgba(255, 255, 255, 0.95); color: #111; font: inherit; }
.board__text[hidden] { display: none; }
/* Whiteboard offen: Videos als Leiste darunter */
.room--board .grid { flex: 0 0 9.5rem; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 13rem; grid-auto-rows: 100%; overflow-x: auto; }
@media (max-width: 600px) { .room--board .grid { flex-basis: 7rem; grid-auto-columns: 9rem; } }
/* Whiteboard zu: dunkelgrau wie die übrigen Buttons (nicht wie ein ausgeschaltetes Gerät) */
#btn-board[aria-pressed="false"] { background: #2c3740; color: #fff; }
#btn-board[aria-pressed="false"] svg { stroke: currentColor; }
#btn-board[aria-pressed="false"]:hover { background: #3a4853; }

/* Schriftgrößen im Whiteboard: vier "A" in steigender Größe */
.board__group[hidden] { display: none; }
.board__font { font-weight: 700; line-height: 1; }
.board__font[data-font="150"] { font-size: 0.7rem; }
.board__font[data-font="250"] { font-size: 0.9rem; }
.board__font[data-font="400"] { font-size: 1.15rem; }
.board__font[data-font="600"] { font-size: 1.45rem; }

/* Whiteboard offen: Meldungen schweben über dem Videostreifen, statt eine eigene Zeile zu belegen –
   sonst ändert jede Meldung die Größe des Whiteboards */
.room { position: relative; }
.room--board .toast { position: absolute; left: 50%; bottom: calc(var(--bar, 5rem) + 0.5rem); transform: translateX(-50%); margin: 0; z-index: 15; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); }
.room--board .room__notice { position: absolute; top: 3.4rem; left: 50%; transform: translateX(-50%); margin: 0; z-index: 15; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }

/* Countdown am Button "Whiteboard leeren": Ring läuft in 4 Sekunden ab */
.board__btn--countdown { position: relative; }
.board__btn--countdown::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 10px;
  background: conic-gradient(var(--accent-strong) var(--p), transparent 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  padding: 3px;
  animation: board-countdown 4s linear forwards;
  pointer-events: none;
}
@property --p { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
@keyframes board-countdown { from { --p: 100%; } to { --p: 0%; } }

/* Nachfragen an den Kacheln (Entfernen, Zur Moderation machen, Moderation entziehen): derselbe ablaufende
   Ring wie bei "Whiteboard leeren" – startet, sobald der Button scharf geschaltet ist (4 Sekunden) */
.tile__remove[data-armed]::after, .tile__promote[data-armed]::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: conic-gradient(#ffffff var(--p), transparent 0);   /* weiß: sichtbar auf Rot, Blau und Kachel */
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  padding: 3px;
  animation: board-countdown 4s linear forwards;
  pointer-events: none;
}
