/* ===========================
   Virtual Task Solutions Chatbot - FINAL BUILD
   =========================== */

#vts-chatbot {
  position: fixed;
  bottom: 10px;
  right: 80px;
  font-family: 'Open Sans', sans-serif;
  z-index: 9999;
}

/* Floating chat bubble */
#vts-chat-bubble {
  position: relative;
  width: 60px;
  height: 60px;
  background-color: #11AFFB; /* bright site blue */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 26px;
  transition: transform 0.2s ease;
  border: none;
  box-shadow: none;
  color: #ffffff;
}

#vts-chat-bubble:hover {
  transform: scale(1.08);
}

/* Force pure white icon inside the blue bubble */
#vts-chat-bubble svg,
#vts-chat-bubble i,
#vts-chat-bubble .fa,
#vts-chat-bubble path {
  color: #ffffff !important;
  fill: #ffffff !important;
  fill-opacity: 1 !important;
  stroke: none !important;
  stroke-width: 0 !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}

/* Chat window */
#vts-chat-window {
  display: none;
  width: 340px;
  height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: fixed;
  bottom: 90px;
  right: 20px;
  overflow: hidden;
}

#vts-chat-window.open {
  display: flex;
  flex-direction: column;
}

/* Header */
.vts-header {
  background: #11AFFB; /* matches chat bubble */
  color: #fff;
  text-align: center;
  padding: 10px;
  font-weight: bold;
  letter-spacing: 0.3px;
  flex: 0 0 auto;
}

/* Tabs */
.vts-tabs {
  display: flex;
  justify-content: space-around;
  border-bottom: 1px solid #ddd;
  background: #f8f8f8;
  flex: 0 0 auto;
}

.vts-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background 0.2s;
}

.vts-tab:hover {
  background: #eef5ff;
}

.vts-tab.active {
  background: #E9F2FF;
  font-weight: bold;
}

/* Tab content */
.vts-tab-content {
  display: none;
}

.vts-tab-content.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* Scrollable areas */
.vts-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 10px 8px 10px 10px;
  background: #fff;
}

/* Scrollbar */
.vts-messages::-webkit-scrollbar {
  width: 8px;
}
.vts-messages::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}
.vts-messages::-webkit-scrollbar-track {
  background: transparent;
}

/* Chat messages */
.vts-message {
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.4;
  font-size: 14px;
}
.vts-message.bot {
  background: #E9F2FF;
  color: #333;
  align-self: flex-start;
}
.vts-message.user {
  background: #11AFFB;
  color: #fff;
  align-self: flex-end;
}

/* Input bar */
.vts-input {
  display: flex;
  border-top: 1px solid #ccc;
  flex: 0 0 auto;
}
.vts-input input {
  flex: 1;
  border: none;
  padding: 10px;
  outline: none;
  font-size: 14px;
}
.vts-input button {
  background: #11AFFB;
  color: white;
  border: none;
  padding: 10px 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.vts-input button:hover {
  background: #0E9BD8;
}

/* FAQ */
#faq-tab {
  flex: 1 1 auto;
  display: none;
  flex-direction: column;
  background: #fff;
}
#faq-tab.active {
  display: flex;
}
.vts-faq-item {
  border-bottom: 1px solid #eee;
  padding: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  background: #fff;
  transition: background 0.2s;
}
.vts-faq-item:hover {
  background: #f4f8ff;
}
.vts-faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 10px;
  transition: all 0.25s ease;
}
.vts-faq-answer.open {
  display: block;
  max-height: 800px;
  opacity: 1;
  padding: 5px 10px 10px;
}

/* Contact form */
#vts-contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}
#vts-contact-form label {
  font-weight: 600;
  font-size: 13.5px;
  color: #222;
}
#vts-contact-form input,
#vts-contact-form textarea {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  font-size: 13.5px;
  resize: none;
  width: 100%;
}
.vts-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}
.vts-checkbox-group label {
  font-weight: normal;
  font-size: 13px;
}
#vts-contact-send {
  background: #11AFFB;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
#vts-contact-send:hover {
  background: #0E9BD8;
}

/* Responsive */
@media (max-width: 500px) {
  #vts-chat-window {
    width: 90%;
    right: 5%;
    height: 70vh;
  }
  #vts-chat-bubble {
    width: 55px;
    height: 55px;
    font-size: 24px;
  }

  /* Prevent mobile browsers from darkening icon */
  #vts-chat-bubble {
    -webkit-font-smoothing: antialiased !important;
    text-rendering: optimizeLegibility !important;
  }
}
