/*
  Der Danisman-Assistent - Knopf unten rechts und sein Fenster.

  Der Assistent ist noch nicht freigeschaltet. Das Fenster laesst sich
  trotzdem oeffnen: es sagt, dass er kommt, und bietet bis dahin die Wege an,
  die heute schon funktionieren - Telefon, WhatsApp, E-Mail.

  Farben aus dem Bestand: das Gruen der Marke (#82ae46) und der dunkle Grund
  der Management-Seite (#23312a), damit der Knopf zur Navigation passt.
*/

.assistent {
  --as-gruen: #82ae46;
  --as-gruen-dunkel: #6b9336;
  --as-grund: #23312a;
  --as-hell: #b7d986;
  --as-flaeche: #ffffff;
  --as-text: #1d2520;
  --as-leise: #5f6b62;
  --as-linie: #e3e8df;
  --as-blase: #f2f6ee;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1040;
  font-family: "Poppins", Arial, sans-serif;
}

/* ---------- Der Knopf ---------- */

.assistent__knopf {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--as-grund);
  color: var(--as-hell);
  box-shadow: 0 10px 28px rgba(20, 30, 24, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, background 0.18s ease;
}

.assistent__knopf:hover { transform: translateY(-2px); background: #1a241e; }

.assistent__knopf:focus-visible {
  outline: 3px solid var(--as-gruen);
  outline-offset: 3px;
}

.assistent__knopf svg { width: 30px; height: 30px; }

/* Der gruene Punkt: "hier kommt etwas" - dasselbe Zeichen wie beim
   Beta-Hinweis von Management in der Navigation. */
.assistent__knopf::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--as-gruen);
  border: 2px solid var(--as-grund);
}

.assistent--offen .assistent__knopf::after { display: none; }

/* ---------- Das Fenster ---------- */

.assistent__fenster {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 360px;
  max-width: calc(100vw - 40px);
  max-height: min(560px, calc(100vh - 120px));
  background: var(--as-flaeche);
  color: var(--as-text);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(20, 30, 24, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: assistent-auf 0.2s ease-out;
}

.assistent__fenster[hidden] { display: none; }

@keyframes assistent-auf {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.assistent__kopf {
  background: var(--as-grund);
  color: #fff;
  padding: 16px 16px 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.assistent__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(183, 217, 134, 0.16);
  color: var(--as-hell);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.assistent__avatar svg { width: 22px; height: 22px; }

.assistent__titel { flex: 1; min-width: 0; }

.assistent__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.assistent__status {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--as-hell);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.assistent__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9a441;   /* bernstein: nicht offline, aber noch nicht da */
}

.assistent__zu {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.assistent__zu:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.assistent__zu:focus-visible { outline: 2px solid var(--as-hell); outline-offset: 1px; }
.assistent__zu svg { width: 18px; height: 18px; }

/* ---------- Der Verlauf ---------- */

.assistent__verlauf {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fbfcfa;
}

.assistent__blase {
  align-self: flex-start;
  max-width: 88%;
  background: var(--as-blase);
  border: 1px solid var(--as-linie);
  border-radius: 4px 14px 14px 14px;
  padding: 11px 13px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--as-text);
}

.assistent__blase p { margin: 0; }
.assistent__blase p + p { margin-top: 6px; }
.assistent__blase strong { color: var(--as-grund); font-weight: 600; }

.assistent__wege {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 6px;
}

.assistent__weg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--as-linie);
  background: #fff;
  color: var(--as-grund);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.assistent__weg:hover {
  border-color: var(--as-gruen);
  background: var(--as-blase);
  color: var(--as-grund);
  text-decoration: none;
}

.assistent__weg:focus-visible { outline: 2px solid var(--as-gruen); outline-offset: 2px; }
.assistent__weg svg { width: 15px; height: 15px; flex: none; }

/* ---------- Die Eingabe - sichtbar, aber noch zu ---------- */

.assistent__eingabe {
  border-top: 1px solid var(--as-linie);
  padding: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
}

.assistent__feld {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--as-linie);
  border-radius: 999px;
  padding: 10px 15px;
  font: inherit;
  font-size: 14px;
  color: var(--as-leise);
  background: #f5f7f3;
  cursor: not-allowed;
}

.assistent__feld::placeholder { color: #8a948c; }

.assistent__senden {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #d5dccf;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  flex: none;
}

.assistent__senden svg { width: 18px; height: 18px; }

.assistent__fuss {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 11px;
  color: var(--as-leise);
  text-align: center;
  background: #fff;
}

/* ---------- Telefon ---------- */

@media (max-width: 575.98px) {
  .assistent { right: 14px; bottom: 14px; }
  .assistent__knopf { width: 56px; height: 56px; }
  .assistent__fenster {
    position: fixed;
    right: 10px;
    left: 10px;
    bottom: 82px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 110px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .assistent__fenster { animation: none; }
  .assistent__knopf { transition: none; }
}
