/* Live Q&A – gemeinsames Stylesheet. Nur Systemschriften, keine externen Ressourcen. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1c1e21;
  --muted: #6b7280;
  --border: #e2e4e9;
  --accent: #2563eb;
  --accent-contrast: #ffffff;
  --danger: #dc2626;
  --success: #16a34a;
  --warn: #b45309;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  min-height: 100vh;
}

a { color: var(--accent); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.muted { color: var(--muted); }
.small { font-size: 0.85em; }

.mb-20 { margin-bottom: 20px; }
.mb-14 { margin-bottom: 14px; }
.mb-8 { margin-bottom: 8px; }
.flex-wrap { flex-wrap: wrap; }
.inline-form { display: inline; }

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1em;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--bg); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: var(--surface); }
.btn-danger:hover { background: #fef2f2; }
.btn-success { color: var(--success); border-color: var(--success); }
.btn-success:hover { background: #f0fdf4; }
.btn-sm { padding: 6px 12px; font-size: 0.85em; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

textarea, input[type=text] {
  width: 100%;
  font-family: inherit;
  font-size: 1.05em;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
textarea:focus, input[type=text]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.honeypot { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78em;
  font-weight: 600;
}
.badge-pending { background: #fef3c7; color: var(--warn); }
.badge-approved { background: #dcfce7; color: var(--success); }
.badge-rejected { background: #fee2e2; color: var(--danger); }
.badge-inactive { background: #e5e7eb; color: var(--muted); }
.badge-active { background: #dcfce7; color: var(--success); }
.badge-answered { background: #e0e7ff; color: #3730a3; }
.q-answered-badge { margin-right: 8px; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 0.8em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.notice {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.95em;
}
.notice-info { background: #eff6ff; color: #1e40af; }
.notice-success { background: #f0fdf4; color: #166534; }
.notice-error { background: #fef2f2; color: #991b1b; }

/* ---------- Präsentationsseite (Leinwand) ---------- */
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 48px;
}
.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}
.stage-title { font-size: 2rem; font-weight: 700; }
.qr-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  flex-shrink: 0;
}
.qr-box svg { width: 280px; height: 280px; display: block; }
.qr-box .qr-hint { font-size: 0.95em; color: var(--muted); margin-top: 10px; max-width: 280px; }
.qr-box .qr-link { font-size: 0.8em; word-break: break-all; }

.question-wall {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.question-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 1.6rem;
  line-height: 1.4;
  white-space: pre-wrap;
  animation: qa-fade-in .4s ease-out;
}
.question-item.is-answered {
  border-left-color: var(--muted);
  opacity: 0.6;
}
.question-item .q-answered-tag {
  display: inline-block;
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #ececf1;
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}
@keyframes qa-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.stage-empty { color: var(--muted); font-size: 1.4rem; margin-top: 40px; text-align: center; }

/* ---------- Moderation ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95em;
}
.tab-btn.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }

.q-list { display: flex; flex-direction: column; gap: 12px; }
.q-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.q-text { flex: 1; font-size: 1.05em; white-space: pre-wrap; word-break: break-word; }
.q-meta { font-size: 0.78em; color: var(--muted); margin-top: 4px; }
.q-actions { display: flex; gap: 8px; flex-shrink: 0; }

@media (max-width: 640px) {
  .stage { padding: 20px; }
  .stage-title { font-size: 1.4rem; }
  .question-item { font-size: 1.15rem; }
  .q-row { flex-direction: column; }
}
