#chatbot-button {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: linear-gradient(135deg, #a84300, #cc5200);
  color: white;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 
    0 12px 28px rgba(0, 0, 0, 0.30),
    0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

#chatbot-button:hover {
  transform: scale(1.08);
  box-shadow: 
    0 16px 34px rgba(0, 0, 0, 0.36),
    0 6px 14px rgba(0, 0, 0, 0.22);
  filter: brightness(1.1);
}

#chatbot-button i {
  font-size: 23px;
  display: block;
}

#chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 360px;
  height: 500px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 
    0 18px 45px rgba(0, 0, 0, 0.28),
    0 6px 18px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: "Arial", sans-serif;
  border: 1px solid rgba(204, 82, 0, 0.15);
  animation: chatbotFadeIn 0.25s ease;
}

#chatbot-window,
.bot-message,
.user-message,
#chatbot-input,
#chatbot-header {
  letter-spacing: 0.4px;
}

#chatbot-window.hidden {
  display: none;
}

@keyframes chatbotFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#chatbot-header {
  background: linear-gradient(135deg, #cc5200, #e06a1a);
  color: white;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 
    0 6px 18px rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

#chatbot-close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  line-height: 1;
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.18),
    0 1px 3px rgba(0, 0, 0, 0.12);
}

#chatbot-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

#chatbot-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: linear-gradient(180deg, #fafafa, #f3f3f3);
}

.bot-message,
.user-message {
  padding: 11px 13px;
  margin-bottom: 12px;
  border-radius: 15px;
  max-width: 86%;
  font-size: 14.5px;
  line-height: 1.6;
  font-weight: 400;
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.10);
}

.bot-message {
  background: #ffffff;
  color: #2d2d2d;
  border-bottom-left-radius: 5px;
}

.user-message {
  background: linear-gradient(135deg, #cc5200, #e06a1a);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 5px;
  box-shadow: 
    0 7px 18px rgba(204, 82, 0, 0.32),
    0 2px 7px rgba(0, 0, 0, 0.16);
}

#chatbot-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid #eeeeee;
  box-shadow: 
    0 -6px 18px rgba(0, 0, 0, 0.22),
    0 -2px 6px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

#chatbot-input {
  flex: 1;
  border: 1px solid #dddddd;
  padding: 11px 13px;
  outline: none;
  font-size: 14px;
  border-radius: 20px;
  font-family: "Arial", sans-serif;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

#chatbot-input:focus {
  border-color: #cc5200;
  box-shadow: 
    0 0 0 3px rgba(204, 82, 0, 0.12),
    inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

#chatbot-send {
  border: none;
  background: linear-gradient(135deg, #cc5200, #e06a1a);
  color: white;
  padding: 11px 16px;
  cursor: pointer;
  border-radius: 20px;
  font-family: "Arial", sans-serif;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

#chatbot-send:hover {
  transform: translateY(-3px);
  opacity: 0.95;
  box-shadow: 
    0 10px 22px rgba(0, 0, 0, 0.22),
    0 4px 10px rgba(0, 0, 0, 0.16);
}

.loading-message {
  display: flex;
  align-items: center;
  gap: 4px;
  color: transparent;
  width: fit-content;
}

.loading-message::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #cc5200;
  border-radius: 50%;
  box-shadow: 10px 0 #cc5200, 20px 0 #cc5200;
  animation: typingDots 1s infinite ease-in-out;
}

@keyframes typingDots {
  0% {
    box-shadow: 10px 0 #cc5200, 20px 0 #cc5200;
    opacity: 0.4;
  }

  50% {
    box-shadow: 10px 0 #a84300, 20px 0 #cc5200;
    opacity: 1;
  }

  100% {
    box-shadow: 10px 0 #cc5200, 20px 0 #cc5200;
    opacity: 0.4;
  }
}

@media (max-width: 480px) {
  #chatbot-window {
    right: 12px;
    left: 12px;
    width: auto;
    height: 75vh;
    bottom: 90px;
  }

  #chatbot-button {
    right: 18px;
    bottom: 18px;
  }
}