/* MIRSYON — Assistent (Chatfenster) */
/* display-Angaben dürfen hidden nicht aushebeln */
.assi [hidden] { display: none !important; }
.assi { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 130;
  display: flex; flex-direction: column; align-items: flex-end; gap: .8rem;
  /* Der Container ist so hoch wie das Chatfenster — auch wenn dieses zugeklappt
     ist, denn visibility:hidden lässt den Platz stehen. Ohne diese Zeile fing
     eine unsichtbare Fläche von 390 × 560 px alle Klicks ab und machte am
     Telefon den Menü-Schalter und halbe Seiten unbedienbar. */
  pointer-events: none; }
.assi__knopf, .assi.ist-offen .assi__fenster { pointer-events: auto; }

.assi__knopf {
  display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; border: 0;
  padding: .95rem 1.4rem; border-radius: 999px; font-family: var(--font-display);
  font-size: var(--schrift-sm); font-weight: 600; color: #fff;
  background: linear-gradient(120deg, var(--akzent), #4E8BFF);
  box-shadow: 0 16px 38px -14px rgba(42, 108, 238, .95);
  transition: transform var(--tempo), box-shadow var(--tempo);
}
.assi__knopf:hover { transform: translateY(-2px); box-shadow: 0 22px 46px -16px rgba(42, 108, 238, 1); }
.assi__knopf svg { width: 18px; height: 18px; }
.assi.ist-offen .assi__knopf { transform: scale(.94); opacity: .9; }

.assi__fenster {
  width: min(390px, calc(100vw - 2rem)); height: min(560px, calc(100vh - 8rem));
  display: flex; flex-direction: column; overflow: hidden;
  background: rgba(10, 23, 40, .97); backdrop-filter: blur(18px);
  border: 1px solid var(--linie-dunkel-hell); border-radius: var(--radius-lg);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.98);
  transition: opacity var(--tempo), transform var(--tempo), visibility var(--tempo);
}
.assi.ist-offen .assi__fenster { opacity: 1; visibility: visible; transform: none; }

.assi__kopf { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--linie-dunkel); }
.assi__kopf svg.zeichen { width: 28px; height: 28px; flex: none; color: var(--hellblau); }
.assi__kopf .akzent { fill: var(--akzent); }
.assi__titel { font-family: var(--font-display); font-weight: 600; font-size: var(--schrift-sm); color: #fff; }
.assi__unter { font-size: var(--schrift-xs); color: var(--text-hell-leise); margin-top: .1rem; }
.assi__zu { margin-left: auto; background: transparent; border: 0; cursor: pointer; color: var(--text-hell-sanft);
  font-size: 1.3rem; line-height: 1; padding: .2rem .4rem; border-radius: 8px; }
.assi__zu:hover { color: #fff; background: var(--glas); }

.assi__chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.assi__liste { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; }
.assi__blase { max-width: 88%; padding: .75rem .95rem; border-radius: 14px; font-size: var(--schrift-sm); line-height: 1.55; }
.assi__blase p { margin: 0 0 .6em; }
.assi__blase p:last-child { margin: 0; }
.assi__blase--assistent { background: var(--glas-stark); border: 1px solid var(--linie-dunkel);
  color: var(--text-hell-sanft); align-self: flex-start; border-bottom-left-radius: 5px; }
.assi__blase--besucher { background: linear-gradient(120deg, var(--akzent), #4E8BFF); color: #fff;
  align-self: flex-end; border-bottom-right-radius: 5px; }
.assi__tippt { display: flex; gap: 4px; align-items: center; }
.assi__tippt span { width: 6px; height: 6px; border-radius: 50%; background: var(--hellblau);
  animation: assiPunkt 1.2s infinite ease-in-out; }
.assi__tippt span:nth-child(2) { animation-delay: .18s; }
.assi__tippt span:nth-child(3) { animation-delay: .36s; }
@keyframes assiPunkt { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .assi__tippt span { animation: none; opacity: .6; } }

.assi__vorschlaege { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.1rem .6rem; }
.assi__vorschlag { cursor: pointer; border: 1px solid var(--linie-dunkel); background: var(--glas);
  color: var(--text-hell-sanft); border-radius: 999px; padding: .4rem .8rem; font: inherit;
  font-size: var(--schrift-xs); transition: border-color var(--tempo), color var(--tempo); }
.assi__vorschlag:hover { border-color: var(--hellblau); color: #fff; }

.assi__fuss { border-top: 1px solid var(--linie-dunkel); padding: .8rem 1.1rem 1rem; }
.assi__zeile { display: flex; gap: .6rem; align-items: flex-end; }
.assi__eingabe { flex: 1; resize: none; font: inherit; font-size: var(--schrift-sm); color: var(--text-hell);
  background: rgba(6, 15, 28, .7); border: 1px solid var(--linie-dunkel); border-radius: 12px;
  padding: .7rem .9rem; max-height: 120px; }
.assi__eingabe:focus { outline: none; border-color: var(--hellblau); }
.assi__senden { flex: none; width: 42px; height: 42px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(120deg, var(--akzent), #4E8BFF); color: #fff; display: grid; place-items: center; }
.assi__senden svg { width: 17px; height: 17px; }
.assi__anfrage-start { margin-top: .6rem; width: 100%; cursor: pointer; border: 1px solid var(--linie-dunkel-hell);
  background: var(--glas); color: var(--text-hell); border-radius: 10px; padding: .6rem; font: inherit;
  font-size: var(--schrift-xs); font-family: var(--font-display); font-weight: 600; }
.assi__anfrage-start:hover { border-color: var(--hellblau); color: #fff; }
.assi__hinweis { font-size: 10px; color: var(--text-hell-leise); margin-top: .6rem; line-height: 1.5; }
.assi__hinweis a { color: var(--hellblau); }

.assi__formular { padding: 1.1rem; overflow-y: auto; display: grid; gap: .7rem; }
.assi__formular label { font-size: var(--schrift-xs); color: var(--text-hell-sanft); display: grid; gap: .25rem; }
.assi__formular input, .assi__formular textarea { font: inherit; font-size: var(--schrift-sm);
  color: var(--text-hell); background: rgba(6, 15, 28, .7); border: 1px solid var(--linie-dunkel);
  border-radius: 10px; padding: .6rem .8rem; }
.assi__formular input:focus, .assi__formular textarea:focus { outline: none; border-color: var(--hellblau); }
.assi__formular textarea { min-height: 74px; resize: vertical; }
.assi__falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.assi__knoepfe { display: flex; gap: .5rem; margin-top: .3rem; }
.assi__knoepfe button { flex: 1; cursor: pointer; border-radius: 10px; padding: .7rem; font: inherit;
  font-size: var(--schrift-xs); font-family: var(--font-display); font-weight: 600; }
.assi__zurueck { border: 1px solid var(--linie-dunkel); background: transparent; color: var(--text-hell-sanft); }
.assi__absenden { border: 0; background: linear-gradient(120deg, var(--akzent), #4E8BFF); color: #fff; }

@media (max-width: 560px) {
  .assi { right: .75rem; bottom: .75rem; left: .75rem; align-items: stretch; }
  .assi__fenster { width: 100%; height: min(74vh, 560px); }
  .assi__knopf { align-self: flex-end; }
}

/* Der Anfrageknopf tritt hervor, sobald der Assistent abgibt —
   dann ist das Ausfüllen des Protokolls der nächste sinnvolle Schritt. */
.assi__anfrage-start--hervor {
  background: linear-gradient(120deg, var(--akzent), #4E8BFF);
  color: #fff; border-color: transparent;
  box-shadow: 0 10px 26px -10px rgba(42, 108, 238, .9);
  animation: anfrage-wink 1.6s ease-in-out 2;
}
@keyframes anfrage-wink {
  0%, 100% { transform: none; }
  50%      { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) { .assi__anfrage-start--hervor { animation: none; } }
