/* df6ax.de – Funk-Assistent (Chat-Widget). Nutzt die Farbtoken aus site.css. */

/* --- Startknopf: "auf Sendung"-Antenne mit Wellen, KI-Kennzeichnung --- */
.fa-launch {
  position: fixed; right: 18px; bottom: 18px; z-index: 900;
  display: inline-flex; align-items: center; gap: 11px;
  padding: 8px 10px 8px 8px; border-radius: 999px;
  background: var(--panel-2); color: var(--text);
  border: 1.5px solid var(--dial); cursor: pointer; text-align: left;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .38), 0 0 0 5px var(--dial-glow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.fa-launch:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .42), 0 0 0 7px var(--dial-glow); }
.fa-launch:active { transform: translateY(0); }
.fa-launch[aria-expanded="true"] { display: none; }
.fa-ant-wrap {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--dial); color: #1a1205;
}
.fa-ant-wrap::after {          /* Sende-Puls */
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--dial); opacity: 0; animation: fa-pulse 2.4s ease-out infinite;
}
.fa-ant .w1, .fa-ant .w2 { animation: fa-wave 2.4s ease-in-out infinite; }
.fa-ant .w2 { animation-delay: .35s; }
@keyframes fa-wave { 0%, 100% { opacity: .35; } 30% { opacity: 1; } }
@keyframes fa-pulse { 0% { transform: scale(1); opacity: .75; } 70%, 100% { transform: scale(1.45); opacity: 0; } }
.fa-label { display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.fa-label b { font: 700 16px/1.05 var(--font-head); letter-spacing: .02em; }
.fa-label small { font: 400 12.5px/1.2 var(--font); color: var(--muted); }
.fa-ki {
  display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .06em;
  color: var(--dial); border: 1.5px solid var(--dial); border-radius: 4px; padding: 3px 4px 2px;
  vertical-align: middle;
}
.fa-launch > .fa-ki { align-self: flex-start; margin-top: 2px; }

/* --- Einladungs-Sprechblase --- */
.fa-teaser {
  position: fixed; right: 18px; bottom: 86px; z-index: 900; width: min(290px, calc(100vw - 36px));
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35); padding: 12px 34px 12px 14px;
  animation: fa-pop .28s ease-out;
}
.fa-teaser::after {
  content: ""; position: absolute; right: 36px; bottom: -7px; width: 12px; height: 12px;
  background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg);
}
.fa-teaser p { margin: 0; font-size: 14px; line-height: 1.45; cursor: pointer; }
.fa-teaser-x {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: 0; background: transparent;
  color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; border-radius: var(--r-s);
}
.fa-teaser-x:hover { color: var(--text); }
@keyframes fa-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- Einwilligung --- */
.fa-consent { flex: 1; overflow-y: auto; padding: 16px 16px 12px; font-size: 14.5px; line-height: 1.5; }
.fa-consent-kicker { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.fa-consent h3 { margin: 0 0 10px; font: 700 20px/1.15 var(--font-head); }
.fa-consent ul { margin: 0 0 12px; padding-left: 1.15em; }
.fa-consent li { margin: 0 0 .55em; }
.fa-consent a { color: var(--link); }
.fa-consent-more { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.fa-consent-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  position: sticky; bottom: -12px; margin: 0 -16px -12px; padding: 10px 16px 12px;
  background: var(--panel); border-top: 1px solid var(--line);
}
.fa-btn-primary, .fa-btn-ghost {
  font: 600 15px/1 var(--font-head); letter-spacing: .02em; padding: 12px 16px; border-radius: var(--r-s); cursor: pointer;
}
.fa-btn-primary { flex: 1 1 auto; background: var(--dial); color: #1a1205; border: 1px solid var(--dial); }
.fa-btn-primary:hover { filter: brightness(1.07); }
.fa-btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.fa-btn-ghost:hover { border-color: var(--muted); }
.fa-link { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.fa-link:hover { color: var(--text); }

.fa-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 901;
  width: min(410px, calc(100vw - 32px)); height: min(640px, calc(100dvh - 36px));
  display: flex; flex-direction: column;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.fa-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2);
}
.fa-head .fa-plate {
  font: 700 13px/1 var(--mono); color: #1a1205; background: var(--dial);
  padding: 4px 6px; border-radius: 4px; letter-spacing: .04em;
}
.fa-head h2 { margin: 0; font: 700 17px/1.1 var(--font-head); flex: 1; }
.fa-head h2 small { display: block; font: 400 12px/1.3 var(--font); color: var(--muted); margin-top: 2px; }
.fa-icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none;
  background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: var(--r-s); cursor: pointer;
}
.fa-icon-btn:hover { color: var(--text); border-color: var(--line); }

.fa-log {
  flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  overscroll-behavior: contain;
}
.fa-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.fa-msg p { margin: 0 0 .55em; }
.fa-msg p:last-child, .fa-msg ul:last-child, .fa-msg ol:last-child { margin-bottom: 0; }
.fa-msg ul, .fa-msg ol { margin: 0 0 .55em; padding-left: 1.2em; }
.fa-msg li { margin: .15em 0; }
.fa-msg code { font: 13px/1.4 var(--mono); background: var(--ink); padding: 1px 4px; border-radius: 4px; }
.fa-msg pre { margin: 0 0 .55em; padding: 8px 10px; background: var(--ink); border-radius: var(--r-s); overflow-x: auto; }
.fa-msg pre code { background: none; padding: 0; }
.fa-msg a { color: var(--link); }
.fa-bot { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 4px; }
.fa-user { align-self: flex-end; background: var(--dial-glow); border: 1px solid var(--dial); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.fa-err { align-self: stretch; max-width: none; color: var(--err); border: 1px solid var(--err); background: transparent; font-size: 14px; }

.fa-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.fa-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--dial); opacity: .3; animation: fa-blink 1.2s infinite; }
.fa-typing i:nth-child(2) { animation-delay: .2s; }
.fa-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes fa-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.fa-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.fa-suggest button {
  font: 500 13px/1.2 var(--font); color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; cursor: pointer; text-align: left;
}
.fa-suggest button:hover { border-color: var(--dial); }

.fa-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--panel); }
.fa-form textarea {
  flex: 1; resize: none; min-height: 42px; max-height: 130px;
  font: 400 15px/1.4 var(--font); color: var(--text); background: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 11px;
}
.fa-form textarea:focus { outline: none; border-color: var(--dial); }
.fa-send {
  flex: none; width: 44px; border: 0; border-radius: var(--r-s); cursor: pointer;
  background: var(--dial); color: #1a1205; display: grid; place-items: center;
}
.fa-send:disabled { opacity: .45; cursor: default; }
.fa-note { margin: 0; padding: 0 12px 9px; font-size: 11.5px; line-height: 1.35; color: var(--dim); background: var(--panel); }
.fa-note a { color: var(--muted); }

@media (max-width: 520px) {
  .site-foot { padding-bottom: 96px; }   /* Footer-Links nicht unter dem Startknopf verstecken */
  .fa-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .fa-launch { right: 12px; bottom: 12px; gap: 8px; }
  .fa-label small { display: none; }
  .fa-teaser { right: 12px; bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  .fa-typing i, .fa-ant .w1, .fa-ant .w2, .fa-ant-wrap::after, .fa-teaser { animation: none; }
  .fa-typing i { opacity: .7; }
  .fa-launch, .fa-launch:hover { transition: none; transform: none; }
}
/* auch am PC: letzter Footer-Inhalt bleibt frei vom Startknopf */
.site-foot { padding-bottom: 88px; }
@media print { .fa-launch, .fa-panel, .fa-teaser { display: none !important; } }
