/* chatbot.module.css */
.chatbotWrapper {
  position: fixed;
  bottom: 90px;
  right: 97px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chatWindow {
  width: 620px;
  max-height: 700px;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.botMessage, .userMessage {
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  max-width: 80%;
  font-size: 14px;
}
.feedbackButtons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  background-color: #f9f9f9;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.feedbackButtons button {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 6px 10px;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedbackButtons button:hover {
  background-color: #f0f0f0;
  border-color: #aaa;
  transform: scale(1.05);
}

.feedbackButtons span {
  color: #555;
}

.feedbackResponse {
  margin-top: 16px;
  background-color: #e0ffe7;
  color: #1b5e20;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.botMessage {
  background-color: #f2f2f2;
  align-self: flex-start;
  color: #333;
}

.userMessage {
  background-color: #d1e7dd;
  align-self: flex-end;
  color: #000;
}

.inputContainer {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
  background-color: #fafafa;
}

.popup {
  background-color: #4caf50;
  color: white;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  margin-top: 12px;
}
.inputContainer input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.inputContainer button {
  margin-left: 8px;
  background-color: #fc5204;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.chatbotButtonWrapper {
  position: fixed;
  bottom: 70px; /* ⬆⬆ gives ~65px space above the arrow */
  right: -9px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 10000;
}

.toggleButton {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.chatIcon {
  width: 100%;
  object-fit: contain;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cardGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px;
}

.card, .questionCard {
  background: #f7f9fb;
  border: 1px solid #ddd;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.card h4 {
  font-size: 14px;
  margin: 0;
  font-weight: 300;
}

.card:hover, .questionCard:hover {
  background-color: #e6f0ff;
  box-shadow: 0 2px 10px rgba(0, 123, 255, 0.2);
}

.answerBlock {
  background: #eef5ff;
  padding: 16px;
  border-radius: 10px;
  margin: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.backButton, .sectorButton {
  margin-bottom: 10px;
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.backButton:hover, .sectorButton:hover {
  background-color: #0056b3;
}

/* ✅ RESPONSIVE STYLES */
@media (max-width: 1024px) {
  .chatWindow {
    width: 90%;
    max-height: 80vh;
  }
}

@media (max-width: 768px) {
  .chatbotWrapper {
    bottom: 90px;
    right: 97px;
    align-items: flex-end;
  }

  .chatWindow {
    width: 100%;
    max-height: 80vh;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .inputContainer {
    flex-direction: column;
    padding: 8px;
  }

  .inputContainer input {
    width: 100%;
    margin-bottom: 8px;
  }

  .inputContainer button {
    width: 100%;
    margin-left: 0;
  }

  .cardGrid {
    grid-template-columns: 1fr;
  }

  .toggleButton {
    width: 100%;
    height: 100%;
  }

  .optionButton, .card h4, .botMessage, .userMessage, .answerBlock, .sectorButton, .backButton {
    font-size: 13px;
  }

  .botMessage, .userMessage {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .chatWindow {
    max-height: 90vh;
  }

  .toggleButton {
    width: 100%;
    height: 100%;
  }

  .cardGrid {
    padding: 8px;
    gap: 8px;
  }

  .card, .questionCard {
    padding: 10px 12px;
  }
}

