/* VDE Assistent Chatbot */
#vde-chatbot-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: 'DM Sans', -apple-system, sans-serif;
}

/* ─── TRIGGER KNOP ─── */
#vde-chat-trigger {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #E8620A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(232,98,10,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  margin-left: auto;
  overflow: hidden;
  padding: 0;
}
#vde-chat-trigger:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(232,98,10,0.55);
}
.vde-chat-icoon-gesloten {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: url('http://vanderende-online.nl/wp-content/uploads/2026/05/Gemini_Generated_Image_loif6floif6floif.png');
  background-size: cover;
  background-position: center;
  display: block !important;
}
.vde-chat-icoon-open {
  width: 100%;
  height: 100%;
  background: #E8620A;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
}
.vde-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #dc2626;
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ─── CHAT VENSTER ─── */
#vde-chat-venster {
  width: 340px;
  max-height: 520px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 12px;
  transform-origin: bottom right;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), opacity 0.25s;
}
.vde-chat-gesloten {
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  pointer-events: none;
}
.vde-chat-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ─── HEADER ─── */
.vde-chat-hoofd {
  background: linear-gradient(135deg, #0D1B2A 0%, #1a2e44 100%);
  padding: 16px 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.vde-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #E8620A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.vde-chat-naam {
  font-weight: 600;
  font-size: 14px;
  color: white;
}
.vde-chat-status {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}
.vde-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: statuspuls 2.5s ease-in-out infinite;
}
@keyframes statuspuls {
  0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}
.vde-chat-sluit {
  margin-left: auto;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.6);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.vde-chat-sluit:hover { background: rgba(255,255,255,0.2); color: white; }

/* ─── BERICHTEN ─── */
.vde-chat-berichten {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8f9fa;
}
.vde-bericht {
  display: flex;
  max-width: 88%;
}
.vde-bericht-bot { align-self: flex-start; }
.vde-bericht-gebruiker { align-self: flex-end; }
.vde-bericht-tekst {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.6;
}
.vde-bericht-bot .vde-bericht-tekst {
  background: white;
  color: #1a1a1a;
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.vde-bericht-gebruiker .vde-bericht-tekst {
  background: #E8620A;
  color: white;
  border-radius: 16px 16px 4px 16px;
}

/* Typeer animatie */
.vde-typeer .vde-bericht-tekst {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
}
.vde-typeer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bbb;
  animation: typeer 1.2s ease-in-out infinite;
}
.vde-typeer-dot:nth-child(2) { animation-delay: 0.2s; }
.vde-typeer-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typeer {
  0%,60%,100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Snelle vragen */
.vde-snelle-vragen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.vde-snelle-vragen button {
  font-size: 12px;
  background: white;
  border: 1px solid #e2e5ea;
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  color: #444;
  transition: all 0.15s;
  font-family: inherit;
}
.vde-snelle-vragen button:hover {
  background: #E8620A;
  color: white;
  border-color: #E8620A;
}

/* ─── INVOER ─── */
.vde-chat-invoer-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #f0f0f0;
  background: white;
}
#vde-chat-invoer {
  flex: 1;
  border: 1px solid #e2e5ea;
  border-radius: 24px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  color: #1a1a1a;
  background: #f8f9fa;
  transition: border-color 0.15s;
}
#vde-chat-invoer:focus {
  border-color: #E8620A;
  background: white;
}
#vde-stuur-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #E8620A;
  border: none;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
#vde-stuur-btn:hover { background: #c7530a; transform: scale(1.05); }
#vde-stuur-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; }

/* ─── VOET ─── */
.vde-chat-voet {
  text-align: center;
  font-size: 10px;
  color: #bbb;
  padding: 6px;
  background: white;
  border-top: 1px solid #f5f5f5;
}

/* ─── MOBIEL ─── */
@media (max-width: 400px) {
  #vde-chat-venster { width: calc(100vw - 32px); }
  #vde-chatbot-wrap { bottom: 16px; right: 16px; }
}
