/* Orivex — KI-Assistent (Chat-Widget). Farben folgen dem Seitendesign: Dark Obsidian, Gold-Akzent. */
.ovx-chat {
  --ovx-bg: #0f141a;
  --ovx-card: #151b23;
  --ovx-border: #2a323c;
  --ovx-text: #f7f7f7;
  --ovx-muted: #b9bec6;
  --ovx-gold: #c8a463;
  --ovx-gold-dark: #0f141a;
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  color: var(--ovx-text);
}
/* Auf der Startseite sitzt unten rechts der Sound-Knopf; der Chat rückt darüber. */
.ovx-chat[data-seite="/"] { bottom: 5.5rem; }

.ovx-chat__knopf {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1.1rem 0 0.9rem;
  border: 2px solid var(--ovx-gold);
  border-radius: 9999px;
  background: var(--ovx-gold);
  color: var(--ovx-gold-dark);
  font: 600 0.9rem/1 "Inter", ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(200, 164, 99, 0.6), 0 0 0 4px rgba(200, 164, 99, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ovx-chat__knopf:hover { transform: translateY(-1px) scale(1.03); }
.ovx-chat__knopf:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(200, 164, 99, 0.45); }
.ovx-chat--offen .ovx-chat__knopf { display: none; }

.ovx-chat__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(400px, calc(100vw - 2.5rem));
  height: min(600px, calc(100vh - 2.5rem));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(200, 164, 99, 0.35);
  border-radius: 1rem;
  background: var(--ovx-bg);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.ovx-chat__panel[hidden] { display: none; }

.ovx-chat__kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--ovx-border);
  background: var(--ovx-card);
}
.ovx-chat__titel { display: flex; flex-direction: column; gap: 0.15rem; }
.ovx-chat__titel strong { font-family: "Sora", "Inter", sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--ovx-text); }
.ovx-chat__titel span { font-size: 0.72rem; color: var(--ovx-gold); letter-spacing: 0.02em; }
.ovx-chat__schliessen {
  width: 2rem; height: 2rem;
  border: 1px solid var(--ovx-border);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ovx-muted);
  font-size: 1.3rem; line-height: 1;
  cursor: pointer;
}
.ovx-chat__schliessen:hover { color: var(--ovx-text); border-color: var(--ovx-gold); }

.ovx-chat__liste {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  scrollbar-width: thin;
  scrollbar-color: var(--ovx-border) transparent;
}
.ovx-chat__nachricht { display: flex; }
.ovx-chat__nachricht--user { justify-content: flex-end; }
.ovx-chat__blase {
  max-width: 88%;
  padding: 0.6rem 0.8rem;
  border-radius: 0.8rem;
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.ovx-chat__nachricht--assistant .ovx-chat__blase {
  background: var(--ovx-card);
  border: 1px solid var(--ovx-border);
  border-bottom-left-radius: 0.25rem;
  color: var(--ovx-text);
}
.ovx-chat__nachricht--user .ovx-chat__blase {
  background: var(--ovx-gold);
  color: var(--ovx-gold-dark);
  border-bottom-right-radius: 0.25rem;
  font-weight: 500;
}
.ovx-chat__blase p { margin: 0; }
.ovx-chat__blase p + p, .ovx-chat__blase p + ul, .ovx-chat__blase ul + p { margin-top: 0.5rem; }
.ovx-chat__blase ul { margin: 0; padding-left: 1.1rem; }
.ovx-chat__blase li { margin: 0.15rem 0; }
.ovx-chat__blase a { color: var(--ovx-gold); text-decoration: underline; text-underline-offset: 2px; }
.ovx-chat__blase strong { font-weight: 600; }

.ovx-chat__tippt { display: inline-flex; gap: 4px; padding: 0.2rem 0; }
.ovx-chat__tippt i { width: 6px; height: 6px; border-radius: 50%; background: var(--ovx-gold); opacity: 0.4; animation: ovx-tippt 1.2s infinite; }
.ovx-chat__tippt i:nth-child(2) { animation-delay: 0.2s; }
.ovx-chat__tippt i:nth-child(3) { animation-delay: 0.4s; }
@keyframes ovx-tippt { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.ovx-chat__vorschlaege { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.75rem; }
.ovx-chat__vorschlaege[hidden] { display: none; }
.ovx-chat__chip {
  border: 1px solid var(--ovx-border);
  border-radius: 9999px;
  background: transparent;
  color: var(--ovx-muted);
  font: 500 0.75rem/1.2 "Inter", sans-serif;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  text-align: left;
}
.ovx-chat__chip:hover { border-color: var(--ovx-gold); color: var(--ovx-text); }

.ovx-chat__formular {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--ovx-border);
  background: var(--ovx-card);
}
.ovx-chat__eingabe {
  flex: 1;
  resize: none;
  min-height: 2.6rem;
  max-height: 120px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--ovx-border);
  border-radius: 0.6rem;
  background: var(--ovx-bg);
  color: var(--ovx-text);
  font: 400 0.9rem/1.4 "Inter", sans-serif;
  outline: none;
}
.ovx-chat__eingabe:focus { border-color: var(--ovx-gold); box-shadow: 0 0 0 3px rgba(200, 164, 99, 0.2); }
.ovx-chat__eingabe::placeholder { color: #7c838c; }
.ovx-chat__senden {
  width: 2.6rem; height: 2.6rem;
  flex: none;
  border: none;
  border-radius: 0.6rem;
  background: var(--ovx-gold);
  color: var(--ovx-gold-dark);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ovx-chat__senden:disabled { opacity: 0.5; cursor: default; }

.ovx-chat__hinweis {
  margin: 0;
  padding: 0.45rem 1rem 0.6rem;
  font-size: 0.66rem;
  line-height: 1.4;
  color: #8a9099;
  background: var(--ovx-card);
}
.ovx-chat__hinweis a { color: var(--ovx-muted); text-decoration: underline; }

@media (max-width: 480px) {
  .ovx-chat { right: 0.75rem; bottom: 0.75rem; }
  .ovx-chat[data-seite="/"] { bottom: 4.75rem; }
  .ovx-chat__panel { width: calc(100vw - 1.5rem); height: min(620px, calc(100vh - 1.5rem)); }
}
@media (prefers-reduced-motion: reduce) {
  .ovx-chat__knopf { transition: none; }
  .ovx-chat__tippt i { animation: none; opacity: 0.8; }
}
