/* ─────────────────────────────────────────────
   VE-FI.de Chatbot Widget — chatbot.css
   ───────────────────────────────────────────── */

/* ── Floating wrapper ── */
#vfchat-wrap {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
  pointer-events: none;
}
.vfchat-btn-shell,
#vfchat-win.vf-open {
  pointer-events: auto;
}

/* ── Floating button ── */
.vfchat-btn-shell {
  position: relative;
  align-self: flex-end;
  flex-shrink: 0;
}
#vfchat-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0e2d52;
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 6px 26px rgba(14,45,82,.42);
  transition: transform .22s, box-shadow .22s;
  display: block;
  position: relative;
  z-index: 2;
}
#vfchat-btn:hover { transform: scale(1.09); box-shadow: 0 10px 34px rgba(14,45,82,.52); }
#vfchat-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
#vfchat-btn-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#vfchat-btn-fallback svg { width: 28px; height: 28px; fill: #fff; }

#vfchat-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(14,45,82,.2);
  animation: vf-pulse 2.6s ease-out infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes vf-pulse {
  0%   { transform: scale(1);   opacity: .65; }
  100% { transform: scale(2.0); opacity: 0;   }
}

#vfchat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 21px;
  height: 21px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-family: 'DM Sans', sans-serif;
  font-size: .67rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  z-index: 3;
  animation: vf-badge-pop .4s cubic-bezier(.36,.07,.19,.97) .6s both;
}
@keyframes vf-badge-pop {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.35); }
}

/* ── Chat window ── */
#vfchat-win {
  width: 368px;
  max-height: 560px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 22px 68px rgba(14,45,82,.22), 0 4px 16px rgba(14,45,82,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(.85) translateY(30px);
  opacity: 0;
  pointer-events: none;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
}
#vfchat-win.vf-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ── Header ── */
#vfchat-head {
  background: linear-gradient(135deg, #0e2d52 0%, #1a4470 100%);
  padding: 1.05rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-shrink: 0;
}
.vf-av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.28);
}
.vf-av img { width: 100%; height: 100%; object-fit: cover; }
.vf-name  { font-family: 'DM Sans', sans-serif; font-size: .9rem; font-weight: 700; color: #fff; line-height: 1.2; }
.vf-sub   { font-family: 'DM Sans', sans-serif; font-size: .66rem; color: rgba(255,255,255,.6); margin-top: .12rem; }
.vf-status {
  display: flex;
  align-items: center;
  gap: .38rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .66rem;
  color: rgba(255,255,255,.65);
  margin-top: .12rem;
}
.vf-sdot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: vf-blink 2.2s ease infinite;
}
@keyframes vf-blink { 0%,100%{opacity:1} 50%{opacity:.25} }

#vfchat-close {
  margin-left: auto;
  background: rgba(255,255,255,.11);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
  line-height: 1;
}
#vfchat-close:hover { background: rgba(255,255,255,.24); }

/* ── Messages ── */
#vfchat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  background: #f5f7fb;
  scroll-behavior: smooth;
}
#vfchat-msgs::-webkit-scrollbar { width: 4px; }
#vfchat-msgs::-webkit-scrollbar-thumb { background: rgba(14,45,82,.14); border-radius: 2px; }

.vfm {
  display: flex;
  gap: .55rem;
  align-items: flex-end;
  animation: vf-msgin .23s ease both;
}
@keyframes vf-msgin { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

.vfm-bub {
  padding: .72rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  line-height: 1.58;
  max-width: 84%;
}
.vfm.bot .vfm-bub {
  background: #ffffff;
  color: #0e1e33;
  border-radius: 15px 15px 15px 3px;
  box-shadow: 0 2px 10px rgba(14,45,82,.07);
}
.vfm.user { flex-direction: row-reverse; }
.vfm.user .vfm-bub {
  background: #0e2d52;
  color: #fff;
  border-radius: 15px 15px 3px 15px;
}
.vfm-av {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.vfm-av img { width: 100%; height: 100%; object-fit: cover; }

/* ── Typing indicator ── */
.vf-typing {
  display: flex;
  gap: .55rem;
  align-items: flex-end;
  animation: vf-msgin .2s ease both;
}
.vf-tdots {
  background: #fff;
  border-radius: 15px 15px 15px 3px;
  padding: .72rem 1rem;
  display: flex;
  gap: .32rem;
  align-items: center;
  box-shadow: 0 2px 10px rgba(14,45,82,.07);
}
.vf-tdot {
  width: 5px;
  height: 5px;
  background: #7b8cde;
  border-radius: 50%;
  animation: vf-td 1.4s ease infinite;
}
.vf-tdot:nth-child(2) { animation-delay: .18s; }
.vf-tdot:nth-child(3) { animation-delay: .36s; }
@keyframes vf-td {
  0%,60%,100% { transform: translateY(0);  opacity: .4; }
  30%         { transform: translateY(-5px); opacity: 1; }
}

/* ── Quick chips ── */
#vfchat-chips {
  padding: .65rem 1rem .4rem;
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  background: #f5f7fb;
  border-top: 1px solid rgba(14,45,82,.07);
  flex-shrink: 0;
  min-height: 0;
}
.vf-chip {
  font-family: 'DM Sans', sans-serif;
  font-size: .71rem;
  font-weight: 600;
  padding: .36rem .82rem;
  border-radius: 3rem;
  border: 1.5px solid rgba(123,140,222,.38);
  background: #fff;
  color: #0e2d52;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.vf-chip:hover {
  background: #7b8cde;
  color: #fff;
  border-color: #7b8cde;
}

/* ── Input area ── */
#vfchat-iarea {
  display: flex;
  gap: .55rem;
  padding: .75rem 1rem;
  background: #fff;
  border-top: 1px solid rgba(14,45,82,.08);
  flex-shrink: 0;
  align-items: center;
}
#vfchat-input {
  flex: 1;
  border: 1.5px solid rgba(14,45,82,.14);
  border-radius: 2rem;
  padding: .58rem .95rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  color: #0e1e33;
  outline: none;
  background: #f5f7fb;
  transition: border-color .2s, background .2s;
}
#vfchat-input:focus { border-color: #7b8cde; background: #fff; box-shadow: 0 0 0 3px rgba(123,140,222,.12), 0 0 12px rgba(123,140,222,.06); transition: all .25s cubic-bezier(.16,1,.3,1); }
#vfchat-input::placeholder { color: rgba(14,45,82,.32); }

#vfchat-send {
  width: 38px;
  height: 38px;
  background: #0e2d52;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s, transform .15s;
}
#vfchat-send:hover { background: #1a4470; transform: scale(1.08); }
#vfchat-send svg { width: 17px; height: 17px; fill: #fff; display: block; }

/* ── Footer note ── */
#vfchat-foot {
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: .6rem;
  color: rgba(14,45,82,.28);
  padding: .35rem .75rem .65rem;
  background: #fff;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  #vfchat-win   { width: calc(100vw - 2rem); }
  #vfchat-wrap  { right: 1rem; bottom: 1.5rem; }
  #vfchat-input { font-size: 16px; } /* Verhindert iOS-Zoom */
}

/* reCAPTCHA Badge ausgeblendet – Datenschutzhinweis im Formular */
.grecaptcha-badge { visibility: hidden !important; }
