:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-dark-blue: #002B3D;
  --color-light-blue: #009CA6;
  --color-orange: #ff7300;
  --color-bot-bg: #d9e8e3;
  --color-gray-light: #ddd;
  --color-gray-medium: #999;
  --color-gray-dark: #333;
  --color-link: #666;
  --color-input-bg: #f9f9f9;
  --color-loading-bar: #f3f3f3;
  --color-tooltip:#009CA6;
  --color-transparent-white: rgba(255, 255, 255, 0.8);
  --color-box-shadow: rgba(0, 0, 0, 0.1);
}

/* General Styling */
body {
  font-family: 'Asap', sans-serif;
  display: flex;
  justify-content: space-between;
}

#chat-container {
  min-height: 300px;
  width: 90vw; /* Gebruik viewport-breedte voor responsiviteit */
  max-width: 400px;
  box-shadow: 0px 4px 10px var(--color-box-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 1000;
  border-radius: 12px;
}

/* Specifieke aanpassing voor zeer kleine schermen */
@media (max-width: 480px) {
  #chat-container {
    width: 100vw;
    height: 100vh;
    max-width: none;
    min-height: 90vh;
    border-radius: 0;
    margin: 0;
    right: 0;
    bottom: 0;
  }
}


/* Header */
.chat-header {
  background: var(--color-dark-blue);
  color: var(--color-white);
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  width: 100%;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.profile-name {
  flex: 1;
  padding-left: 10px;
}

#minimizeButton {
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  margin-right: 10px;
}

.profile-button {
  border: none;
  cursor: pointer;
  background: none;
  justify-content: center;
  align-items: center;
}

.profile-picture-container {
  position: relative;
  width: 58px;
  height: 58px;
}

.profile-picture {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
}

.profile-picture-border {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  z-index: 1;
  justify-content: center;
  align-items: center;
  display: flex;
}
/* if minimized, remove animation */
#chat-container.minimized .profile-picture-border {
  background: conic-gradient(#002B3D, var(--color-light-blue), #002B3D);
  animation: rotateBorder 3s linear infinite;
}
@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Chatbox */
.chatbox {
  height: 500px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  overflow-x: hidden;
  width: 100%;
}

/* Specifieke aanpassing voor zeer kleine schermen */
@media (max-width: 480px) {
  .chatbox  {
    height: 100%;
  }
}

#chat-container.minimized :is(#chatbox, .input-area, .profile-name, #minimizeButton) {
  display: none;
}

#chat-container.minimized,
#chat-container.minimized .chat-header {
  background: none;
  box-shadow: none;
  border: none;
  padding: 0;
}

#chat-container.minimized {
  width: fit-content;
  border: none;
}

#chat-container.minimized .profile-button {
  width: 70px;
  height: 70px;
}

/* Message Styling */
.message {
  padding: 10px 15px;
  margin: 5px;
  border-radius: 12px;
  max-width: 75%;
  word-wrap: break-word;
  font-size: 14px;
  position: relative;
  display: inline-block;
  /* min-height: 1rem; */
}

/* Timestamp Styling */
.timestamp {
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

/* User Messages */
.user-message {
  background: var(--color-light-blue);
  color: var(--color-white);
  align-self: flex-end;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
}

.user-message .timestamp {
  color: var(--color-transparent-white);
}

.user-message::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 8px;
  border-color: transparent transparent transparent var(--color-light-blue);
}

/* Bot Messages */
.bot-message {
  background: var(--color-bot-bg);
  color: var(--color-black);
  align-self: flex-start;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.bot-message .timestamp {
  color: var(--color-gray-medium);
}

.bot-message::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 8px 8px 0;
  border-color: transparent var(--color-bot-bg) transparent transparent;
}

.bot-message a {
  color: var(--color-light-blue);
  text-decoration: underline;
}

.bot-message h1, .bot-message h2, .bot-message h3 {
  color: var(--color-black);
}

.bot-message h2 {
  color: var(--color-dark-blue);
}

.bot-message strong, .bot-message b {
  color: var(--color-dark-blue);
}

/* Input Area */
.input-area {
  display: flex;
  border-top: 1px solid var(--color-gray-light);
  background: var(--color-input-bg);
  padding: 10px;
  width: 100%;
}

#userInput {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 5px;
  outline: none;
  font-size: 16px;
}

/* Loading Bar */
#loading-bar-container {
  width: 100%;
  height: 4px;
  background-color: var(--color-loading-bar);
}

#loading-bar {
  width: 100%;
  height: 100%;
  background-color: var(--color-dark-blue);
  position: relative;
}

#loading-progress {
  width: 0;
  height: 100%;
  background-color: var(--color-light-blue);
  position: absolute;
  animation: loading 2s linear infinite;
}

@keyframes loading {
  0% {
    width: 0;
  }
  50% {
    width: 100%;
  }
  100% {
    width: 0;
  }
}

/* Buttons */
.shared-button {
  border: none;
  padding: 10px 15px;
  margin-right: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
  max-height: 40px;
  max-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}

#sendButton{
  background: var(--color-light-blue);
}

#resetButton {
  background: var(--color-orange);
}

#sendButton:hover {
  background: var(--color-dark-blue);
}

#resetButton:hover {
  background: red;
}

.shared-button:hover {
  transform: scale(1.1);
}


.tooltip .tooltip-text {
  visibility: hidden;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  background: var(--color-white);
  z-index: 9999;
  color: var(--color-black);
}

.tooltip-reset{
    border: 1px solid var(--color-orange);
}

.tooltip-send{
    border: 1px solid var(--color-light-blue);
}
.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%; /* Pijl onder de bubble */
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--color-white) transparent transparent transparent;
}

.tooltip-text.tooltip-reset::after {
  border-color: var(--color-orange) transparent transparent transparent;
}

.tooltip-text.tooltip-send::after {
  border-color: var(--color-light-blue) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}


/* Menu */
.menu-button {
  background: var(--color-dark-blue);
  color: var(--color-white);
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.menu-button:hover {
  background: var(--color-light-blue);
}

.menu-container {
  position: relative;
  margin-left: 5px;
  display: inline-block;
}

.dropdown-menu {
  /* display: none; */
  position: absolute;
  bottom: 50px;
  right: 0;
  background: white;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  padding-top: 30px;
  padding-bottom: 30px;
  padding-left: 10px;
  padding-right: 10px;
  z-index: 100;
  display: none;
  
  /* Force 2 rows & 3 columns */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(1, 1fr);
  gap: 15px;
  max-width: 300px;
  
}

.slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  justify-content: center;
  align-items: center;
}


.product-slider-container {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px;
  white-space: nowrap;
  scroll-behavior: smooth;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #f9f9f9;
  max-width: 100%;
  scrollbar-width: none;
  position: relative;
}

.product-slider-container::-webkit-scrollbar {
  display: none;
  /* Verbergt de scrollbar in Chrome/Safari */
}

.product-card {
  display: flex;
  flex-direction: column;
  /* Stapelt de inhoud correct */
  align-items: flex-start;
  /* Zorgt ervoor dat alles links wordt uitgelijnd */
  min-width: 150px;
  /* Zorgt ervoor dat meerdere kaarten naast elkaar staan */
  max-width: 150px;
  /* Voorkomt dat de kaarten te groot worden */
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  background: white;
  text-align: left;
  transition: transform 0.3s ease-in-out;
  flex-shrink: 0;
  /* Voorkomt dat kaarten worden ingedrukt */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* Licht schaduweffect */
  justify-content: space-between;
  overflow: hidden;
  z-index: 1;
  position: relative;
}

.product-card:hover {
  transform: scale(1.05);
}

.product-card img {
  width: 100%;
  height: 120px;
  /* Zorgt ervoor dat alle afbeeldingen even groot zijn */
  object-fit: cover;
  /* Voorkomt vervorming en behoudt aspect ratio */
  border-radius: 5px;
}

.product-card h4 {
  margin: 8px 0 4px;
  font-size: 19px;
  white-space: nowrap;
  /* Voorkomt dat de titel op meerdere regels breekt */
  overflow: hidden;
  text-overflow: ellipsis;
  /* Voegt "..." toe als de tekst te lang is */
  max-width: 180px;
  /* Zorgt ervoor dat de naam binnen de kaart blijft */
}

.product-card h5 {
  font-size: 10px;
  color: #000000;
  margin: 0;
  font-weight: bold;
  white-space: break-spaces;
  /* word-wrap: break-word; */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  height: calc(1.4em * 3);
  white-space: normal;
  text-overflow: ellipsis;
  overflow: hidden;
}

.product-card a {
  margin: 5px 0;
  color: #666;
  font-size: 10px;
  max-width: 180px;
  /* links tekst plaatsen*/
  text-align: left;

}

.product-card button {
  background: #ff7300;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 12px;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  /* Zorgt ervoor dat de knop de volledige breedte van de kaart inneemt */
  width: 100%;
}

.product-card button:hover {
  background: #ff7300;
  transform: scale(1.05);
}

.product-card p {
  color: #333;
  font-size: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  height: calc(1.4em * 4);
  white-space: normal;
  text-overflow: ellipsis;
  overflow: hidden;
}

.slider-button {
  position: absolute;
  
  top: 50%;
  transform: translateY(-50%);
  /* background-color: rgba(0, 0, 0, 0.5); */
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 5px;
  z-index: 1000;
  /* Ensures buttons stay on top */

    background: #009CA6;
    border-radius: 50%;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.prev-button {
  left: 10px;
}

.next-button {
  right: 10px;
}
  
.slider-button:hover {
    background: #d9e8e3;
    }



.product-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 90%;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    height: 90%;
  }
  
  .product-card:hover .product-details {
    transform: translateY(0);
  }


  /* Escaltie form */
  .escalation-form {
    background: #f9f9f9;
    border: 1px solid #ccc;
    padding: 16px;
    margin: 10px 0;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    color: #333;
}
.escalation-form label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}
.escalation-form textarea,
.escalation-form input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.escalation-form button {
    margin-top: 15px;
    padding: 10px 16px;
    background-color: #002B3D;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.escalation-form button:hover {
    background-color: #00566e;
}

.escalation-form textarea {
    font-size: 14px;
    color: #333;
    font-family: Arial, sans-serif;
}

.yes-no-button {
    background: var(--color-light-blue);
}

.button-row {
    display: flex;
    flex-direction: row;
    gap: 2px;
    margin-top: 8px;
    margin-bottom: 2px;
    margin-left: 10px;
}

.feedback-buttons {
    position: absolute;
    bottom: -12px;
    right: -12px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    transition: width 0.3s ease, transform 0.3s ease;
    max-width: 120px;
    overflow: hidden;
    z-index: 10;
}
.thumb-button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.thumb-button:hover {
    transform: scale(1.2);
}
.feedback-buttons.expanded {
    max-width: 400px;
    justify-content: space-between;
}

.feedback-input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.9em;
    color: #333;
    background: #f9f9f9;
}

.send-feedback-btn {
    background-color: #002B3D;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
}

.send-feedback-btn:hover {
    background-color: #005e73;
}

.log-details {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
    max-height: 300px;
    resize: vertical;
    overflow: auto;
    font-size: 13px;
    line-height: 1.5;
}

.log-details h1, .log-details h2, .log-details h3 {
    margin: 0.5em 0;
    font-weight: bold;
}

.log-details pre {
    background-color: #f6f8fa;
    padding: 10px;
    overflow: auto;
    border-radius: 4px;
    font-size: 12px;
}

.log-details code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}


summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--color-dark-blue);
}