.chatbot-container {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 1001;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.chatbot-toggle {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #ff6600, #ff9933);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(255, 102, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.chatbot-toggle:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 12px 32px rgba(255, 102, 0, 0.6);
}

.chatbot-toggle svg {
  color: white;
  transition: transform 0.3s ease;
}

.chatbot-toggle.active svg {
  transform: rotate(180deg);
}

.chatbot-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #ff0000, #ff6600);
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  animation: pulse 2s infinite;
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 380px;
  max-height: 600px;
  background: linear-gradient(135deg, #fff 0%, #fff8dc 100%);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border: 3px solid #ff9933;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

.chatbot-window.active {
  display: flex;
}

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

.chatbot-header {
  background: linear-gradient(135deg, #ff6600, #ff9933);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #cc5200;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chatbot-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff5e6, #ffe8cc);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chatbot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chatbot-title {
  display: flex;
  flex-direction: column;
}

.chatbot-title h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.chatbot-title span {
  font-size: 0.75rem;
  color: #fff;
  opacity: 0.9;
}

.chatbot-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.chatbot-close svg {
  color: white;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(to bottom, #fff 0%, #fff8dc 100%);
  max-height: 420px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(255, 153, 51, 0.1);
  border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #ff6600, #ff9933);
  border-radius: 10px;
}

.message {
  display: flex;
  gap: 0.75rem;
  animation: fadeInMessage 0.4s ease-out;
}

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

.message.bot {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.message.bot .message-avatar {
  background: linear-gradient(135deg, #ff6600, #ff9933);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(255, 102, 0, 0.3);
}

.message.user .message-avatar {
  background: linear-gradient(135deg, #8b4513, #a0522d);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(139, 69, 19, 0.3);
}

.message-content {
  background: #fff;
  padding: 0.875rem 1.125rem;
  border-radius: 16px;
  max-width: 75%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 153, 51, 0.2);
}

.message.bot .message-content {
  border-bottom-left-radius: 4px;
  background: linear-gradient(135deg, #fff 0%, #fffaf0 100%);
}

.message.user .message-content {
  border-bottom-right-radius: 4px;
  background: linear-gradient(135deg, #ff9933, #ffb366);
  color: white;
  border: 1px solid #ff6600;
}

.message-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  color: #4a2511;
}

.message.user .message-text {
  color: white;
}

.message-time {
  font-size: 0.7rem;
  color: #8b4513;
  margin-top: 0.25rem;
  opacity: 0.7;
}

.message.user .message-time {
  color: rgba(255, 255, 255, 0.9);
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.quick-reply-btn {
  background: linear-gradient(135deg, #fff 0%, #fff5e6 100%);
  border: 2px solid #ff9933;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a2511;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(255, 102, 0, 0.2);
}

.quick-reply-btn:hover {
  background: linear-gradient(135deg, #ff6600, #ff9933);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 102, 0, 0.3);
}

.typing-indicator {
  display: flex;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 153, 51, 0.2);
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6600;
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.chatbot-input-area {
  padding: 1rem;
  background: linear-gradient(135deg, #fff5e6, #ffe8cc);
  border-top: 2px solid #ff9933;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.chatbot-input {
  flex: 1;
  padding: 0.875rem 1.125rem;
  border: 2px solid #ff9933;
  border-radius: 24px;
  font-size: 0.95rem;
  outline: none;
  background: #fff;
  color: #4a2511;
  transition: all 0.3s ease;
}

.chatbot-input:focus {
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

.chatbot-input::placeholder {
  color: #a0522d;
  opacity: 0.6;
}

.chatbot-send {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ff6600, #ff9933);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
  flex-shrink: 0;
}

.chatbot-send:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(255, 102, 0, 0.4);
}

.chatbot-send:active {
  transform: scale(0.95);
}

.chatbot-send svg {
  color: white;
}

@media (max-width: 768px) {
  .chatbot-container {
    left: 50%;
    transform: translateX(-50%);
    bottom: 1rem;
  }

  .chatbot-window {
    width: calc(100vw - 2rem);
    max-width: 380px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 70px;
  }

  .chatbot-window.active {
    display: flex;
  }

  .chatbot-toggle {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 1.5rem);
    max-height: 500px;
  }

  .chatbot-messages {
    max-height: 340px;
  }

  .message-content {
    max-width: 80%;
  }

  .chatbot-toggle {
    width: 52px;
    height: 52px;
  }
}
