/* Algemene opmaak */


/* Chat Launcher */
.chat-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-launcher.hidden {
  display: none;
}

.chat-preview {
  position: relative;
  background: white;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 8px;
  width: 240px;
}

.chat-preview-message {
  background: #f3f3f3;
  padding: 8px 12px;
  border-radius: 16px;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.chat-preview-close {
  position: absolute;
  top: -23px;
  right: 8px;
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: #aaa;
}

.chat-preview-close:hover {
  color: #000;
}

.chat-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
}

/* Sluitknop stijl (vervangt avatar bij geopende chat) */
.chat-close-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #006B2E;
  color: #fff;
  font-size: 24px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.chat-close-button.hidden {
  display: none;
}

/* Chat Pop-up */
.chat-popup {
  position: fixed;
  bottom: 88px;
  right: 20px;
  z-index: 9998;
  display: none;
  transform: scale(0.65);
opacity: 0;
transition: transform 1.3s ease, opacity 1.3s ease;
transform-origin: bottom right;
pointer-events: none;
}

.chat-popup.visible {
  display: block;
  transform: scale(1);
opacity: 1;
pointer-events: auto;
}

.chat-container {
  width: 360px;
  height: 600px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  font-weight: bold;
  font-size: 15px;
}

.chat-header img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 10px;
}

.chat-header span {
  flex-grow: 1;
}

.chat-header .languageSwitch {
  font-size: 12px;
  color: #888;
  text-decoration: none;
}
#chatHeaderText sup {
    font-size: xx-small;
}

/* Berichten */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  max-width: 80%;
  /* display: flex; */
  /* align-items: flex-start; */
  /* gap: 8px; */
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: normal;
  word-break: break-word;
  display: inline-block;
}

.message.bot {
  background-color: #f0f0f0;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 0;
  /* display: flex; */
  /* flex-direction: column; */
}
.message.bot a {
  text-decoration: underline;
}

.message-wrapper.bot.has-button .message.bot {
  background-color: transparent;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 0;
  /* display: flex; */
  /* flex-direction: column; */
  padding: 0px;
}

/*.message.bot::before {
  content: "";
  width: 25px;
  height: 25px;
  background-image: url("elise-avatar.png");
  background-size: cover;
  border-radius: 50%;
}*/

.message.user {
  background-color: #006b2e;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 0;
  justify-content: flex-end;
}

.message .avatar {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background-image: url('elise-avatar.png');
  background-size: cover;
  margin-top: 2px;
}

.message .text {
  flex: 1;
  white-space: pre-wrap;
}

.message-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.message-wrapper.bot {
  flex-direction: row;
}

.message-wrapper.user {
  justify-content: flex-start;
  flex-direction: row-reverse;
  /* display: flex; */
}

.chat-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}


/* Invoer + Disclaimer container */
.chat-footer {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e0e0e0;
  background-color: #fff;
}

.chat-input {
  display: flex;
  padding: 10px 16px 10px;
  background-color: #fff;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
}

.closeIcon {
  width: 50%;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border: 0px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  font-family: inherit;         /* of een standaard sans-serif */
  letter-spacing: normal;       /* zeker niet negatief */
  text-transform: none;         /* geen uppercase/lowercase */
  -webkit-appearance: none;     /* voorkom iOS stijlproblemen */
  white-space: normal;          /* standaard */
}

.chat-input button {
  background: url('send.svg') no-repeat center center;
  background-size: 20px;
  width: 40px;
  height: 40px;
  border: none;
  margin-left: 8px;
  cursor: pointer;
  padding: 0;
}

.disclaimer {
  color: #9c9c9c;
  padding: 20px;
  font-size: 10pt;
  line-height: normal;
}
.disclaimer a {
color: #E35912;
}
sup {
  font-size: xx-small;
}

/* Voorbeeldvragen */
.example-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

.example-questions button {
  background: #f8f8f8;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.example-questions button:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}
.chat-cta {/* margin-top: .5rem; *//* background-color: #0b6a30; */}
.chat-cta-btn {
  display:inline-block;
  padding:.6rem 1rem;
  border-radius:9999px;
  text-decoration: none!important;
  font-weight:600;
  /* border:1px solid #e0e0e0; */
  background-color: #e35912;
  color: white;
  /* text-decoration: none; */
}
.chat-cta-btn:focus { outline: 2px solid #000; outline-offset: 2px; }
.chat-cta-btn:hover {background-color: #a37c26;}

.message.bot .lead-card {
  border: 1px solid var(--cp-border, #e7e7e7);
  border-radius: 12px;
  padding: 12px;
  margin-top: 4px;
}
.lead-title { font-weight: 600; margin-bottom: 4px; }
.lead-intro { font-size: .9rem; opacity: .8; margin-bottom: 8px; }
.lead-form .lead-field { display: grid; gap: 4px; margin-bottom: 8px; }
.lead-form input { border: 1px solid #ddd; border-radius: 10px; padding: 10px; width: 100%; }
.lead-submit { border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; }
.lead-feedback { margin-top: 8px; font-size: .9rem; }
.lead-success .lead-title { color: #1a7f37; }



@media (max-width: 400px) {
  .chat-container {
      width: 100vw;
      box-shadow: none;
      border-radius: 0;
      height: calc(100vh - 150px);
  }
  .chat-popup {
  right: 0px;
}
}
