* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--accent-color); /* #F2ae94 */
  border: none;
  border-radius: 9999px; /* Tailwind rounded-full */
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  font-family: 'Inter', sans-serif;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.chat-toggle svg {
  width: 24px;
  height: 24px;
  fill: #000;
  transition: transform 0.3s ease;
}

.chat-toggle.active svg {
  transform: rotate(45deg);
}

.chat-container {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  height: 500px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1002; /* Increased to ensure visibility */
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.chat-container.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.chat-header {
  background: linear-gradient(135deg, #000 0%, #000000 100%);
  color: var(--body-color); /* #ffffff */
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px; /* Tailwind rounded-full */
  background: url('../images/bot.png') no-repeat center;
  background-size: cover;
  flex-shrink: 0;
}

.agent-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.agent-info p {
  font-size: 12px;
  color: var(--bulk-text-color); /* #c4c4c4 */
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00ff62;
  border-radius: 9999px; /* Tailwind rounded-full */
  margin-left: auto;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-messages {
  height: 340px;
  overflow-y: auto;
  padding: 20px;
  background: #fafafa;
}

.message {
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
}

.message.user {
  flex-direction: row-reverse;
}

.message-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
}

.message.agent .message-bubble {
  background: white;
  color: #333;
  border: 1px solid #e5e5e5;
}

.message.user .message-bubble {
  background: var(--accent-color); /* #F2ae94 */
  color: #fff;
}

.message-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  text-align: center;
}

.chat-input {
  padding: 15px;
  border-top: 1px solid #e5e5e5;
  padding-bottom: 10px solid #e5e5e5;
  background: white;
}

.input-container {
  display: flex;
  gap: 8px;
  align-items: center; /* Changed from flex-end to center */
}

.input-container input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    resize: none;
    transition: border-color 0.2s ease;
    color: #2b2b2b; 
}

.input-container input:focus {
    border-color: #ff708f;
}

.send-button {
  width: 40px;
  height: 40px;
  background: var(--accent-color); 
  border: none;
  border-radius: 9999px; /* Tailwind rounded-full */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-button:hover {
  background: #e0637e; 
  transform: scale(1.05);
}

.send-button svg {
  width: 16px;
  height: 16px;
  fill: #000;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

@media (max-width: 420px) {
  .chat-container {
    width: calc(100vw - 24px);
    right: 12px;
    left: 12px;
    bottom: 90px;
  }
}