/* keep cloned links black inside off-canvas menu */
.site-mobile-inner a {
  color: #000 !important;
}

/* ✅ Remove duplicate #chatBox scroll — handled by .chatbot-body */
#chatBox {
  max-height: unset;
  overflow: unset;
}

/* Horizontal suggestions row with scrollbar */
#sliderTrack {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 10px;
  padding: 6px 8px;
  scrollbar-width: thin;      /* Firefox */
}
#sliderTrack::-webkit-scrollbar { height: 8px; }
#sliderTrack::-webkit-scrollbar-thumb {
  background: #888; border-radius: 4px;
}
#sliderTrack::-webkit-scrollbar-thumb:hover { background: #555; }

.suggestion {
  flex: 0 0 auto;
  white-space: nowrap;
  background: #f1f1f1;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}

html, body {
  overflow-x: hidden; /* stop horizontal scroll globally */
  overflow-y: auto;   /* keep only one vertical scroll */
}

/* Make sure dynamic spans don't push layout */
.cover {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100% !important;
  pointer-events: none;
  z-index: -1;
  display: none !important;
}

@media (max-width: 768px) {
  .cover {
    transform: translate(0%, 0%) !important;
  }
}

/* Floating Button */
#chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #007bff;
  color: white;
  padding: 10px 16px;
  border-radius: 25px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Main Chat Widget */
#chatbot-widget {
  position: fixed;
  bottom: 80px;
  right: -400px;
  width: 340px;
  height: 420px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

#chatbot-widget.visible {
  right: 20px;
}

/* Header */
.chatbot-header {
  background: #f8f9fa;
  padding: 12px 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0e0e0;
}

.chatbot-title {
  font-size: 16px;
  color: #333;
}

.chatbot-close {
  font-size: 18px;
  cursor: pointer;
  color: #666;
}

/* Chat Body - ✅ only this scrolls */
.chatbot-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;   /* only scrollable area */
  overflow-x: hidden;
  background-color: #f6f6f6;
}

#chatbot-widget {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: inline-block;
  word-wrap: break-word;
}

.user {
  align-self: flex-end;
  background: #007bff;
  color: white;
  border-bottom-right-radius: 0;
}

.bot {
  align-self: flex-start;
  background: #e9ecef;
  color: #212529;
  border-bottom-left-radius: 0;
}

.message::after {
  content: attr(data-time);
  display: block;
  font-size: 10px;
  color: #999;
  margin-top: 5px;
  text-align: right;
}

/* Input Area */
.chatbot-input-area {
  display: flex;
  padding: 10px;
  border-top: 1px solid #e0e0e0;
  background: #fff;
}

.chatbot-input-area input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 20px;
  outline: none;
}

.chatbot-input-area button {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  margin-left: 8px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 16px;
}

/* Suggestion Slider */
.suggestion-slider {
  background: #f8f9fa;
  padding: 8px 10px;
  border-top: 1px solid #e0e0e0;
}

.slider-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding-bottom: 4px;
}

.slider-track::-webkit-scrollbar {
  height: 4px;
}

.suggestion {
  background-color: #ffffff;
  color: #007bff;
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #007bff;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.suggestion:hover {
  background-color: #007bff;
  color: white;
}
