/* --- Chat Icon --- */
.chat-icon {
  cursor: pointer;
  position: fixed;
  bottom: 240px;
  right: 40px;
  width: 80px;
  height: 80px;
  z-index: 1000;
  transition: transform 0.3s ease;
   /* overflow: hidden;  */
}
.chat-icon:hover {
  transform: scale(1.1);
   /* overflow: hidden;  */
}

#chatIcon iframe {
  pointer-events: none;
  width: 130%;
  height: 130%;
  transform: translate(-10%, -10%);
  border: none;
}

/* --- Background Overlay (optional) --- */
.chat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1500;
  animation: fadeIn 0.3s ease-in-out;
}

/* --- Chat Modal --- */
.chat-modal {
  display: none;
  position: fixed;
  bottom: 150px;
  right: 80px;
  z-index: 2000;
  animation: fadeIn 0.3s ease-in-out;
}

.chat-modal-content {
  background: #fff;
  border-radius: 15px;
  width: 350px;
  height: 480px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.4s ease-in-out;
  position: relative;
}

/* --- Close Button --- */
.chat-close {
  position: absolute;
  top: 8px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
  color: #555;
  transition: color 0.2s ease;
}
.chat-close:hover {
  color: #000;
}

/* --- Chat Body --- */
.chat-body {
  display: flex;
  flex-direction: column;
  height: 420px;
  padding: 20px;
}

/* --- Messages Container --- */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chat-messages::-webkit-scrollbar {
  display: none;
}

/* --- Messages --- */
.message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 15px;
  animation: fadeIn 0.4s ease-in-out;
  word-wrap: break-word;
}

/* --- Bot & User Messages --- */
.message.bot {
  background: #f1f1f1;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}
.message.user {
  background: #dfa667;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

/* --- Input Area --- */
.chat-input-area {
  display: flex;
  align-items: center;
  border-top: 1px solid #ddd;
  padding-top: 10px;
}
.chat-input-area input {
  flex: 1;
  border: none;
  padding: 10px;
  border-radius: 20px;
  background: #f7f7f7;
  outline: none;
}
.chat-input-area button {
  background: #dfa667;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin-left: 10px;
  cursor: pointer;
  transition: background 0.3s;
}
.chat-input-area button:hover {
  background: #c78c45;
}

/* --- Typing Dots --- */
.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.dot {
  width: 6px;
  height: 6px;
  background: #dfa667;
  border-radius: 50%;
  animation: blink 1.2s infinite ease-in-out;
}
.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* --- Quick Buttons --- */
.bot-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.opt-btn {
  background: #dfa667;
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.opt-btn:hover {
  background: #c78c45;
}

/* --- Links --- */
.message.bot a {
  color: #dfa667;
  text-decoration: none;
  font-weight: 500;
}
.message.bot a:hover {
  text-decoration: underline;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* =======================================
   MOBILE RESPONSIVE FIXED CHATBOT ICON
======================================= */
@media (max-width: 768px) {
  .chat-icon {
    bottom: 30px;
    right: 20px;
    width: 80px;
    height: 80px;
    /* overflow: hidden;  */
  }

  .chat-modal {
    bottom: 110px;
    right: 10px;
  }

  .chat-modal-content {
    width: 90vw;
    height: 70vh;
  }
}

@media (max-width: 480px) {
  #chatIcon iframe {
    width: 160%;
    height: 160%;
    transform: translate(-18%, -18%);
  }
}
