/* Webinar-Raum — modernes, ruhiges Design im Neelix-Stil
   Sky/Teal-Akzente, weiche Karten, klare Typo. Reduced-motion-sicher. */

.nc-webinar {
  --ncw-ink: #0f172a;
  --ncw-muted: #64748b;
  --ncw-line: rgba(15, 23, 42, 0.10);
  --ncw-sky: #0ea5e9;
  --ncw-sky-d: #0284c7;
  --ncw-green: #22c55e;
  --ncw-bg-soft: #f8fafc;
  --ncw-radius: 18px;
  --ncw-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  color: var(--ncw-ink);
  font-family: inherit;
  line-height: 1.55;
}
.nc-webinar *,
.nc-webinar *::before,
.nc-webinar *::after { box-sizing: border-box; }

/* ---------- Gate ---------- */
.ncw-gate {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.ncw-gate-card {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--ncw-line);
  border-radius: var(--ncw-radius);
  box-shadow: var(--ncw-shadow);
  padding: 38px 32px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ncw-gate-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--ncw-sky), var(--ncw-green));
}
.ncw-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--ncw-sky-d);
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 14px;
}
.ncw-gate-title { font-size: 1.6rem; margin: 0 0 8px; font-weight: 800; }
.ncw-gate-sub { color: var(--ncw-muted); margin: 0 0 22px; font-size: 0.98rem; }
.ncw-code-input {
  width: 100%;
  padding: 15px 16px;
  font-size: 1.25rem;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
  border: 2px solid var(--ncw-line);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-weight: 700;
}
.ncw-code-input:focus {
  border-color: var(--ncw-sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}
.ncw-gate-note { color: var(--ncw-muted); font-size: 0.82rem; margin: 16px 0 0; }
.ncw-error {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  margin: 14px 0 0;
}

/* ---------- Buttons ---------- */
.ncw-btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.ncw-btn:active { transform: translateY(1px); }
.ncw-btn:disabled { opacity: .6; cursor: default; }
.ncw-btn-primary {
  background: linear-gradient(135deg, var(--ncw-sky), var(--ncw-sky-d));
  color: #fff;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.30);
  margin-top: 18px;
  width: 100%;
}
.ncw-btn-primary:hover:not(:disabled) { box-shadow: 0 8px 24px rgba(2, 132, 199, 0.40); }
.ncw-btn-ghost {
  background: var(--ncw-bg-soft);
  color: var(--ncw-ink);
  border: 1px solid var(--ncw-line);
}
.ncw-btn-ghost:hover { background: #eef2f7; }
.ncw-btn-toggle {
  background: var(--ncw-bg-soft);
  color: var(--ncw-ink);
  border: 1px solid var(--ncw-line);
}
.ncw-btn-toggle.is-on {
  background: linear-gradient(135deg, var(--ncw-green), #16a34a);
  color: #fff; border-color: transparent;
}

/* ---------- Raum ---------- */
.ncw-room {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 20px 16px 60px;
}
.ncw-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.ncw-title { font-size: 1.5rem; margin: 0; font-weight: 800; }
.ncw-subtitle { margin: 4px 0 0; color: var(--ncw-muted); font-size: 0.95rem; }
.ncw-you {
  background: rgba(14, 165, 233, 0.10);
  color: var(--ncw-sky-d);
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem; font-weight: 700;
  white-space: nowrap;
}

.ncw-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .ncw-grid { grid-template-columns: 1fr; }
}

/* ---------- Video ---------- */
.ncw-stage { min-width: 0; }
.ncw-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1220;
  border-radius: var(--ncw-radius);
  overflow: hidden;
  box-shadow: var(--ncw-shadow);
}
.ncw-video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.ncw-video-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center; color: #cbd5e1; padding: 24px;
}
.ncw-video-ph p { margin: 0; max-width: 340px; font-size: 0.95rem; }
.ncw-video-ph-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: ncw-pulse 1.8s infinite;
}
@keyframes ncw-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ---------- Chat ---------- */
.ncw-chat {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--ncw-line);
  border-radius: var(--ncw-radius);
  box-shadow: var(--ncw-shadow);
  overflow: hidden;
  height: min(70vh, 640px);
}
@media (max-width: 900px) { .ncw-chat { height: 60vh; } }
.ncw-chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ncw-line);
  background: var(--ncw-bg-soft);
}
.ncw-chat-title { font-weight: 800; font-size: 1rem; }
.ncw-pill {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(100, 116, 139, 0.14); color: var(--ncw-muted);
}
.ncw-pill.is-open {
  background: rgba(34, 197, 94, 0.15); color: #15803d;
}

.ncw-log-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.ncw-log {
  flex: 1; overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex; flex-direction: column; gap: 10px;
}
.ncw-empty {
  margin: auto; text-align: center; color: var(--ncw-muted);
  font-size: 0.88rem; max-width: 260px; padding: 20px;
}
.ncw-jump {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  background: var(--ncw-sky-d); color: #fff; border: 0;
  border-radius: 999px; padding: 7px 16px; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 14px rgba(2,132,199,0.4);
}
.ncw-msg {
  display: flex; gap: 10px; align-items: flex-start;
  animation: ncw-fade-in .22s ease both;
}
@keyframes ncw-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.ncw-avatar {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em;
  margin-top: 2px;
}
.ncw-msg.is-host .ncw-avatar {
  background: linear-gradient(135deg, var(--ncw-green), #16a34a) !important;
}
.ncw-msg-main {
  flex: 1; min-width: 0;
  background: var(--ncw-bg-soft);
  border: 1px solid var(--ncw-line);
  border-radius: 12px;
  padding: 9px 12px;
}
.ncw-msg.is-host .ncw-msg-main {
  background: linear-gradient(135deg, rgba(14,165,233,0.08), rgba(34,197,94,0.06));
  border-color: rgba(14, 165, 233, 0.28);
}
.ncw-msg-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 3px;
}
.ncw-msg-name { font-weight: 700; font-size: 0.82rem; color: var(--ncw-sky-d); }
.ncw-msg.is-host .ncw-msg-name { color: #15803d; }
.ncw-msg-time { font-size: 0.72rem; color: var(--ncw-muted); }
.ncw-msg-del {
  margin-left: auto; background: none; border: 0; cursor: pointer;
  color: #b91c1c; font-size: 0.72rem; font-weight: 700; padding: 0;
}
.ncw-msg-body { font-size: 0.92rem; white-space: pre-wrap; word-break: break-word; }

.ncw-composer {
  display: flex; gap: 8px; padding: 12px; align-items: stretch;
  border-top: 1px solid var(--ncw-line);
}
.ncw-input-wrap { position: relative; flex: 1; display: flex; }
.ncw-counter {
  position: absolute; right: 8px; bottom: 6px;
  font-size: 0.68rem; color: var(--ncw-muted); pointer-events: none;
}
.ncw-counter.is-low { color: #b91c1c; font-weight: 700; }
.ncw-input {
  flex: 1; resize: none;
  border: 1px solid var(--ncw-line); border-radius: 10px;
  padding: 10px 12px 18px; font-family: inherit; font-size: 0.92rem;
  outline: none;
}
.ncw-input:focus { border-color: var(--ncw-sky); box-shadow: 0 0 0 3px rgba(14,165,233,0.14); }
.ncw-send { margin: 0; width: auto; padding: 10px 18px; align-self: stretch; }
.ncw-closed-note {
  padding: 12px 16px; text-align: center;
  color: var(--ncw-muted); font-size: 0.85rem;
  border-top: 1px solid var(--ncw-line); background: var(--ncw-bg-soft);
}

/* ---------- Host-Panel ---------- */
.ncw-host {
  margin-top: 20px;
  border: 1px dashed rgba(14, 165, 233, 0.4);
  border-radius: var(--ncw-radius);
  padding: 18px;
  background: rgba(14, 165, 233, 0.03);
}
.ncw-host-title { font-weight: 800; margin-bottom: 14px; font-size: 0.95rem; }
.ncw-host-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.ncw-host-field {
  flex: 1; min-width: 220px;
  border: 1px solid var(--ncw-line); border-radius: 10px;
  padding: 11px 12px; font-family: inherit; font-size: 0.9rem; outline: none;
}
.ncw-host-field:focus { border-color: var(--ncw-sky); box-shadow: 0 0 0 3px rgba(14,165,233,0.14); }
.ncw-host-row .ncw-btn { margin-top: 0; width: auto; }
.ncw-host-codes { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.ncw-code-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; }
.ncw-code-label { color: var(--ncw-muted); }
.ncw-code-val {
  background: #0f172a; color: #fff;
  padding: 3px 10px; border-radius: 8px;
  font-size: 1rem; letter-spacing: 0.18em; font-weight: 700;
}

/* ---------- Kopf rechts: Anwesenheit ---------- */
.ncw-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ncw-presence {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #15803d; border-radius: 999px; padding: 7px 13px;
  font-size: 0.82rem; font-weight: 700;
}
.ncw-presence-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6); animation: ncw-pulse-sm 2s infinite;
}
.ncw-presence-num { font-variant-numeric: tabular-nums; }
.ncw-presence-lbl { font-weight: 600; opacity: .85; }
@keyframes ncw-pulse-sm {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ---------- Reconnect-Banner ---------- */
.ncw-reconnect {
  background: #fef3c7; color: #92400e;
  border: 1px solid #fcd34d; border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px;
  font-size: 0.88rem; font-weight: 600; text-align: center;
}

/* ---------- LIVE-Badge ---------- */
.ncw-stage { position: relative; }
.ncw-live-badge {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  background: #ef4444; color: #fff;
  padding: 6px 12px; border-radius: 8px;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em;
  box-shadow: 0 4px 14px rgba(239,68,68,0.4);
}
.ncw-live-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  animation: ncw-blink 1.4s infinite;
}
@keyframes ncw-blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- Angepinnte Nachricht ---------- */
.ncw-pin {
  display: flex; align-items: flex-start; gap: 8px;
  background: linear-gradient(135deg, rgba(14,165,233,0.10), rgba(34,197,94,0.08));
  border-bottom: 1px solid rgba(14,165,233,0.22);
  padding: 11px 14px; font-size: 0.88rem;
}
.ncw-pin-icon { flex: 0 0 auto; }
.ncw-pin-text { font-weight: 600; color: #0f172a; word-break: break-word; }

/* ---------- Handy-Umschalter (nur < 900px) ---------- */
.ncw-tabs { display: none; }
.ncw-tab {
  flex: 1; border: 1px solid var(--ncw-line); background: #fff;
  padding: 11px; font-weight: 700; font-size: 0.92rem; cursor: pointer;
  color: var(--ncw-muted); position: relative;
}
.ncw-tab:first-child { border-radius: 12px 0 0 12px; }
.ncw-tab:last-child { border-radius: 0 12px 12px 0; border-left: 0; }
.ncw-tab.is-active {
  background: linear-gradient(135deg, var(--ncw-sky), var(--ncw-sky-d));
  color: #fff; border-color: transparent;
}
.ncw-tab-badge {
  display: inline-block; margin-left: 6px;
  background: #ef4444; color: #fff; border-radius: 999px;
  font-size: 0.68rem; padding: 1px 7px; font-weight: 800; vertical-align: middle;
}
@media (max-width: 900px) {
  .ncw-tabs { display: flex; margin-bottom: 14px; }
  .ncw-grid.ncw-show-video .ncw-chat { display: none; }
  .ncw-grid.ncw-show-chat .ncw-stage { display: none; }
  .ncw-grid.ncw-show-chat .ncw-chat { height: 68vh; }
}

/* ---------- Feedback-Karte ---------- */
.ncw-feedback {
  margin-top: 22px;
  background: #fff;
  border: 1px solid var(--ncw-line);
  border-radius: var(--ncw-radius);
  box-shadow: var(--ncw-shadow);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
}
.ncw-feedback::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--ncw-green), var(--ncw-sky));
}
.ncw-fb-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.ncw-fb-sub { color: var(--ncw-muted); font-size: 0.9rem; margin: 0 0 18px; }
.ncw-fb-form { display: flex; flex-direction: column; }
.ncw-fb-label {
  font-weight: 700; font-size: 0.9rem; margin: 14px 0 8px;
}
.ncw-fb-scale { display: flex; gap: 8px; flex-wrap: wrap; }
.ncw-fb-face {
  flex: 1 1 84px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--ncw-bg-soft);
  border: 2px solid var(--ncw-line); border-radius: 12px;
  padding: 10px 6px; cursor: pointer;
  transition: border-color .12s ease, transform .12s ease, background .12s ease;
}
.ncw-fb-face:hover { transform: translateY(-2px); }
.ncw-fb-face.is-on {
  border-color: var(--ncw-green);
  background: rgba(34,197,94,0.08);
}
.ncw-fb-emoji { font-size: 1.5rem; line-height: 1; }
.ncw-fb-facelbl { font-size: 0.72rem; color: var(--ncw-muted); font-weight: 600; }
.ncw-fb-text, .ncw-fb-input {
  border: 1px solid var(--ncw-line); border-radius: 10px;
  padding: 11px 12px; font-family: inherit; font-size: 0.92rem;
  outline: none; resize: vertical; width: 100%;
}
.ncw-fb-text:focus, .ncw-fb-input:focus {
  border-color: var(--ncw-sky); box-shadow: 0 0 0 3px rgba(14,165,233,0.14);
}
.ncw-feedback.is-done { text-align: center; padding: 40px 22px; }
.ncw-fb-thanks-emoji { font-size: 2.6rem; margin-bottom: 8px; }
.ncw-host-fbcount {
  margin: 10px 0 4px; font-size: 0.86rem; font-weight: 700; color: var(--ncw-sky-d);
}

/* ---------- Host: neue Buttons ---------- */
.ncw-btn-toggle.is-on {
  background: linear-gradient(135deg, var(--ncw-green), #16a34a);
  color: #fff; border-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .ncw-video-ph-dot, .ncw-presence-dot, .ncw-live-pulse { animation: none; }
  .ncw-msg { animation: none; }
  .ncw-btn, .ncw-code-input, .ncw-input { transition: none; }
}
