/******************/

/* General styling */
:root {
  --primary-color: #007bff;
  --secondary-color: #0056b3;
  --text-color: #ffffff;
  --background-color: #f4f4f9;
  --user-message-color: #007bff;
  --bot-message-color: #f4f4f9;
  --input-field-color: #ffffff;
  --input-border-color: #cccccc;
  --chatbot-bg-color: #ffffff;
  --bot-message2-color: #000000;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
}

/* Chatbot container */
#chatbot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat_with_us {
  background-color: var(--primary-color);
  color: white;
  padding: 1px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

.power {
  font-size: 17px;
  margin: 1px;
}

.power a {
  font-weight: bold;
  text-decoration: none;
  color: black;
  margin-right: 5px;
}

#chatbot-window {
  display: none;
  /* Add other styling for chatbot window */
}

#chatbot-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  /*font-size: 24px;*/
}

#chatbot-icon img {
  border-radius: 50%; /* Makes the image a circle */
  width: 60px;
  height: 60px;
  object-fit: contain; /* Ensures the image fits within the circle */
}

/* Chatbot header */
#chatbot-header {
  background-color: #8f86f6;
  color: var(--text-color);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

#chatbot-header-m {
  background-color: #8f86f6;
  color: var(--text-color);
  padding: 8px;
  padding-top: 0px;
  padding-bottom: 0px;
  /* display: flex; */
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

#chatbot-header h3 {
  margin: 0;
  font-size: 18px;
}

#chatbot-header button {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
}

/* Chatbot body */
#chatbot-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 2px solid var(--primary-color); /* Add this line to create a solid border */
  background-color: var(--chatbot-bg-color);
}

/* Chatbot messages area */
#chatbot-messages {
  flex-grow: 1;
  width: 350px;
  height: 330px;
  padding: 15px;
  overflow-y: auto;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

/* Chatbot message input area */
#chatbot-input-container {
  display: flex;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #eee;
}

#chatbot-input {
  flex-grow: 1;
  border: none;
  padding: 10px;
  outline: none;
  border-radius: 20px;
  background-color: var(--input-field-color);
  margin-right: 10px;
}

#send-button {
  /* background-color: #007bff; */
  /* background-image: url("https://schedulio.chatwhatchat.com/files/send_bttn4.png"); */
  background-repeat: round;
  color: black;
  border: none;
  padding: 17px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

#send-button:hover {
  background-color: var(--secondary-color);
}

/* User and bot messages */
.user-message,
.bot-message {
  margin-bottom: 10px;
  padding: 10px 15px;
  border-radius: 20px;
  max-width: 80%;
  word-wrap: break-word; /* Ensure long words break to fit within the container */
  white-space: pre-wrap; /* Preserve whitespace and ensure text wraps correctly */
}

.user-message {
  /*background-color: var(--user-message-color);*/
  background-color: #8f86f6;
  color: white;
  align-self: flex-end;
}

.bot-message {
  background-color: var(--bot-message-color);
  color: black;
  align-self: flex-start;
}
.bot-message2 {
  color: var(--bot-message2-color);
}
/* Dark mode variables */
body.dark-mode {
  --chatbot-bg-color: #1a1a1a;
  --bot-message2-color: #ffffff;
}

/* Media query for mobile devices */
@media (max-width: 600px) {
  /* Adjust chatbot container */
  #chatbot {
    bottom: 10px;
    right: 10px;
  }

  /* Adjust chatbot window */
  #chatbot-window {
    width: 90%;
    /*height: 70vh;*/
  }
}

.toggle-switch {
  position: relative;
  width: 60px;
  height: 30px;
}

.switch-checkbox {
  display: none;
}

.switch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #ddd;
  border-radius: 25px;
  margin: 0;
  height: 100%;
  background-color: #ccc;
  transition: background-color 0.3s ease;
}

.switch-label::after {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 30px;
  transition: margin 0.3s ease;
}

.switch-checkbox:checked + .switch-label {
  background-color: #4caf50;
}

.switch-checkbox:checked + .switch-label::after {
  margin-left: 30px;
}

#voice-button {
  width: 35px;
  height: 35px;
  background: url("/static/images/microphone2.png") no-repeat center center;
  background-color: white;
  background-size: contain;
  border-radius: 50%;
  margin-left: 3px;
  border: none;
  cursor: pointer;
}

/* Style for "typing..." indicator */
#typing-indicator {
  font-size: 12px;
}

.dot {
  animation: blink 1s steps(1, end) infinite;
}
.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.message {
  max-width: 370px;
  border-radius: 5px;
  align-items: center;
  align-content: center;
  font-size: 14px;
  text-align: center;
  justify-items: center;
  justify-content: center;
  font-family: Mulish, sans-serif;
}

.message2 {
  max-width: 300px;
  border-radius: 5px;
  margin-left: 28px;
  align-items: center;
  align-content: center;
  font-size: 14px;
  text-align: center;
  justify-items: center;
  justify-content: center;
  font-family: Mulish, sans-serif;

  background-color: #007bff;
  color: white;
  padding: 2px;
  border: none;
  cursor: pointer;
}

.online-indicator {
  width: 12px; /* Width of the circle */
  height: 12px; /* Height of the circle */
  /*background-color: green; /* Color of the circle */
  border-radius: 50%; /* Make the div a circle */
  /*display: inline-block; /* Keep it inline */
}

#action-buttons {
  text-align: center;
  margin-top: 10px;
}

.action-btn {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 10px;
  font-size: 16px;
  width: 70%; /* Adjust width as needed */
}

.action-btn:hover {
  background-color: #0056b3;
}

.action-btn:active {
  background-color: #004494;
}

.time-display {
  font-size: 15px;
  font-weight: bold;
}

/* Styling the dropdown select element */
#language-selector {
  padding: 5px 10px;
  font-size: 1em;
  border: 2px solid #007bff;
  border-radius: 5px;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

.text {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ################################################## */

/* General Styling */
/* :root {
  --primary-color: #007bff;
  --secondary-color: #0056b3;
  --text-color: #ffffff;
  --background-color: #f4f4f9;
  --user-message-color: #007bff;
  --bot-message-color: #f4f4f9;
  --input-field-color: #ffffff;
  --input-border-color: #cccccc;
  --chatbot-bg-color: #ffffff;
  --bot-message2-color: #000000;
} */

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
}

/* Chatbot Container */
#chatbot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 375px;
}

/* Chatbot Icon */
#chatbot-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#chatbot-icon img {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* Chatbot Header */
#chatbot-header {
  /* background-color: var(--primary-color); */
  color: var(--text-color);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px 10px 0 0;
}

#chatbot-header h3 {
  margin: 0;
  font-size: 18px;
}

#chatbot-header button {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
}

/* Chatbot Body */
#chatbot-body {
  display: flex;
  flex-direction: column;
  height: auto;
  overflow: hidden;
  border: 1px solid var(--primary-color);
  background-color: var(--chatbot-bg-color);
  border-radius: 0 0 10px 10px;
}

#chatbot-messages {
  flex-grow: 1;
  max-height: 300px;
  padding: 10px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

/* Messages */
.user-message,
.bot-message {
  margin-bottom: 10px;
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 80%;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.user-message {
  background-color: var(--user-message-color);
  color: white;
  align-self: flex-end;
}

.bot-message {
  background-color: var(--bot-message-color);
  color: black;
  align-self: flex-start;
}

.bot-message2 {
  color: var(--bot-message2-color);
}

/* Input Area */
#chatbot-input-container {
  display: flex;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #eee;
  background-color: var(--input-field-color);
  border-radius: 0 0 10px 10px;
}

#chatbot-input {
  flex-grow: 1;
  border: 1px solid var(--input-border-color);
  border-radius: 20px;
  padding: 10px;
  outline: none;
  margin-right: 10px;
}

#send-button {
  color: black;
  border: none;
  padding: 15px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

#send-button:hover {
  background-color: var(--secondary-color);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 60px;
  height: 30px;
}

.switch-checkbox {
  display: none;
}

.switch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #ddd;
  border-radius: 25px;
  height: 100%;
  background-color: #ccc;
  transition: background-color 0.3s ease;
}

.switch-label::after {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 30px;
  transition: margin 0.3s ease;
}

.switch-checkbox:checked + .switch-label {
  background-color: #4caf50;
}

.switch-checkbox:checked + .switch-label::after {
  margin-left: 30px;
}

/* Voice Button */
#voice-button {
  width: 35px;
  height: 35px;
  background: url("/static/images/microphone2.png") no-repeat center center;
  background-color: white;
  background-size: contain;
  border-radius: 50%;
  margin-left: 3px;
  border: none;
  cursor: pointer;
}

/* Typing Indicator */
#typing-indicator {
  font-size: 12px;
  color: #888;
}

.dot {
  animation: blink 1s steps(1, end) infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Buttons */
.action-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 16px;
}

.action-btn:hover {
  background-color: var(--secondary-color);
}

.time-display {
  font-size: 15px;
  font-weight: bold;
}

/* Dropdown */
#language-selector {
  padding: 5px 10px;
  font-size: 1em;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  #chatbot {
    bottom: 10px;
    right: 10px;
  }

  #chatbot-messages {
    max-height: 250px;
  }

  .user-message,
  .bot-message {
    font-size: 14px;
    padding: 8px 12px;
  }

  #chatbot-input {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  #chatbot-icon img {
    width: 50px;
    height: 50px;
  }

  #chatbot-messages {
    max-height: 200px;
  }

  .user-message,
  .bot-message {
    font-size: 12px;
    padding: 6px 10px;
  }

  #chatbot-input {
    font-size: 12px;
  }
}
