/* =====================================================================
   AirLST · Live-Chat-Widget
   Eigener Chat, unten rechts. Kein Skript und keine Schrift von Dritten;
   Farben und Radien folgen der Website.
   ===================================================================== */

.alc-launch {
  position: fixed; right: calc(22px + var(--gutter, 0px)); bottom: 22px; z-index: 9000;
  width: 56px; height: 56px; border-radius: 50%;
  background: #7531AE; color: #fff; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(28, 20, 55, .28);
  transition: transform .15s ease, background .15s ease;
}
@media (hover: hover) { .alc-launch:hover { background: #5d2489; transform: translateY(-2px); } }
.alc-launch svg { width: 26px; height: 26px; display: block; }
.alc-launch .alc-dot {
  position: absolute; top: -2px; right: -2px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: #DC2626; color: #fff; font: 700 11px/19px var(--font-sans);
  text-align: center; border: 2px solid #fff;
}

.alc-panel {
  position: fixed; right: calc(22px + var(--gutter, 0px)); bottom: 90px; z-index: 9000;
  width: 370px; max-width: calc(100vw - 32px);
  /* dvh: sichtbare Hoehe ohne die ein- und ausfahrende Browserleiste (iOS/Android), vh als Fallback */
  height: 540px; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px);
  background: #fff; border: 1px solid #E5E7EB; border-radius: 16px;
  box-shadow: 0 18px 48px rgba(28, 20, 55, .22);
  display: none; flex-direction: column; overflow: hidden;
  font-family: var(--font-sans);
  color: #111827;
}
.alc-panel.is-open { display: flex; }

.alc-head {
  background: #1C1437; color: #fff; padding: 16px 18px 14px;
  display: flex; align-items: center; gap: 12px;
}
.alc-head-txt { flex: 1; min-width: 0; }
.alc-head-txt strong { display: block; font-size: 14.5px; }
.alc-head-txt span { display: block; font-size: 12px; font-family: var(--font-micro); opacity: .75; margin-top: 1px; }
.alc-close {
  background: none; border: 0; color: #fff; opacity: .7; cursor: pointer;
  font-size: 22px; line-height: 1; padding: 4px;
}
.alc-close:hover { opacity: 1; }

.alc-body { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: #F9FAFB; }
.alc-msg { max-width: 82%; margin: 0 0 10px; padding: 9px 13px; border-radius: 13px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.alc-msg a { color: inherit; text-decoration: underline; }
.alc-msg--in  { background: #fff; border: 1px solid #E5E7EB; border-bottom-left-radius: 4px; }
.alc-msg--out { background: #7531AE; color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.alc-meta { font-size: 10.5px; font-family: var(--font-micro); color: #9CA3AF; margin: -6px 0 10px 4px; }
.alc-msg--out + .alc-meta { text-align: right; margin-right: 4px; }
.alc-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.alc-typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #9CA3AF; animation: alcty 1.1s infinite; }
.alc-typing span:nth-child(2) { animation-delay: .18s; }
.alc-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes alcty { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.alc-foot { border-top: 1px solid #E5E7EB; background: #fff; padding: 10px 12px 8px; }
.alc-row { display: flex; gap: 8px; align-items: flex-end; }
.alc-input {
  flex: 1; resize: none; border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 9px 12px; font: 13.5px/1.45 var(--font-sans);
  max-height: 92px; outline: none; color: #111827; background: #fff;
}
.alc-input:focus { border-color: #7531AE; }
.alc-send {
  width: 38px; height: 38px; border-radius: 10px; border: 0; cursor: pointer;
  background: #7531AE; color: #fff; display: flex; align-items: center; justify-content: center;
  flex: none;
}
.alc-send:disabled { opacity: .45; cursor: default; }
.alc-send svg { width: 17px; height: 17px; }
.alc-note { font-size: 10.5px; line-height: 1.45; font-family: var(--font-micro); color: #6B7280; text-align: center; margin: 7px 0 0; }
.alc-note a { color: inherit; text-decoration: underline; }

@media (max-width: 480px) {
  .alc-panel { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); height: 70vh; height: 70dvh; }
  .alc-launch { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ---- Avatar, Tabs und Martin-Ansicht -------------------------------- */
.alc-launch { overflow: visible; padding: 0; }
.alc-launch-img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; border: 3px solid #7531AE; box-sizing: border-box; }

.alc-ava { position: relative; width: 38px; height: 38px; flex: none; }
.alc-ava img { width: 38px; height: 38px; border-radius: 50%; object-fit: contain; display: block; background: #fff; padding: 5px; box-sizing: border-box; }
.alc-status {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #9CA3AF; border: 2px solid #1C1437; box-sizing: content-box;
}
.alc-ava .alc-status { position: absolute; right: -1px; bottom: -1px; }
.alc-status.is-on { background: #22C55E; }

.alc-tabs { display: flex; border-bottom: 1px solid #E5E7EB; background: #fff; }
.alc-tab {
  flex: 1; appearance: none; background: none; border: 0; cursor: pointer;
  font: 600 13px/1 var(--font-sans); color: #6B7280;
  padding: 12px 6px 11px; border-bottom: 2.5px solid transparent;
}
.alc-tab.is-on { color: #7531AE; border-bottom-color: #7531AE; }

.alc-line { display: flex; align-items: flex-end; gap: 8px; }
.alc-line--out { justify-content: flex-end; }
.alc-mini { width: 24px; height: 24px; border-radius: 50%; object-fit: contain; flex: none; margin-bottom: 10px; background: #fff; padding: 3px; box-sizing: border-box; border: 1px solid #E5E7EB; }
.alc-line .alc-msg { margin-bottom: 10px; }
.alc-meta--out { text-align: right; margin-right: 4px; }

.alc-martin {
  display: none; flex: 1; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 24px; text-align: center;
  background: #F9FAFB;
}
.alc-martin-img { width: 96px; height: 96px; border-radius: 50%; object-fit: contain; background: #fff; padding: 18px; box-sizing: border-box; box-shadow: 0 6px 18px rgba(28,20,55,.18); }
.alc-martin strong { font-size: 15.5px; }
.alc-martin-state { font-size: 12.5px; font-family: var(--font-micro); color: #6B7280; display: inline-flex; align-items: center; gap: 7px; }
.alc-martin-state .alc-status { border-color: #F9FAFB; }
.alc-martin-actions { margin-top: 6px; }
.alc-cta {
  display: inline-block; background: #7531AE; color: #fff !important; text-decoration: none;
  font: 600 13.5px/1 var(--font-sans);
  padding: 12px 18px; border-radius: 10px;
}
.alc-cta:hover { background: #5d2489; }
.alc-martin-hint { font-size: 12px; font-family: var(--font-micro); color: #6B7280; line-height: 1.55; margin: 4px 0 0; max-width: 270px; }
.alc-martin-hint a { color: #7531AE; }

/* Die Website legt teils Farbeffekte auf Bilder; die Chat-Fotos bleiben echt. */
.alc-launch-img, .alc-ava img, .alc-mini, .alc-martin-img {
  filter: none !important; mix-blend-mode: normal !important; opacity: 1 !important;
}

/* Starter erscheint nach dem Laden: sanft einblenden */
.alc-launch { animation: alcLaunchIn .5s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes alcLaunchIn { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .alc-launch { animation: none; } }

/* Starter mit illustrativem Icon (Design System) statt Foto: violette Kachel mit leichtem Verlauf */
.alc-launch:has(.alc-launch-illu) {
  background: linear-gradient(150deg, var(--ds-color-violet-400) 0%, var(--ds-color-violet-700) 100%);
  border: 2px solid var(--ds-color-violet-100);
}
.alc-launch:has(.alc-launch-illu):hover { background: linear-gradient(150deg, var(--ds-color-violet-500) 0%, var(--ds-color-violet-800) 100%); }
.alc-launch-illu { width: 34px; height: 34px; display: block; }
[data-theme="dark"] .alc-launch:has(.alc-launch-illu) { border-color: var(--ds-color-violet-d300); }
/* iOS zoomt beim Fokus in Felder unter 16px; auf Touch-Breiten deshalb 16px */
@media (max-width: 760px) { .alc-input { font-size: 16px; } }
