#chatbot {
  position: fixed;
  bottom: 2%;
  right: 2%;
  width: 320px;
  height: 70vh;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  font-family: Arial, sans-serif;
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: fadeIn 0.3s ease-in-out;
  z-index: 1002;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#chatbot-header {
  background-color: #fbc723;
  color: white;
  padding: 12px;
  font-size: 18px;
  text-align: center;
  font-weight: bold;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#close-btn, #back-btn {
  position: absolute;
  top: 10px;
  background: transparent;
  color: white;
  font-size: 20px;
  border: none;
  cursor: pointer;
}
#close-btn { right: 10px; }
#back-btn { left: 10px; display: none; }

#chatbox {
  height: 70%; 
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  margin: 5px 0;
  padding: 10px 15px;
  border-radius: 15px;
  display: inline-block;
  max-width: 75%;
  opacity: 0;
  animation: slideIn 0.3s forwards ease-in-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.bot { background-color: #f1f1f1; color: #333; align-self: flex-start; }
.user { background-color: #fbc723 ; color: #fff; align-self: flex-end; }

#categories, #questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 15px;
  border-top: 1px solid #ddd;
  background-color: #f9f9f9;
  justify-content: flex-start;
  overflow-y: auto;
  min-height: 120px;
  max-height: 200px; 
}

.category-btn, .question-btn {
  background-color: #fbc723;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease;
  flex-grow: 1;
  flex-basis: calc(50% - 8px);
}
.question-btn {
  background-color: #fbc723;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease;
  flex-grow: 1;
  flex-basis: 100%; 
}
.delais-btn {
  flex-basis: calc(50% - 8px);
}

.category-btn:hover, .question-btn:hover {
  background-color: #c09918;
}

.question-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}
@media (min-width: 601px) {

#chatbot-toggle {
    position: fixed;
    bottom: 3%;
    right: 6%;
    background-color: #fbc723;
    color: white;
    padding: 15px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    }
}
@media (max-width: 600px) {
  #chatbot {
    width: 100%;
    height: 100%;
    border-radius: 0;
    bottom: 0;
    right: 0;
  }
  #chatbot-toggle {
    position: fixed;
    bottom: 3%;
    left: 5%;
    background-color: #fbc723;
    color: white;
    padding: 15px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
  }
}
