/* Main container */
.chat {
  max-width: 500px;
  height: 80vh;
  margin: 30px auto;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
  font-family: 'Arial', sans-serif;
  overflow: hidden;
  padding-bottom: 20px;
}

@media screen and (max-width: 480px) {
  .chat {
    margin: 10px auto;
    height: 80vh; /* Optional: or use auto for full content height */
  }
}


/* Header */
.chat-title {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.3); /* Keep the background so it doesn't look transparent */
  padding: 15px;
  display: flex;
  align-items: center;
  backdrop-filter: blur(4px); /* optional for a modern translucent effect */
}


.chat-title .avatar {
  margin-right: 10px;
}
.chat-title .avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.chat-title h1 {
  font-size: 17px !important;
  margin: 0;
  color: #fff;
}
.chat-title h2 {
  font-size: 13px !important;
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

/* Chat body */
#chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 60px; /* Add extra space at the bottom */
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

/* Message wrapper */
.cb-msg-wrap {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}
.cb-msg-user {
  flex-direction: row-reverse;
}
.cb-msg-bot {
  flex-direction: row;
}

/* Avatars */
.cb-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 8px;
  flex-shrink: 0;
}
.cb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Chat bubbles */
.cb-msg {
  max-width: 75%;
  padding: 10px 15px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}
.cb-msg-content-bot {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 15px 15px 15px 0;
}
.cb-msg-content-user {
  background: linear-gradient(120deg, #248A52, #257287);
  color: #fff;
  border-radius: 15px 15px 0 15px;
  text-align: right;
}

/* Options (buttons) */
.cb-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 20px;
}
.cb-option-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.3s;
}
.cb-option-btn:hover {
  background: #FE0000 !important;
}
.cb-option-btn.selected {
  background: linear-gradient(120deg, #248A52, #257287) !important;
  color: #fff;
  font-weight: bold;
}
.cb-option-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: #aaa;
  cursor: not-allowed;
}

/* Multi-select input */
#cb-other-input-container {
  width: 100%;
  margin-top: 10px;
}
#cb-other-input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Continue button for multi */
#cb-multi-submit {
  padding: 10px;
  background: #248A52;
  color: white;
  border: none;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  display: block;
}

/* User form fields */
.cb-user-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.cb-user-form input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.cb-user-form button {
  padding: 10px;
  background: #248A52;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Recommendation box */
.cb-recommend-box {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 15px;
  margin-top: 10px;
  color: #fff;
}
.cb-recommend-box img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}
.cb-recommend-box h4 {
  margin-top: 0;
  margin-bottom: 8px;
}
.cb-recommend-box p {
  margin: 5px 0;
}
.cb-recommend-box ul {
  padding-left: 18px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.cb-button {
  display: inline-block;
  padding: 8px 12px;
  background: #d60c0c;
  color: #fff;
  border-radius: 6px;
  margin-right: 8px;
  text-decoration: none;
}

/* Typing animation */
.cb-typing {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  width: auto;
  max-width: 120px;
  margin: 5px 0;
}
.cb-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  background: #fff;
  border-radius: 50%;
  animation: cbTyping 1.4s infinite ease-in-out both;
}
.cb-typing span:nth-child(1) { animation-delay: -0.32s; }
.cb-typing span:nth-child(2) { animation-delay: -0.16s; }
.cb-typing span:nth-child(3) { animation-delay: 0; }

@keyframes cbTyping {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.cb-user-form input,
.cb-user-upload input {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cb-user-form button,
.cb-user-upload button {
  width: 100%;
  padding: 10px;
  margin-top: 12px;
  border-radius: 8px;
  border: none;
  background: #2f9750;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

/* Disable for step 3 */
.cb-option-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Continue Button */
.cb-option-submit, #cb-react-submit, #cb-submit-info, #cb-upload-done {
  background-color: #f01616 !important;
  color: #fff !important;
  width: 100%;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.3s ease;
}

.cb-option-submit:hover, #cb-react-submit:hover, 
#cb-submit-info:hover, #cb-upload-done:hover {
  background: linear-gradient(120deg, #248A52, #257287);
}


/* Input Field */
#cb-others-text, #cb-react-text {
  width: 100% !important;
  max-width: 400px;
  padding: 12px 15px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  margin-top: 10px;
}

@media screen and (max-width: 480px) {
  .cb-option-submit,
  #cb-react-submit,
  #cb-others-text,
  #cb-react-text {
    font-size: 15px;
    padding: 10px 14px;
  }
}

/* Shop Now Button */
.cb-shop-btn {
  display: inline-block;
  margin-top: 10px;
  background: #EB0707;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.cb-shop-btn:hover {
  background: linear-gradient(120deg, #248A52, #257287) !important;
}

/* Buy Now Button*/
.cb-button {
  display: inline-block;
  background: linear-gradient(120deg, #248A52, #257287); /* Primary color - adjust as needed */
  color: #ffffff !important;
  padding: 12px 20px;
  margin: 8px 5px 0 0;
  width: 100%;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  transition: background 0.3s ease !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.cb-button:hover {
  background-color: linear-gradient(120deg, #1e6f42, #1f5a6a) !important; /* Darker shade on hover */
  color: #fff !important;
  text-decoration: none;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15) !important;
}

/* Whatsapp Button*/
.cb-button .whatsapp {
  background-color: #f77f00 !important;
  color: #ffffff !important;
}

.cb-button.whatsapp:hover {
  background: linear-gradient(120deg, #248A52, #257287) !important;
}
