:root {
  --chat-primary: #2563eb;
  --chat-white: #ffffff;
  --chat-border: #ccc;
  --chat-radius: 12px;
  --chat-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  --chat-font: 'Segoe UI', sans-serif;
}

.chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--chat-primary);
  color: var(--chat-white);
  font-size: 24px;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9999;
  box-shadow: var(--chat-shadow);
  border: none;
}

.chatbot-box {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  max-width: 95vw;
  max-height: 80vh;
  background: var(--chat-white);
  border: 1px solid var(--chat-border);
  border-radius: var(--chat-radius);
  box-shadow: var(--chat-shadow);
  display: none;
  flex-direction: column;
  z-index: 9999;
  font-family: var(--chat-font);
  overflow: hidden;
}

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

.chatbot-header {
  background: var(--chat-primary);
  color: var(--chat-white);
  padding: 12px;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header button {
  background: transparent;
  border: none;
  color: var(--chat-white);
  font-size: 18px;
  cursor: pointer;
}

.chatbot-messages {
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  font-size: 0.95rem;
  background: #f9f9f9;
  flex: 1;
}

.chatbot-messages p {
  margin: 6px 0;
  word-wrap: break-word;
}

.chatbot-messages .user {
  text-align: right;
  color: var(--chat-primary);
}

.chatbot-messages .bot {
  text-align: left;
  color: #111;
}

.chatbot-input {
  display: flex;
  border-top: 1px solid var(--chat-border);
  background: var(--chat-white);
}

.chatbot-input input {
  flex: 1;
  padding: 10px;
  border: none;
  font-size: 0.9rem;
  outline: none;
}

.chatbot-input button {
  padding: 10px 16px;
  background: var(--chat-primary);
  color: var(--chat-white);
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

.chatbot-input button:hover {
  background: #1e4ed9;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .chatbot-box {
    width: 90%;
    right: 5%;
    bottom: 100px;
    border-radius: 12px;
  }

  .chatbot-messages {
    max-height: 60vh;
    font-size: 0.85rem;
  }

  .chatbot-toggle {
    right: 15px;
    bottom: 15px;
    font-size: 20px;
    padding: 10px;
  }

  .chatbot-header {
    font-size: 0.95rem;
  }

  .chatbot-input input {
    font-size: 0.85rem;
  }

  .chatbot-input button {
    font-size: 0.85rem;
  }
}
