

/* ── Chatbox Wrapper ──────────────────────────────────────────────────────── */
#chatbot-box {
  position: fixed;
  bottom: 90px;
  right:8px;
  width: 300px;
  height: 400px;
  background: #090B21;
  border-radius: 15px;
  display: none;
  flex-direction: column;
  overflow: hidden;                  /* ✅ container must NOT scroll */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 999999;
  border: 1px solid #555555;
}

/* ── Chat Container ───────────────────────────────────────────────────────── */
.chat-container {
width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    align-items: normal;
    justify-content: space-between;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.chat-header {
  background: #0C0E2B;
  padding: 12px;
  color: white;
  text-align: left;
  overflow: hidden;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom: 1px solid #555555;
  flex-shrink: 0;                    /* ✅ never shrink */
}



/* ── Chat Body (scrollable area) ──────────────────────────────────────────── */
.chat-body {
  padding: 15px;
  overflow-y: auto;                  /* ✅ THIS scrolls */
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #ffffff;
  min-height: 0;                     /* ✅ critical for flex children to scroll */
}

/* ── Scrollbar Styling ────────────────────────────────────────────────────── */
.chat-body::-webkit-scrollbar {
  width: 4px;
}
.chat-body::-webkit-scrollbar-track {
  background: #090B21;
}
.chat-body::-webkit-scrollbar-thumb {
  background: #333a6e;
  border-radius: 4px;
}

/* ── Chat Messages Area ───────────────────────────────────────────────────── */
.chatData {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: visible;                 /* ✅ NOT auto — let .chat-body scroll */
}

/* ── Welcome Info ─────────────────────────────────────────────────────────── */
.welcome_info {
  font-size: 12px;
  width: 90%;
  padding: 10px;
  background: #0E113A;
  border-radius: 8px;
  color: #fff;
  font-family: 'ProximaNova-Regular', sans-serif;
  margin-bottom: 15px;
  flex-shrink: 0;
}

/* ── Messages ─────────────────────────────────────────────────────────────── */
.msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  word-wrap: break-word;
}

.msg.user {
  align-self: flex-end;
  background: #312e70;
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.msg.bot {
  align-self: flex-start;
  background: #0E113A;
  color: #ffffff;
  border: 1px solid #333a6e;
  border-bottom-left-radius: 2px;
}

/* ── Options / Quick Reply Buttons ───────────────────────────────────────── */
.options-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.options-wrapper button {
  font-size: 11px;
  padding: 5px 10px;
  background: #090B21;
  color: #00F3FF;
  border: 1px solid #00F3FF;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.options-wrapper button:hover {
  background: #00F3FF;
  color: #090B21;
}

/* ── User Info Form ───────────────────────────────────────────────────────── */
.user_info_form .chat-step {
  font-size: 12px;
  width: 90%;
  padding: 10px;
  background: #0E113A;
  border-radius: 8px;
  color: #fff;
  font-family: 'ProximaNova-Regular', sans-serif;
  border: 1px solid #4B4B4B;
  display: none;
}

.user_info_form .chat-step.active,
.user_info_form .chat-step[style*="display:block"],
.user_info_form .chat-step[style*="display: block"] {
  display: block;
}

#chatbot-box label {
  font-size: 12px;
  margin-bottom: 6px;
  display: block;
}

#chatbot-box input {
  width: 100%;
  padding: 7px;
  border: 1px solid #4B4B4B;
  background: #101a48;
  color: white;
  outline: none;
  border-radius: 30px;
  box-sizing: border-box;
}

#chatbot-box input:focus {
  border-color: #6b6bcc;
}

#chatbot-box .error-msg:empty { display: none; }
#chatbot-box .error-msg {
  font-size: 12px;
  color: #ff4d4d;
  margin-top: 4px;
  min-height: 16px;
}

#chatbot-box .step-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chatbot-box .step-footer span {
  font-size: 10px;
  color: #aaa;
}

#chatbot-box .next-btn,
#chatbot-box .done-btn {
  background: white;
  color: #333;
  border: none;
  padding: 6px 14px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 12px;
}

#chatbot-box .next-btn:hover,
#chatbot-box .done-btn:hover {
  background: #e6e6e6;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
#chatbot-box .chat-footer {
  display: flex;
  border: 1px solid #4B4B4B;
  margin: 10px 12px 12px;
  border-radius: 30px;
  background: #101a48;
  flex-shrink: 0;                    /* ✅ never shrink */
  align-items: center;
}

#chatbot-box .chat-footer input {
  font-family: 'ProximaNova-Regular', sans-serif;
  font-size: 12px;
  flex: 1;
  padding: 10px;
  border: none;
  outline: none;
  background: transparent;
  color: white;
  border-radius: 30px;
}

#chatbot-box .chat-footer input::placeholder {
  color: #888;
}

#chatbot-box .chat-footer input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#chatbot-box .send-button {
  background: url(https://bsetec.com/public/image/chatbot/send-btn.png);
  text-indent: -9999px;
  background-repeat: no-repeat;
  background-size: contain;
  width: 32px;
  height: 32px;
  border: none;
  cursor: pointer;
  margin-right: 8px;
  flex-shrink: 0;
}

/* ── Typing Loader ────────────────────────────────────────────────────────── */
.typing-loader {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #0E113A;
  border: 1px solid #333a6e;
  border-radius: 12px;
  border-bottom-left-radius: 2px;
  align-self: flex-start;
  width: fit-content;
}

.typing-loader span {
  width: 8px;
  height: 8px;
  background: #888;
  border-radius: 50%;
  animation: bounce 1s infinite;
}

.typing-loader span:nth-child(2) { animation-delay: 0.2s; }
.typing-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40%           { transform: translateY(-6px); }
}

/* ── Product Card ─────────────────────────────────────────────────────────── */
.product-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  max-width: 400px;
}

.product-img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-title {
  margin: 0;
  font-size: 16px;
  color: #444;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-container { margin-bottom: 8px; }

.current-price {
  color: #483d8b;
  font-weight: bold;
  font-size: 18px;
  margin-right: 8px;
}

.old-price {
  color: #ff4d4d;
  text-decoration: line-through;
  font-size: 14px;
}

#chatbot-box .button-group {
  display: flex;
  gap: 10px;
}

#chatbot-box .btn {
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background-color: #312e70;
  color: white;
  transition: opacity 0.2s;
}

#chatbot-box .btn:hover { opacity: 0.9; }

/* ── Category Buttons ─────────────────────────────────────────────────────── */
.category-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 10px;
}

.category-button {
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-button:hover { background-color: #45a049; }

@media (max-width: 600px) {
  .category-button { width: 100%; text-align: center; }
}
#chatbot-tooltip {
  position: fixed;
  bottom: 85px;
  right: 80px;
  background: #0E113A;
  color: #fff;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid #333a6e;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999998;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* ✅ arrow pointing to button */
#chatbot-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 18px;
  width: 10px;
  height: 10px;
  background: #0E113A;
  border-right: 1px solid #333a6e;
  border-bottom: 1px solid #333a6e;
  transform: rotate(45deg);
}

#chatbot-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-cursor {
  animation: blink 0.7s infinite;
  margin-left: 1px;
  color: #00F3FF;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  /* background: #your-color;    keep your existing header color */
  border-radius: 12px 12px 0 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);   /* adjust if header bg is dark */
  transition: background 0.15s;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
