/* ─── Seidenhaut Chat-Widget ───────────────────────────────────── */
:root {
  --chat-gold: #C9A84C;
  --chat-gold-light: #E2C67A;
  --chat-bg: #161310;
  --chat-surface: #1f1b15;
  --chat-line: rgba(201, 168, 76, 0.22);
}

/* Schwebender Chat-Button (fügt sich in die .fab-stack ein) */
.chat-fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #b8902f, var(--chat-gold) 45%, var(--chat-gold-light));
  box-shadow: 0 6px 22px rgba(201, 168, 76, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: chatFabIn 0.8s 0.9s ease both;
}
.chat-fab:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 30px rgba(201, 168, 76, 0.55);
}
.chat-fab svg { width: 26px; height: 26px; stroke: #100d08; fill: none; }
@keyframes chatFabIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* kleiner Hinweis-Punkt */
.chat-fab .chat-dot {
  position: absolute; top: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #25D366; border: 2px solid var(--chat-bg);
}

/* Chat-Fenster */
.chat-panel {
  position: fixed;
  right: 2rem;
  bottom: 6.5rem;
  width: 370px;
  max-width: calc(100vw - 2rem);
  height: 560px;
  max-height: calc(100vh - 8rem);
  background: var(--chat-bg);
  border: 1px solid var(--chat-line);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 60;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: 'Montserrat', sans-serif;
}
.chat-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* Kopfzeile */
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #221c14, #2c2417);
  border-bottom: 1px solid var(--chat-line);
}
.chat-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-gold), var(--chat-gold-light));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 600; font-size: 1.7rem; color: #161310;
  flex-shrink: 0;
}
.chat-head-info { flex: 1; min-width: 0; }
.chat-head-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 600; color: #f3ead4; line-height: 1.1;
}
.chat-head-status {
  font-size: 0.68rem; color: #9d9483; letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 0.35rem;
}
.chat-head-status::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #25D366; box-shadow: 0 0 6px #25D366;
}
.chat-close {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: #b7ad97; border-radius: 8px; transition: background 0.2s, color 0.2s;
}
.chat-close:hover { background: rgba(255,255,255,0.06); color: #fff; }
.chat-close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }

/* Nachrichtenbereich */
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  scrollbar-width: thin;
  scrollbar-color: var(--chat-line) transparent;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--chat-line); border-radius: 3px; }

.chat-msg {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  animation: msgIn 0.3s ease both;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.chat-msg.bot {
  align-self: flex-start;
  background: var(--chat-surface);
  border: 1px solid var(--chat-line);
  color: #e9e0cd;
  border-bottom-left-radius: 5px;
}
.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--chat-gold), var(--chat-gold-light));
  color: #161310;
  font-weight: 500;
  border-bottom-right-radius: 5px;
}

/* Tipp-Indikator */
.chat-typing { align-self: flex-start; display: flex; gap: 4px; padding: 0.8rem 0.95rem;
  background: var(--chat-surface); border: 1px solid var(--chat-line);
  border-radius: 16px; border-bottom-left-radius: 5px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--chat-gold);
  opacity: 0.5; animation: typing 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Schnellauswahl-Chips */
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1.1rem 0.6rem; }
.chat-chip {
  font-family: 'Montserrat', sans-serif; font-size: 0.72rem; color: var(--chat-gold-light);
  background: rgba(201, 168, 76, 0.08); border: 1px solid var(--chat-line);
  border-radius: 2rem; padding: 0.4rem 0.8rem; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.chat-chip:hover { background: rgba(201, 168, 76, 0.18); color: #fff; }

/* Eingabezeile */
.chat-input-row {
  display: flex; align-items: flex-end; gap: 0.5rem;
  padding: 0.75rem 0.85rem; border-top: 1px solid var(--chat-line);
  background: #14110c;
}
.chat-input {
  flex: 1; resize: none; border: 1px solid var(--chat-line);
  background: #1d1913; color: #f0e7d3; border-radius: 14px;
  padding: 0.6rem 0.8rem; font-family: 'Montserrat', sans-serif; font-size: 0.85rem;
  line-height: 1.4; max-height: 100px; outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--chat-gold); }
.chat-input::placeholder { color: #7d7565; }
.chat-send {
  width: 42px; height: 42px; flex-shrink: 0; border: none; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--chat-gold), var(--chat-gold-light));
  transition: transform 0.2s, opacity 0.2s;
}
.chat-send:hover { transform: scale(1.07); }
.chat-send:disabled { opacity: 0.45; cursor: default; transform: none; }
.chat-send svg { width: 19px; height: 19px; stroke: #161310; fill: none; }

.chat-foot { text-align: center; font-size: 0.62rem; color: #6b6456; padding: 0 0 0.55rem; }

@media (max-width: 560px) {
  .chat-panel { right: 1rem; left: 1rem; width: auto; bottom: 6rem; height: 70vh; }
}

/* ─── Chat-Teaser: meldet sich nach kurzer Zeit ──────────────────── */
.chat-teaser{
  position: fixed; right: 1.9rem; bottom: 7.2rem; z-index: 59;
  display: flex; align-items: center; gap: .65rem; max-width: 235px;
  background: #ffffff; border: 1px solid rgba(201,168,76,.28);
  border-radius: 16px; padding: .7rem .95rem .7rem .7rem;
  box-shadow: 0 16px 38px rgba(120,100,60,.22);
  font-family: 'Montserrat', sans-serif; cursor: pointer;
  opacity: 0; transform: translateY(12px) scale(.94); pointer-events: none;
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,1,.3,1);
}
.chat-teaser.show{ opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
  animation: teaserBob 3.4s ease-in-out 1.2s infinite; }
@keyframes teaserBob{ 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-4px) } }
.chat-teaser::after{ /* kleiner Zeiger nach unten zum Chat-Button */
  content:''; position:absolute; right: 26px; bottom: -7px; width: 14px; height: 14px;
  background:#fff; border-right:1px solid rgba(201,168,76,.28); border-bottom:1px solid rgba(201,168,76,.28);
  transform: rotate(45deg); }
.chat-teaser-ava{ flex-shrink:0; width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, #C9A84C, #E2C67A); color:#241c08;
  font-family:'Cormorant Garamond', serif; font-style:italic; font-weight:600; font-size:1.35rem; }
.chat-teaser-text{ font-size:.8rem; line-height:1.4; color:#2B2520; }
.chat-teaser-close{ position:absolute; top:-9px; right:-9px; width:23px; height:23px; border-radius:50%;
  background:#fff; border:1px solid rgba(201,168,76,.3); color:#6E6253; cursor:pointer;
  font-size:15px; line-height:1; display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 12px rgba(0,0,0,.14); transition: color .2s, transform .2s; }
.chat-teaser-close:hover{ color:#2B2520; transform: scale(1.1); }
@media (max-width: 560px){
  .chat-teaser{ right: 1rem; bottom: 6.4rem; max-width: 205px; }
  .chat-teaser::after{ right: 22px; }
}
@media (prefers-reduced-motion: reduce){ .chat-teaser.show{ animation: none } }
