:root {
  /* Color Palette */
  --primary-bg: #075E54;
  --secondary-bg: #25D366;
  --chat-bg: #efeae2;
  --incoming-msg-bg: #fff;
  --outgoing-msg-bg: #dcf8c6;
  --text-color: #000;
  --accent-color: #128C7E;
  --modal-bg: rgba(0, 0, 0, 0.5);
  --whatsapp-green: #25D366;
  --whatsapp-dark-green: #075E54;
  --chat-bg-light: #ECE5DD;
  --message-bg-incoming: #FFFFFF;
  --message-bg-outgoing: #DCF8C6;
  --text-primary: #000000;
  --text-secondary: #808080;}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: #eae6df;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAG1BMVEVHcEzf3+Df3+Df3+Df3+Df3+Df3+Df3+Df3+Bem9QqAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAN0lEQVQ4jWNgQAX8/Ags7KGAMYIBp1J0AQ5XR2dgYmBgEIQJ8ECAACwsKMDAABf4j58YSQUMDACvzR4pxwwkWwAAAABJRU5ErkJggg==");
}

/* Chat Toggler Button */
.chat-toggler {
  position: fixed;
  bottom: 120px;
  right: 32px;
  height: 64px;
  width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background-color: #18d26e;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.15), 
    0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  outline: none;
  z-index: 1000;
  transition: 
    transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.chat-toggler:hover {
  transform: scale(1.1) rotate(6deg);
  background: linear-gradient(145deg, #43b873, #4a90e2);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.2), 
    0 6px 12px rgba(0, 0, 0, 0.15);
}

.chat-toggler:focus {
  outline: none;
  box-shadow: 
    0 0 0 4px rgba(74, 144, 226, 0.3),
    0 8px 20px rgba(0, 0, 0, 0.15);
}

.chat-toggler::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 90px;
  right: 50%;
  transform: translateX(50%);
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 15px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 
    opacity 0.2s ease,
    transform 0.2s ease;
  backdrop-filter: blur(10px);
}

.chat-toggler:hover::after {
  opacity: 1;
  transform: translateX(50%) translateY(-4px);
}

.chat-toggler span {
  color: #fff;
  position: absolute;
  transition: opacity 0.3s ease;
}

.chat-toggler span:last-child,
body.show-modal .chat-toggler span:first-child {
  opacity: 0;
}

/* Add a subtle pulsing effect */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.chat-toggler::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(145deg, #4a90e2, #43b873);
  border-radius: 50%;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.chat-toggler:hover::before {
  animation: pulse 2s infinite;
  opacity: 0.2;
}

body.show-modal .chat-toggler span:last-child {
  opacity: 1;
}

/* Modal Styles */
.chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-bg);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.modal-content {
  background-color: var(--chat-bg);
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

.modal-content h2 {
  margin-bottom: 1.5rem;
  color: var(--primary-bg);
}

.chat-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-options button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.chat-modal .chat-options .whatsapp-option i.fab.fa-whatsapp {
  font-size: 30px; 
}

.chat-modal .chat-options .bot-option i.fas.fa-robot {
  font-size: 30px; 
}


.whatsapp-option {
  background: var(--secondary-bg);
  color: white;
}

.whatsapp-option img {
  width: 24px;
  height: 24px;
}

.bot-option {
  background: var(--primary-bg);
  color: white;
}

.bot-option span {
  font-size: 24px;
}

/* WhatsApp Chat Widget */
.whatsapp-chat {
  position: fixed;
  right: 35px;
  bottom: 90px;
  width: 320px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 1002;
}

.chat-header {
  background: #075e54;
  padding: 20px;
  color: #fff;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-pic {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #128C7E;
  position: relative;
  overflow: hidden;
}

.profile-pic::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: #fff;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") no-repeat center;
}

.profile-details h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.status {
  font-size: 0.85rem;
  opacity: 0.8;
}

.close-chat {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-chat:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-content {
  padding: 24px;
}

.welcome-message {
  margin-bottom: 20px;
  color: #444;
}

.welcome-message p {
  margin: 5px 0;
}

.chat-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  resize: none;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.chat-input:focus {
  outline: none;
  border-color: #128C7E;
}

.whatsapp-link {
  width: 100%;
  background: #25d366;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.whatsapp-link:hover {
  background: #1fbd59;
}

.whatsapp-icon {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
  /* background: linear-gradient(145deg, #25d366, #128c7e); */
  background-color: #000;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E") no-repeat center;
  mask-size: 70%;
  -webkit-mask-size: 70%;
  background-size: cover;
  border-radius: 50%;
  box-shadow: 
    0 6px 15px rgba(0, 0, 0, 0.15), 
    0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: 
    transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.3s ease;
}

.whatsapp-icon::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(145deg, #25d366, #128c7e);
  border-radius: 50%;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.whatsapp-icon:hover {
  transform: scale(1.1) rotate(3deg);
  background: linear-gradient(145deg, #128c7e, #25d366);
  box-shadow: 
    0 10px 20px rgba(0, 0, 0, 0.2), 
    0 6px 12px rgba(0, 0, 0, 0.15);
}

.whatsapp-icon:hover::before {
  animation: pulse 2s infinite;
  opacity: 0.2;
}

.whatsapp-icon:focus {
  outline: none;
  box-shadow: 
    0 0 0 4px rgba(37, 211, 102, 0.3),
    0 8px 20px rgba(0, 0, 0, 0.15);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Chatbot Styles */
.chatbot {
  position: fixed;
  right: 35px;
  bottom: 90px;
  width: 420px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: none;
  transform-origin: bottom right;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 1002;
}

.chatbot-toggler {
  position: fixed;
  bottom: 120px;
  right: 35px;
  outline: none;
  border: none;
  height: 50px;
  width: 50px;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--secondary-bg);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chatbot-toggler:hover {
  transform: scale(1.1) rotate(10deg);
}

@keyframes chatbotSlideIn {
  from { 
    opacity: 0; 
    transform: scale(0.5) translateY(20px);
  }
  to { 
    opacity: 1; 
    transform: scale(1) translateY(0);
  }
}

body.show-chatbot .chatbot {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  animation: chatbotSlideIn 0.4s ease-out;
}

.chatbot header {
  padding: 16px;
  position: relative;
  text-align: left;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-bg), #4a4a5a);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  transition: background 0.3s ease;
}

.chatbot header:hover {
  background: linear-gradient(135deg, var(--primary-bg), #5a5a6a);
}

.chatbot header .close-btn {
  cursor: pointer;
  color: #fff;
  font-size: 1.5rem;
  opacity: 0.7;
  transition: all 0.2s ease;
  padding: 5px;
  border-radius: 50%;
}

.chatbot header .close-btn:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.chatbot header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot header h2::before {
  content: '🤖';
  font-size: 1.3rem;
  margin-right: 8px;
}

.chatbot .chatbox {
  overflow-y: auto;
  height: 510px;
  padding: 20px 20px 100px;
  background-color: #f4f4f8;
  background-image: 
    linear-gradient(45deg, rgba(230, 230, 250, 0.5) 0%, transparent 50%),
    url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAG1BMVEVHcEzf3+Df3+Df3+Df3+Df3+Df3+Df3+Df3+Bem9QqAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAN0lEQVQ4jWNgQAX8/Ags7KGAMYIBp1J0AQ5XR2dgYmBgEIQJ8ECAACwsKMDAABf4j58YSQUMDACvzR4pxwwkWwAAAABJRU5ErkJggg==");
  background-blend-mode: soft-light;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.chatbot .chatbox::-webkit-scrollbar {
  width: 8px;
}

.chatbot .chatbox::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 4px;
}

.chatbot .chatbox .message {
  display: flex;
  align-items: center;
  max-width: 80%;
  margin-bottom: 15px;
  clear: both;
}

.chatbot .chatbox .message.user {
  justify-content: flex-end;
  margin-left: auto;
}

.chatbot .chatbox .message.bot {
  justify-content: flex-start;
  margin-right: auto;
}

.chatbot .chatbox .message p {
  padding: 12px 15px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 80%;
  word-wrap: break-word;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  transition: transform 0.1s ease;
}

.chatbot .chatbox .message p:hover {
  transform: scale(1.02);
}

.chatbot .chatbox .message.user p {
  background: linear-gradient(135deg, #0084ff, #00a2ff);
  color: white;
  border-bottom-left-radius: 5px;
}

.chatbot .chatbox .message.bot p {
  background: linear-gradient(135deg, #f0f0f0, #e5e5e5);
  color: #333;
  border-bottom-right-radius: 5px;
}

.chatbot .chatbox .message.bot p::before,
.chatbot .chatbox .message.user p::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.chatbot .chatbox .message.bot p::before {
  left: -10px;
  bottom: 0;
  border-width: 0 10px 10px 0;
  border-color: transparent #e5e5e5 transparent transparent;
}

.chatbot .chatbox .message.user p::before {
  right: -10px;
  bottom: 0;
  border-width: 0 0 10px 10px;
  border-color: transparent transparent transparent #0084ff;
}

.chatbot footer {
  padding: 10px;
  display: flex;
  align-items: center;
  background-color: #f1f1f1;
}

.chatbot footer textarea {
  width: 100%;
  padding: 10px;
  border-radius: 20px;
  resize: none;
  font-size: 1rem;
  border: 1px solid #ddd;
}

.chatbot footer button {
  background-color: #0084ff;
  border: none;
  padding: 10px;
  color: white;
  font-size: 1.2rem;
  border-radius: 50%;
  margin-left: 10px;
  cursor: pointer;
}

.chatbot footer button:hover {
  background-color: #006bb3;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .chatbot {
    width: 100%;
    bottom: 10px;
  }

  .chatbot .chatbox .message p {
    font-size: 0.9rem;
  }

  .chatbot footer textarea {
    font-size: 0.9rem;
  }
}


.chatbox .chat {
  display: flex;
  list-style: none;
  margin: 15px 0;
  animation: messageSlideIn 0.3s ease;
}

.chatbox .outgoing {
  justify-content: flex-end;
}

.chatbox .incoming span {
  width: 32px;
  height: 32px;
  color: #0bbb05;
  cursor: default;
  text-align: center;
  line-height: 32px;
  align-self: flex-end;
  background: var(--accent-color);
  border-radius: 50%;
  margin: 0 10px 7px 0;
}

.chatbox .chat.incoming i.fas.fa-robot {
  font-size: 30px; /* Adjust the size as needed */
  color: #05301c;  /* Replace with your desired color */
}


.chatbox .chat p {
  white-space: pre-wrap;
  padding: 12px 16px;
  border-radius: 7px;
  max-width: 75%;
  font-size: 0.95rem;
  word-wrap: break-word;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chatbox .outgoing p {
  background: var(--outgoing-msg-bg);
  color: var(--text-color);
  border-radius: 7px 0 7px 7px;
}

.chatbox .incoming p {
  background: var(--incoming-msg-bg);
  color: var(--text-color);
  border-radius: 0 7px 7px 7px;
}

.chatbox .chat p.error {
  color: #721c24;
  background: #f8d7da;
}

.chatbox .chat.incoming .fas.fa-robot {
  color: #054172; 
  font-size: 24px; 
}


.chatbot .chat-input {
  display: flex;
  gap: 5px;
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #f0f0f0;
  padding: 8px 20px;
  border-top: 1px solid #e0e0e0;
}

.chat-input textarea {
  height: 45px;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  max-height: 180px;
  padding: 12px 16px;
  font-size: 0.95rem;
  background: #fff;
  border-radius: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-input textarea:focus {
  border-color: #128C7E;
  box-shadow: 0 0 8px rgba(18, 140, 126, 0.3);
  background-color: #fff;
}

.chat-input span {
  align-self: flex-end;
  color: #128C7E;
  cursor: pointer;
  height: 45px;
  display: flex;
  align-items: center;
  visibility: hidden;
  font-size: 1.35rem;
}

.chat-input textarea:valid~span {
  visibility: visible;
}


@media (max-width: 490px) {
  .chatbot-toggler {
    right: 20px;
    bottom: 100px;
  }

  .chatbot {
    right: 0;
    bottom: 0;
    height: 100%;
    border-radius: 0;
    width: 100%;
  }

  .chatbot .chatbox {
    height: 90%;
    padding: 25px 15px 100px;
  }

  .chatbot .chat-input {
    padding: 5px 15px;
  }
}

/* Show Elements */
body.show-modal .chat-modal {
  display: flex;
}

body.show-whatsapp .whatsapp-chat {
  display: block;
}

body.show-bot .chatbot {
  display: block;
}

/* Responsive Design */
@media (max-width: 490px) {
  .chat-toggler {
      right: 20px;
      bottom: 120px;
  }

  .whatsapp-chat,
  .chatbot {
      right: 0;
      bottom: 0;
      width: 100%;
      height: 100%;
      border-radius: 0;
  }
}

.chat-input {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 5px;
margin-bottom: 10px;
resize: none;
}
