/* This is how you make it customizable. Change these values! */
:root {
  --primary-color: #007bff;
  --secondary-color: #f8f9fa;
  --text-color: #333;
  --bot-message-bg: #eee;
  --user-message-bg: var(--primary-color);
  --user-message-color: #fff;
}

/* The floating bubble button */
.chat-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 9998;
}

/* The main chat window */
.chat-widget-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0); /* Hidden by default */
  transform-origin: bottom right;
  transition: transform 0.2s ease-out;
  z-index: 9999;
}

.chat-widget-container.open {
  transform: scale(1); /* Visible */
}

/* Header, Tabs, and Content */
.chat-widget-header {
  padding: 15px;
  background: var(--primary-color);
  color: white;
  font-weight: bold;
}

.chat-widget-tabs {
  display: flex;
  background: var(--secondary-color);
}
.chat-widget-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.chat-widget-tab.active {
  border-bottom-color: var(--primary-color);
  font-weight: bold;
}

.chat-widget-body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.chat-tab-content, .contact-tab-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  display: flex;
  flex-direction: column;
}
.chat-tab-content.active, .contact-tab-content.active {
  opacity: 1;
  visibility: visible;
}

/* Chat Messages Area */
.chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}
.message {
  padding: 8px 12px;
  border-radius: 18px;
  margin-bottom: 10px;
  max-width: 80%;
}
.message.bot {
  background: var(--bot-message-bg);
  color: var(--text-color);
  align-self: flex-start;
}
.message.user {
  background: var(--user-message-bg);
  color: var(--user-message-color);
  align-self: flex-end;
  margin-left: auto; /* Pushes to the right */
}

/* Chat Input Area */
.chat-input-area {
  display: flex;
  border-top: 1px solid #ddd;
}
#chat-input {
  flex: 1;
  border: none;
  padding: 15px;
  outline: none;
}
#chat-send-btn {
  border: none;
  background: var(--primary-color);
  color: white;
  padding: 0 20px;
  cursor: pointer;
}

/* Contact Form Area */
.contact-tab-content {
  padding: 20px;
  overflow-y: auto;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box; /* Important! */
}
#contact-submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}
/* --- ADD THIS: NEW STYLES --- */

/* Callout Bubble (the "Need Help?" pop-up) */
.chat-callout {
  position: fixed;
  bottom: 30px; /* Aligns with the main bubble */
  right: 90px; /* Sits to the left of the main bubble */
  background: white;
  padding: 8px 15px;
  border-radius: 18px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  font-size: 14px;
  font-family: Arial, sans-serif;
  color: var(--text-color);
  cursor: pointer;
  z-index: 9997; /* Just behind the main bubble */
  opacity: 1;
  transition: opacity 0.2s;
}

/* Hide callout when chat window is open */
.chat-widget-container.open + .chat-callout {
  opacity: 0;
}

/* New Header with Avatar */
.chat-widget-header {
  padding: 15px;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  gap: 10px; /* Space between avatar and text */
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.header-text {
  display: flex;
  flex-direction: column;
}
.header-text strong {
  font-weight: bold;
  font-size: 16px;
}
.header-text small {
  font-size: 12px;
  opacity: 0.9;
}


/* --- UPDATE THIS: EXISTING BUBBLE STYLE --- */
/* We are just changing the font-size to better fit an SVG/emoji */
.chat-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px; /* Updated from 24px */
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 9998;
}