
/* Chatbot Variables */
:root {
  --chat-primary: #1a5b9e;
  --chat-primary-light: #8c68a6;
  --chat-surface: #ffffff;
  --chat-bg: #f0f4f8;
  --chat-text: #333333;
  --chat-border: #e2e8f0;
  --chat-shadow: 0 10px 25px rgba(0,0,0,0.1);
  --chat-radius: 12px;
}

/* Chatbot Styles */
.chatbot-wrapper {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chatbot-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--chat-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--chat-shadow);
  cursor: pointer;
  transition: transform 0.3s ease;
  border: none;
  font-size: 24px;
}

.chatbot-btn:hover {
  transform: scale(1.05);
}

.chatbot-window {
  width: 350px;
  max-width: calc(100vw - 48px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background-color: var(--chat-surface);
  border-radius: var(--chat-radius);
  box-shadow: var(--chat-shadow);
  overflow: hidden;
  display: none; /* hidden by default */
  flex-direction: column;
  margin-bottom: 1rem;
  transform-origin: bottom right;
  border: 1px solid var(--chat-border);
}

.chatbot-window.open {
  display: flex;
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-header {
  background-color: var(--chat-primary);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.chatbot-close {
  background: transparent;
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--chat-bg);
}

.chat-bubble {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--chat-radius);
  font-size: 0.9rem;
  line-height: 1.4;
  animation: fadeIn 0.3s ease-in;
  word-wrap: break-word;
}

.chat-bubble.bot {
  align-self: flex-start;
  background-color: white;
  color: var(--chat-text);
  border-bottom-left-radius: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chat-bubble.user {
  align-self: flex-end;
  background-color: var(--chat-primary-light);
  color: white;
  border-bottom-right-radius: 0;
}

.chat-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.chat-option-btn {
  background-color: white;
  border: 1px solid var(--chat-primary-light);
  color: var(--chat-primary-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.chat-option-btn:hover {
  background-color: var(--chat-primary-light);
  color: white;
}

.chat-input {
  display: flex;
  padding: 1rem;
  background-color: var(--chat-surface);
  border-top: 1px solid var(--chat-border);
}

.chat-input input {
  flex: 1;
  border: 1px solid var(--chat-border);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.chat-input input:focus {
  border-color: var(--chat-primary-light);
}

.chat-input button {
  background-color: var(--chat-primary);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  border: none;
  cursor: pointer;
}

.chat-input button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
