#voice-live-chat-widget {
  /* ============================================= */
  /* THEMING & CUSTOMIZATION VARIABLES (Defaults)  */
  /* ============================================= */
  --chat-primary-color: #b70b17;
  --chat-background-color: #ffffff;
  --chat-header-color: #f0f2f5;
  --chat-header-text-color: #333333;
  --chat-font-family: 'Inter', sans-serif;
  --chat-base-font-size: 16px;
  --chat-title-font-size: 1.1rem;
  --chat-bot-message-bg: #f0f2f5;
  --chat-bot-message-text: #212529;
  --chat-user-message-bg: var(--chat-primary-color);
  --chat-user-message-text: #ffffff;
  --chat-border-color: #e0e0e0;
  --chat-input-bg: #ffffff;
  --chat-input-text: #212529;

  /* ============================================= */
  /* BASE WIDGET STYLES                            */
  /* ============================================= */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--chat-font-family);
  font-size: var(--chat-base-font-size);
  background-color: var(--chat-background-color);
  z-index: 9999;
}

.chat-main-content {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: var(--chat-header-color);
  color: var(--chat-header-text-color);
  border-bottom: 1px solid var(--chat-border-color);
}

.chat-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
}

.chat-title {
  margin: 0;
  font-size: var(--chat-title-font-size);
  font-weight: 600;
}

.chat-subtitle {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.8;
}

.header-controls {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.font-controls {
  display: flex;
  align-items: center;
  margin-right: 10px;
  border: 1px solid var(--chat-border-color);
  border-radius: 20px;
  overflow: hidden;
}

.font-controls button {
  background: none;
  border: none;
  color: var(--chat-header-text-color);
  cursor: pointer;
  padding: 4px 10px;
  font-size: 0.9em;
  line-height: 1;
}

.font-controls button:first-child {
  border-right: 1px solid var(--chat-border-color);
}

.dark-mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--chat-header-text-color);
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-messages {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background-color: var(--chat-background-color);
}

.message {
  display: flex;
  margin-bottom: 10px;
  max-width: 85%;
}

.message p {
  padding: 10px 15px;
  border-radius: 18px;
  margin: 0;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Bot message content styling */
.bot-message-content {
  padding: 10px 15px;
  border-radius: 18px;
  background-color: var(--chat-bot-message-bg);
  color: var(--chat-bot-message-text);
  border-bottom-left-radius: 4px;
  line-height: 1.4;
  word-wrap: break-word;
}

.bot-message-content p {
  margin: 0 0 10px 0;
  padding: 0;
  background: none;
  border-radius: 0;
  line-height: inherit;
}

.bot-message-content p:last-child {
  margin-bottom: 0;
}

.bot-message-content strong {
  font-weight: 600;
}

.bot-message-content em {
  font-style: italic;
}

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

.message.bot p {
  background-color: var(--chat-bot-message-bg);
  color: var(--chat-bot-message-text);
  border-bottom-left-radius: 4px;
}

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

.message.user p {
  background-color: var(--chat-user-message-bg);
  color: var(--chat-user-message-text);
  border-bottom-right-radius: 4px;
}

.chat-input-form {
  display: flex;
  padding: 0.75rem;
  border-top: 1px solid var(--chat-border-color);
  background-color: var(--chat-background-color);
}

.chat-input {
  flex-grow: 1;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 10px 15px;
  font-family: var(--chat-font-family);
  font-size: 1rem;
  background-color: var(--chat-input-bg);
  color: var(--chat-input-text);
}

.chat-send-btn {
  background: var(--chat-primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin-left: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================= */
/* DARK MODE THEME                               */
/* ============================================= */
#voice-live-chat-widget.dark-mode {
  --chat-background-color: #000000;
  --chat-header-color: #1E1E1E;
  --chat-header-text-color: #E0E0E0;
  --chat-border-color: #333333;
  --chat-bot-message-bg: #2A2A2B;
  --chat-bot-message-text: #E0E0E0;
  --chat-input-bg: #2A2A2B;
  --chat-input-text: #E0E0E0;
}

.dark-mode .chat-messages {
  background-color: var(--chat-background-color);
}
.dark-mode .chat-header {
  background-color: var(--chat-header-color);
  border-bottom: 1px solid var(--chat-border-color);
}
.dark-mode .chat-input-form {
  background-color: var(--chat-background-color);
  border-top: 1px solid var(--chat-border-color);
}
.dark-mode .chat-input {
  background-color: var(--chat-input-bg);
  color: var(--chat-input-text);
  border: 1px solid var(--chat-border-color);
}
.dark-mode .bot-message-content {
  background-color: var(--chat-bot-message-bg);
  color: var(--chat-bot-message-text);
}
.dark-mode-toggle .icon-sun {
  display: none;
}
.dark-mode .dark-mode-toggle .icon-sun {
  display: block;
}
.dark-mode .dark-mode-toggle .icon-moon {
  display: none;
}
.font-controls button:hover,
.dark-mode-toggle:hover {
  background-color: rgba(0,0,0,0.1);
}
.dark-mode .font-controls button:hover,
.dark-mode .dark-mode-toggle:hover {
  background-color: rgba(255,255,255,0.1);
}

/* Typing indicator animation */
.typing-animation {
  padding: 10px 15px;
  border-radius: 18px;
  background-color: var(--chat-bot-message-bg);
  color: var(--chat-bot-message-text);
  border-bottom-left-radius: 4px;
  display: flex;
  align-items: center;
  min-height: 20px;
}

.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--chat-bot-message-text);
  opacity: 0.4;
  animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

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

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

@keyframes typing-bounce {
  0%, 80%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Dark mode support for typing indicator */
.dark-mode .typing-animation {
  background-color: var(--chat-bot-message-bg);
  color: var(--chat-bot-message-text);
}

.dark-mode .typing-dot {
  background-color: var(--chat-bot-message-text);
}

/* ============================================= */
/* FONT SIZE THEMES                              */
/* ============================================= */
#voice-live-chat-widget.font-sm {
  --chat-base-font-size: 14px;
}
#voice-live-chat-widget.font-md {
  --chat-base-font-size: 16px;
}
#voice-live-chat-widget.font-lg {
  --chat-base-font-size: 18px;
}
/* ============================================= */
/* MOBILE RESPONSIVE STYLES                      */
/* ============================================= */
@media (max-width: 768px) {
  
  /* Make the main chat content area fill the screen */
  .chat-main-content {
    max-width: 100%;
  }

  /* Optional: Reduce padding on the sides for more space */
  .chat-header,
  .chat-messages,
  .chat-input-form {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}