.elementor-5526 .elementor-element.elementor-element-54554cc{--display:flex;--padding-top:0px;--padding-bottom:0px;--padding-left:0px;--padding-right:0px;}/* Start custom CSS for html, class: .elementor-element-a87a6d9 *//* --- 1. Custom CSS Variables (Andy Speaks Africa Theme) --- */
:root {
  --chat-color-primary: #e74266; /* Red/Pink Accent */
  --chat-color-secondary: #20b69e; /* Teal/Green User Messages */
  --chat-color-dark-blue: #284493; /* Header Color: #284493 */
  --chat-color-ai-highlight: #38d3bf; /* Neuro-Ai highlight color */
  --chat-color-light: #EcEcEc; /* Message Area Background */
  --chat-color-white: #FCFDFC;
  --chat-color-dark: #333333; /* Default text color */
  --chat-spacing: 1rem;
  --chat-border-radius: 0.5rem;
  --input-area-height: 50px; /* Estimated height for padding + input */
}

/* --- 2. Main Chat Container Styles --- */
#chat-container {
  position: fixed;
  bottom: var(--chat-spacing);
  right: var(--chat-spacing);
  max-width: 100%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  border-radius: var(--chat-border-radius);
  overflow: hidden;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', Arial, sans-serif;
  background-color: var(--chat-color-white);
  height: 80vh;
  min-height: 500px;
  width: 400px;
}

/* Responsive Heights and Widths */
@media (min-width: 1025px) {
  #chat-container {
    height: 80vh;
    width: 400px;
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
  #chat-container {
    height: 75vh;
    width: 400px;
  }
}
@media (max-width: 767px) {
  #chat-container {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100svh; /* ✅ Uses the visible viewport height, not full screen */
    border-radius: 0;
  }
}

/* --- STATE 1: Initial Screen Specifics (SIGNUP, WELCOME) --- */
.is-initial-screen {
  background-color: var(--chat-color-white);
}
.is-initial-screen #chat-header {
  display: none;
}
/* Only hide chat-messages and chat-mode topics on initial screens */
.is-initial-screen #chat-messages,
.is-initial-screen #starter-topics-container {
  display: none !important;
}
.is-initial-screen #main-screen-content {
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--chat-spacing);
  /* REFINED: Set padding-bottom to 0 for initial screens (like signup) */
  padding-bottom: 0;
}

#main-screen-content {
  /* CRITICAL: Makes this the primary Flex container 
   * between the header (#chat-header) and input (#chat-input-area).
   */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Prevents double scrollbar */
}

/* --- STATE 2: Chat Started (CHAT) --- */
.is-chat-started #initial-title,
.is-chat-started #initial-content-area,
.is-chat-started #signup-area,
.is-chat-started #welcome-area {
  display: none !important;
}
.is-chat-started #chat-messages {
  background: var(--chat-color-light);
  /* Adjust padding to account for the fixed input area */
  padding-bottom: calc(var(--input-area-height) + 10px);
}

/* --- 3. Header (Visible in CHAT state) --- */
/* =========================================================
   Chat Header — Mobile First Design
========================================================= */
#chat-header {
  background-color: #304D9B;
  display: flex;
  justify-content: center; /* centers logo by default (mobile) */
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  padding: 0;
  border-radius: 8px 8px 0 0;
  z-index: 10;
}


#chat-logo img {
  height: 45px;
  width: auto;
  display: block;
  position: absolute;
  left: 40%;
  top: 0px;
}

@media (max-width: 768px) {
  #chat-logo {
    position: absolute;
    top: 2px; /* adjust vertical position for mobile */
    left: 45%;
    transform: translateX(-50%);
    z-index: 999;
    width: 120px; /* optional: resize logo for mobile */
    height: auto;
  }
}


/* New Chat button (mobile left) */
#new-chat-btn {
  position: absolute;
  left: 60px;
  color: #304D9B;
  background: #166ce4;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

#new-chat-btn:hover {
  background: #f2f2f2;
}

/* =========================================================
   Tablet & Desktop Layout (≥768px)
========================================================= */
@media (min-width: 768px) {
  #chat-header {
    justify-content: space-between; /* logo left, button right */
    max-width: 400px;
  }

  #chat-logo {
    position: static;
    transform: none;
    margin-left: 15px;
  }

  #chat-logo img {
    height: 50px;
  }

  #new-chat-btn {
    position: static;
    margin-right: 15px;
    background-color: #166ce4;
    color: #304D9B;
  }

  #new-chat-btn:hover {
    background-color: #f2f2f2;
  }
}

#chat-title-group h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--chat-color-white);
}

/* --- 4. Large Header Title (Visible in SIGNUP/WELCOME) --- */
#initial-title {
  text-align: center;
  padding-top: 10px;
  flex-shrink: 0;
  padding-bottom: 0px;
  margin-bottom: -30px;
}
#initial-title h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--chat-color-dark-blue);
  margin: 0 0 10px 0;
}

/* --- 5. Initial Content Area (Image & Text) --- */
#initial-content-area {
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  overflow: hidden;
  padding-bottom: 0;
}

.asa-logo-container {
  flex-grow: 1;
  justify-content: center;
  align-items: center;
}
#asa-logo-image {
  max-width: 90%;
  height: auto;
  max-height: 30vh;
  min-height: 10vh;
  margin: 0 auto;
  margin-top: 0px;
  object-fit: contain;
  flex-shrink: 0;
  margin-bottom: -20px;
}

/* SIGNUP TEXT: Meet Neuro-Ai */
.signup-text-container {
  margin-top: 20px;
  padding-bottom: 20px;
  flex-shrink: 0;
}

.signup-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.signup-title .highlight {
  color: var(--chat-color-ai-highlight);
}

/* WELCOME CONTENT STYLING */
.welcome-message-container {
  margin-top: 20px;
  padding-bottom: 20px;
  flex-shrink: 0;
}

.welcome-statement {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--chat-color-dark-blue);
  margin: 0;
}

/* --- 6. Sign-Up Form Container (Aligned to bottom) --- */
#signup-area {
  display: none;
  flex-shrink: 0;
  background: var(--chat-color-white);
  margin-top: auto;
  margin-bottom: 0;
  padding-bottom: 15px; /* Ensures a small buffer above the bottom edge */
}
#signup-area.is-visible {
  display: block;
}

.signup-subtext {
  text-align: center;
  margin-top: 0px;
  margin-bottom: 1rem;
  color: var(--chat-color-dark);
  flex-shrink: 0;
}

/* FORM STYLES */
.form-row {
  margin-bottom: 1rem;
}
.form-row:last-of-type {
  margin-bottom: 1rem;
}
.form-row input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: var(--chat-border-radius);
  box-sizing: border-box;
  font-size: 1rem;
}

#get-started-btn {
  width: 100%;
  background: var(--chat-color-secondary);
  color: var(--chat-color-white);
  border: none;
  border-radius: 2rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0; /* No margin below the button itself */
  transition: background 0.2s;
}
#get-started-btn:hover {
  filter: brightness(115%);
}
#get-started-btn:active {
  background: #284393;
}

/* --- 7. Welcome Page Area (STATE_WELCOME / New Chat Screen) --- */
#welcome-area {
  flex-grow: 1;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  background: var(--chat-color-white);
  max-height: calc(100% - 260px);
}
#welcome-area.is-visible {
  display: flex;
}

/* Title for suggested topics within the welcome-area */
#welcome-area .topic-title {
  font-weight: bold;
  margin-top: 0px;
  margin-bottom: 10px;
  text-align: center;
}

/* Container for welcome-page topics */
.welcome-topics-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 50px;
  justify-content: center;
  padding-top: 0.5rem;
}

/* --- 8. Remaining styles for chat mode... --- */
#chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  background: #EBEBEB;
  padding: var(--chat-spacing);
  gap: 10px;
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--input-area-height) + 0px);
}
.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 15px 20px 10px 20px;
  margin-bottom: 30px;
  max-width: 80%;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); /* subtle default shadow */
}

/* Bot message (refined) */
.bot-message {
  background: var(--chat-color-white);
  color: var(--chat-color-dark);
  align-self: flex-start;
  border-top-left-radius: 0.3rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  line-height: 1.6;
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
  padding-bottom: 20px;
  max-width: 95%;
  word-wrap: break-word;
}

/* Heading hierarchy */
.bot-message h1 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  color: #111;
}
.bot-message h2 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 0.3rem 0;
  color: #1a1a1a;
}
.bot-message h3 {
  font-size: 0.96rem;
  font-weight: 500;
  margin: 0 0 0.25rem 0;
  color: #222;
}
.bot-message h4 {
  font-size: 0.92rem;
  font-weight: 400;
  margin: 0 0 0.2rem 0;
  color: #333;
}

/* Nested heading weight reduction */
.bot-message ul h1,
.bot-message ol h1,
.bot-message ul h2,
.bot-message ol h2,
.bot-message ul h3,
.bot-message ol h3 {
  font-weight: 600;
}

.bot-message ul ul h1,
.bot-message ol ol h1,
.bot-message ul ul h2,
.bot-message ol ol h2,
.bot-message ul ul h3,
.bot-message ol ol h3 {
  font-weight: 400;
  font-size: 0.9rem;
  color: #444;
}

/* List styling and indentation */
.bot-message ul,
.bot-message ol {
  margin: 0.35rem 0 0.5rem 1.2rem;
  padding-left: 1rem;
}

.bot-message li {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

/* Bullet and numbering hierarchy */
.bot-message ul {
  list-style-type: disc; /* Level 1: • */
}

.bot-message ul ul {
  list-style-type: circle; /* Level 2: ◦ */
}

.bot-message ul ul ul {
  list-style-type: "– "; /* Level 3: – */
}

/* Numbered lists maintain consistent decimal style */
.bot-message ol {
  list-style-type: decimal;
}

/* Nested lists deeper indentation */
.bot-message ul ul,
.bot-message ol ol,
.bot-message ul ol,
.bot-message ol ul {
  margin-left: 1.2rem;
  padding-left: 1rem;
}

/* Links */
.bot-message a {
  color: #304D9B;
  text-decoration: underline;
  font-weight: 600;
}
.bot-message a:hover {
  color: #1f3375;
}

/* Paragraph spacing – compact */
.bot-message p {
  margin: 0px 0;
}

/* Inline emphasis */
.bot-message strong {
  font-weight: 600;
}
.bot-message em {
  font-style: italic;
}

/* User message */
.user-message {
  background: var(--chat-color-secondary);
  color: var(--chat-color-white);
  align-self: flex-end;
  border-bottom-right-radius: 0.3rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  margin: 0;
  padding-bottom: 1rem;
  padding-top: 0.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.user-message p {
  margin: 0;
  line-height: 1.2; /* keeps text compact */
}

/* Added: Typing Indicator Style (Referenced in JS) */
.typing-indicator {
  font-style: italic;
  opacity: 0.7;
}

/* --- Starter Topics Container (Old Design Retained) --- */
#starter-topics-container,
#welcome-area .welcome-topics-container {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0;
}

/* --- Topic Buttons (Old Design Retained) --- */
.suggested-topic-btn,
#welcome-area .suggested-topic-btn {
  background: var(--chat-color-white);
  color: var(--chat-color-dark);
  border: 1px solid #ddd;
  border-radius: 1.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.suggested-topic-btn:hover,
#welcome-area .suggested-topic-btn:hover {
  background: #284493;
  color: #fff;
}

/* --- Welcome Area Header (Centered & Clean) --- */
#welcome-area .topic-header {
  display: flex;
  align-items: center;
  justify-content: center; /* centers content horizontally */
  gap: 10px;
  padding: 10px 14px;
  background: var(--chat-color-white);
  border-radius: 8px 8px 0 0;
  text-align: center;
}

#welcome-area .topic-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #000;
}

/* --- Refresh Button Styling (With Shadow) --- */
#welcome-area #refresh-topics-btn {
  background: #E2E6F3;
  border: 1px;
  border-color: #000000;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.5s ease, transform 0.9s ease;
  box-shadow: 0 2px 5px rgba(0.02, 0.05, 0.08, 0.12); /* subtle shadow */
}

#welcome-area #refresh-topics-btn svg {
  width: 20px;
  height: 20px;
  fill: #284493;
  display: block;
}

#welcome-area #refresh-topics-btn:hover {
  background: #284493;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

#welcome-area #refresh-topics-btn:hover svg {
  fill: #fff;
  transform: rotate(180deg);
}



/* --- 9. FIXED INPUT AREA STYLES (Now fixed at the bottom of the container) --- */
#chat-input-area {
  bottom: 0px;
  flex-shrink: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  /* Original Paddings */
  padding-top: 10px;
  padding-bottom: 20px;
  padding-right: 15px;
  padding-left: 15px;
  /* Centering Fix: Use align-items to center the input and button vertically */
  align-items: center;
  margin-top: -40px;
  width: 100%;
  box-sizing: border-box;
  display: none;
  background-color: #FCFCFCC7;
}

.chat-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

#chat-input {
  flex-grow: 1;
  border: 1px solid #ccc;
  border-radius: 30px;
  padding: 10px 20px;
  margin-right: 10px;
  font-size: 1rem;
  background-color: #ffffff;
  resize: none;
  outline: none;
  height: 48px;
  box-sizing: border-box;

  /* ✨ Improved inset shadow */
  box-shadow: inset 0 2px 5px rgba(0255, 255, 255, 0.7),
    /* bottom soft shadow */ inset 0 -2px 5px rgba(0, 0, 0, 0.2),
    /* top light edge */ 0 1px 2px rgba(0, 0, 0, 0.1); /* outer subtle lift */
}

#chat-input::-webkit-scrollbar {
  display: none; /* hide scrollbar in WebKit */
}

/* Custom arrows */
.scroll-arrows {
  position: absolute;
  right: 85px; /* 10px margin from the right */
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px; /* 10px space between arrows */
}

.scroll-arrows .arrow {
  width: 14px;
  height: 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #555;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.scroll-arrows .arrow.up {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><polygon points='5,2 9,7 1,7' fill='%23333'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.scroll-arrows .arrow.down {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><polygon points='1,3 9,3 5,8' fill='%23333'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.scroll-arrows .arrow:hover {
  color: var(--chat-color-secondary);
}

#send-button {
  background-color: var(--chat-color-secondary);
  color: #fff; /* controls SVG fill */
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 48px;
  padding: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.5); /* dark bottom soft shadow */
}

#send-button svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  display: block;
}

#send-button:hover {
  background-color: #284493;
}

#new-chat-btn {
  border: none;
  color: var(--chat-color-white);
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.3rem;
  cursor: pointer;
  transition: background 0.2s;
  font-weight: 600;
}
#new-chat-btn:hover {
  background: #39d2c0;
}

/* STEP 1 — Animated "Thinking..." typing indicator */
.typing-indicator {
  text-align: left;
  margin: 0.5rem 0;
  color: #666;
  font-style: italic;
  font-size: 0.9rem;
}

/* Dots animation using colored text instead of content-based animation */
.typing-indicator .thinking-dots span {
  display: inline-block;
  opacity: 0;
  color: #42f5ec; /* ← Your color */
  animation: blink 1.4s infinite;
}

.typing-indicator .thinking-dots span:nth-child(1) {
  animation-delay: 0s;
}
.typing-indicator .thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator .thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  20% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Optional – if you still want the ::after dots version (for fallback) */
.typing-indicator::after {
  content: '';
  display: inline-block;
  animation: dots 1.5s steps(3, end) infinite;
  width: 1em;
  text-align: left;
  color: #38d3bf; /* ← Also apply color here */
}

@keyframes dots {
  0%,
  20% {
    content: '';
  }
  40% {
    content: '.';
  }
  60% {
    content: '..';
  }
  80%,
  100% {
    content: '...';
  }
}

/* Thinking text style */
.typing-indicator .thinking-text {
  font-weight: 500;
  color: #444;
}

#chat-messages {
  overflow-anchor: none; /* prevents browser from auto-scrolling */
}

/* Force proper rendering for the send button icon */
#send-button svg {
  display: block !important;
  width: 28px !important;
  height: 28px !important;
  fill: #fff !important;
  stroke: none !important;
  overflow: visible !important;
  pointer-events: none !important;
}

#send-button svg path {
  fill: #fff !important;
  stroke: none !important;
}

/* Additional styles for React app */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#root {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f2f5;
}

.prose {
    line-height: 1.6;
}

.prose a {
    color: #304D9B;
    text-decoration: underline;
    font-weight: 600;
}
.prose a:hover {
    color: #1f3375;
}

.prose strong {
    font-weight: 700;
}
.prose em {
    font-style: italic;
}

/* === CHAT HISTORY SIDEBAR === */
#chat-history-sidebar {
  position: absolute;
  top: 50px; /* below header */
  left: -300px; /* hidden by default */
  width: 300px;
  height: calc(100% - 50px);
  background-color: #ffffff;
  border-right: 1px solid #ddd;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  transition: left 0.3s ease-in-out;
  z-index: 9998;
  display: flex;
  flex-direction: column;
}

#chat-history-sidebar.is-visible {
  left: 0; /* slides in */
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background-color: #304D9B;
  color: #fff;
}

.history-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

#close-history-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

#chat-history-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  overflow-y: auto;
  flex-grow: 1;
}

#chat-history-list li {
  padding: 0.7rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

#chat-history-list li:hover {
  background-color: #f5f7ff;
}

#history-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#history-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

@media (max-width: 767px) {
  #chat-history-sidebar {
    width: 80%;
  }
}/* End custom CSS */