/* --- Chatbot Container --- */
.chatbot-container {
  position: fixed;
  bottom: 90px;
  right: 35px;
  width: 420px;
  height: 520px;
  display: flex;
  flex-direction: column;
  background: rgba(15, 15, 15, 0.98);
  border: 1.5px solid #ff6d1b;
  border-radius: 20px;
  box-shadow: 0 0 35px rgba(255, 109, 27, 0.35);
  font-family: "Poppins", sans-serif;
  z-index: 9999;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: all 0.4s ease;
}

/* --- Header --- */
.chatbot-header {
  background: linear-gradient(135deg, #222, #2e2e2e);
  color: #ffffff;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid rgba(255, 109, 27, 0.3);
  box-shadow: 0 2px 10px rgba(255, 109, 27, 0.15);
}

.chatbot-header img {
  height: 28px;
  width: auto;
  margin-right: 8px;
}

.chatbot-header span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}

.chatbot-header button {
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  transition: 0.3s ease;
}
.chatbot-header button:hover {
  color: #ff7a29;
  transform: scale(1.25);
}

/* --- Chat Body --- */
.chatbot-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: linear-gradient(180deg, #1a1a1a, #0e0e0e);
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

/* --- Message Bubbles --- */
.chatbot-message {
  padding: 11px 15px;
  border-radius: 16px;
  max-width: 78%;
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
  word-wrap: break-word;
}

.chatbot-message.bot {
  background: linear-gradient(135deg, #252525, #161616);
  align-self: flex-start;
  border: 1px solid rgba(255, 109, 27, 0.2);
  box-shadow: 0 0 12px rgba(255, 109, 27, 0.15);
  color: #eaeaea;
}

.chatbot-message.user {
  background: linear-gradient(135deg, #ff6d1b, #e34d00);
  color: #ffffff;
  align-self: flex-end;
  box-shadow: 0 0 15px rgba(255, 109, 27, 0.35);
}

/* --- Typing Animation --- */
.typing {
  display: inline-block;
  padding: 8px 14px;
  font-style: italic;
  color: #ffb88a;
  background: rgba(40, 40, 40, 0.9);
  border: 1px solid rgba(255, 109, 27, 0.25);
  border-radius: 12px;
  align-self: flex-start;
  box-shadow: 0 0 10px rgba(255, 109, 27, 0.25);
  animation: typingGlow 1.4s infinite alternate;
}
@keyframes typingGlow {
  from { box-shadow: 0 0 5px rgba(255, 109, 27, 0.2); }
  to { box-shadow: 0 0 15px rgba(255, 109, 27, 0.5); }
}

/* --- FAQ Buttons --- */
.faq-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.faq-btn {
  background: linear-gradient(90deg, #2a2a2a, #232323);
  color: #f5f5f5;
  border: 1px solid rgba(255, 109, 27, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
  box-shadow: 0 0 6px rgba(255, 109, 27, 0.1);
}
.faq-btn:hover {
  background: linear-gradient(90deg, #ff6d1b, #e34d00);
  color: #fff;
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(255, 109, 27, 0.4);
}

/* --- Option Buttons --- */
.options {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  gap: 10px;
}
.option-btn {
  flex: 1;
  background: #242424;
  color: #ffffff;
  border: 1px solid rgba(255, 109, 27, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: 0.3s;
  text-align: center;
  font-size: 14px;
  box-shadow: 0 0 6px rgba(255, 109, 27, 0.15);
}
.option-btn:hover {
  background: linear-gradient(135deg, #ff6d1b, #e34d00);
  color: #fff;
  transform: scale(1.05);
}

/* --- Footer --- */
.chatbot-footer {
  display: flex;
  background: #1f1f1f;
  border-top: 1px solid rgba(255, 109, 27, 0.3);
}
.chatbot-footer input {
  flex: 1;
  background: transparent;
  color: white;
  border: none;
  outline: none;
  padding: 12px;
  font-size: 14px;
}
.chatbot-footer button {
  background: linear-gradient(135deg, #ff6d1b, #e34d00);
  color: white;
  border: none;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 109, 27, 0.3);
}
.chatbot-footer button:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(255, 109, 27, 0.45);
}

/* --- Floating Chat Button --- */
.chatbot-footer-btn {
  position: fixed;
  bottom: 25px;
  right: 45px;
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  border: none;
  border-radius: 40px;
  padding: 16px 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  box-shadow: 0 0 25px rgba(255, 109, 27, 0.55);
  transition: all 0.3s ease;
  z-index: 9999;
}
.chatbot-footer-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 35px rgba(255, 122, 41, 0.7);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Scrollbar Hidden --- */
.chatbot-body::-webkit-scrollbar {
  width: 0;
}

/* --- RESPONSIVE DESIGN FIX --- */

/* Tablet */
@media (max-width: 1024px) {
  .chatbot-container {
    width: 380px;
    bottom: 70px;
    right: 25px;
    height: 480px;
  }
}

/* Mobile Landscape and Portrait */
@media (max-width: 768px) {
  .chatbot-container {
    width: 90%;
    right: 5%;
    bottom: 80px;
    height: 75%;
    border-radius: 16px;
    border: 1px solid rgba(255, 109, 27, 0.35);
  }

  .chatbot-header {
    font-size: 14px;
    padding: 12px 14px;
  }

  .chatbot-header img {
    height: 24px;
  }

  .chatbot-body {
    padding: 14px;
  }

  .faq-btn,
  .option-btn {
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .chatbot-footer {
    padding: 4px;
  }

  .chatbot-footer input {
    font-size: 13px;
    padding: 10px;
  }

  .chatbot-footer button {
    padding: 10px 16px;
    font-size: 13px;
  }

  .chatbot-footer-btn {
    bottom: 25px;
    right: 25px;
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 35px;
    background: linear-gradient(135deg, #ff6d1b, #e34d00);
    box-shadow: 0 0 20px rgba(255, 109, 27, 0.55);
  }
}

/* Small Mobile (e.g. 320px–480px) */
@media (max-width: 480px) {
  .chatbot-container {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    background: #0e0e0e;
  }

  .chatbot-header {
    padding: 10px 12px;
    font-size: 13px;
  }

  .chatbot-body {
    padding: 12px;
    gap: 6px;
  }

  .chatbot-message {
    font-size: 13px;
    line-height: 1.4;
  }

  .faq-btn,
  .option-btn {
    font-size: 12px;
    padding: 8px;
  }

  .chatbot-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    background: #1a1a1a;
  }

  .chatbot-footer-btn {
    bottom: 20px;
    right: 20px;
    padding: 12px 22px;
    font-size: 14px;
    border-radius: 30px;
  }
}

/* Extra Small (e.g. iPhone SE) */
@media (max-width: 360px) {
  .chatbot-container {
    height: 100%;
    width: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }

  .chatbot-footer-btn {
    bottom: 15px;
    right: 15px;
    font-size: 13px;
    padding: 10px 20px;
  }

  .chatbot-message {
    font-size: 12px;
  }

  .faq-btn {
    font-size: 12px;
    padding: 7px;
  }
}
