/* ═══════════════════════════════════════
   AURA CHATBOT — EXACT SCREENSHOT DESIGN
   Premium Dark Theme & Interactive UI
═══════════════════════════════════════ */

:root {
  --aura-primary: #1a5fa8;
  --aura-bg: #0b2240;
  --aura-bg-dark: #081a30;
  --aura-text: #ffffff;
  --aura-bot-msg: #152b4a;
  --aura-user-msg: #1a5fa8;
  --aura-accent: #ffb400; /* Yellow for send button */
  --aura-fab-color: #ff4b2b; /* Orange-Red for FAB */
  --aura-border: rgba(255, 255, 255, 0.1);
}

/* ── LIGHT THEME OVERRIDES (Exact Deployed Match) ── */
.light-theme {
  --aura-bg: #f8fafc;
  --aura-bot-msg: #ffffff;
  --aura-text: #1e293b;
  --aura-border: #e2e8f0;
}

/* Sidebar: ALWAYS DARK (as seen in Image 2) */
.chat-page.light-theme .chat-sidebar {
  background: #0b1e3b !important;
  color: white !important;
  border-right: none !important;
}

.chat-page.light-theme .sidebar-btn {
  color: rgba(255,255,255,0.7) !important;
}

.chat-page.light-theme .sidebar-btn:hover {
  background: rgba(255,255,255,0.05) !important;
  color: white !important;
}

/* Header: WHITE with Border */
.full-page-chatbot.light-theme .chat-header {
  background: #ffffff !important;
  color: #1e293b !important;
  border-bottom: 1px solid #e2e8f0 !important;
  backdrop-filter: none !important;
}

.full-page-chatbot.light-theme .chat-header div,
.full-page-chatbot.light-theme .chat-header span {
  color: #1e293b !important;
}

/* Chat Messages Area: Light Grayish Blue */
.full-page-chatbot.light-theme .chat-messages {
  background: #f4f7fa !important;
}

/* Welcome Banner: DARK BLUE (as seen in Image 2) */
.light-theme .welcome-banner {
  background: #0b2240 !important;
  color: white !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

/* Input Area: Rounded Pill Style */
.full-page-chatbot.light-theme .chat-input-area {
  background: #f4f7fa !important;
  padding: 20px 45px !important;
  border-top: none !important;
}

.full-page-chatbot.light-theme .chat-input {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 30px !important;
  padding: 15px 25px !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
}

.full-page-chatbot.light-theme .chat-input::placeholder {
  color: #94a3b8 !important;
}

/* Global Light Theme Input Fix */
.light-theme input,
.light-theme textarea,
.light-theme .chat-input,
.light-theme .w-textarea {
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b !important; /* Some browsers need this */
}

#aura-widget.light-theme .msg.bot,
.full-page-chatbot.light-theme .msg.bot {
  background: #ffffff !important;
  color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
}

/* Force Light Theme Text Colors */
.light-theme .msg.bot strong,
.light-theme .msg.bot b {
  color: #0b2240 !important;
  font-weight: 700 !important;
}

.light-theme .msg.bot a {
  color: #1a5fa8 !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
}

.light-theme .msg.bot ul, 
.light-theme .msg.bot ol {
  color: #1e293b !important;
}

.light-theme .msg.bot li {
  color: #1e293b !important;
}

.light-theme .msg.bot i {
  color: #1a5fa8 !important;
}

.light-theme .welcome-banner p {
  color: rgba(255,255,255,0.7) !important;
}

/* Suggestion Chips in Light Mode - Forced Visibility */
.light-theme .suggestion-chip {
  background: #ffffff !important;
  color: #1a5fa8 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  opacity: 1 !important;
  display: inline-flex !important;
}

.light-theme .suggestion-chip i {
  color: #1a5fa8 !important; /* Force icons to be blue too in light mode */
}

.light-theme .suggestion-chip:hover {
  background: #1a5fa8 !important;
  color: #ffffff !important;
  border-color: #1a5fa8 !important;
}

.light-theme .suggestion-chip:hover i {
  color: #ffffff !important;
}

/* Input Placeholder in Light Mode */
.light-theme .chat-input::placeholder,
.light-theme .w-textarea::placeholder {
  color: rgba(30, 41, 59, 0.4) !important;
}

/* Toggle Button Style */
.theme-local-toggle {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: white !important;
  color: #0b2240 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0 !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-local-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Sidebar Light Theme */
.chat-page.light-theme .chat-sidebar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  color: #1e293b;
}

.chat-page.light-theme .sidebar-btn {
  color: #475569;
}

.chat-page.light-theme .sidebar-btn:hover {
  background: #f1f5f9;
  color: #1a5fa8;
}

.chat-page.light-theme .sidebar-label {
  color: #94a3b8;
}

/* ── FAB & LABEL ── */
.aura-fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10001;
  cursor: grab;
}

.aura-fab-label {
  background: #112240;
  color: white;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
}

#aura-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1a5fa8;
  border: none;
  color: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

#aura-fab i {
  font-size: 1.5rem;
}

/* Notification Badge */
#aura-fab::after {
  content: '1';
  position: absolute;
  top: 0;
  right: 0;
  background: #ffb400;
  color: #0b2240;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0b2240;
}

#aura-fab img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 8px;
}

#aura-fab i {
  font-size: 1.2rem;
}

#aura-fab:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 15px 40px rgba(255, 75, 43, 0.5);
}

#aura-fab.active {
  background: #152b4a;
  transform: rotate(90deg) scale(0.9);
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

#aura-fab.active i {
  color: var(--aura-accent);
}

#aura-fab i {
  transition: all 0.3s ease;
}

/* ── WIDGET PANEL ── */
#aura-widget {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 380px;
  height: 600px;
  background: var(--aura-bg-dark);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10000;
  border: 1px solid var(--aura-border);
}

#aura-widget.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

/* Header */
.widget-header {
  background: var(--aura-primary);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.wh-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wh-avatar {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.1);
}

.wh-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wh-info { line-height: 1.2; }
.wh-name { font-weight: 700; font-size: 1rem; }
.wh-status {
  font-size: 0.75rem;
  opacity: 0.85;
  display: flex; align-items: center; gap: 6px;
}
.wh-status::before {
  content: "";
  width: 8px; height: 8px;
  background: #4caf50; border-radius: 50%;
  display: inline-block; box-shadow: 0 0 8px #4caf50;
}

.wh-actions { display: flex; gap: 12px; }
.wh-btn {
  background: none; border: none;
  color: white; cursor: pointer;
  font-size: 1.1rem; opacity: 0.6;
  transition: opacity 0.2s;
}
.wh-btn:hover { opacity: 1; }

/* Messages Area */
.widget-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: #061225;
  scrollbar-width: thin;
}

.widget-messages::-webkit-scrollbar { width: 5px; }
.widget-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.msg {
  max-width: 85%;
  min-width: 50px;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
  word-wrap: break-word;
  animation: msgPopUp 0.3s ease-out;
}

@keyframes msgPopUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg.bot {
  align-self: flex-start;
  background: var(--aura-bot-msg);
  color: white;
  border-bottom-left-radius: 4px;
}

.msg.user {
  align-self: flex-end;
  background: var(--aura-user-msg);
  color: white;
  border-bottom-right-radius: 4px;
}

/* Suggestions Row */
.suggestions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.suggestion-chip {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-chip:hover {
  background: white;
  color: #0b2240;
  border-color: white;
}

/* Input Area */
.widget-input-area {
  padding: 15px 20px;
  background: var(--aura-bg-dark);
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--aura-border);
}

.w-textarea {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--aura-border);
  border-radius: 12px;
  padding: 10px 15px;
  color: white;
  resize: none;
  font-size: 0.92rem;
  max-height: 100px;
}

.w-send-btn {
  width: 42px;
  height: 42px;
  background: var(--aura-accent);
  border: none;
  border-radius: 50%;
  color: #0b2240;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.widget-footer {
  padding: 8px;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  background: var(--aura-bg-dark);
  border-top: 1px solid rgba(255,255,255,0.02);
}

/* ── FULL PAGE CHATBOT ── */
.chat-page {
  display: flex;
  height: 100vh;
  background: var(--aura-bg);
  color: white;
}

.chat-sidebar {
  width: 280px;
  background: #081a30;
  border-right: 1px solid var(--aura-border);
  padding: 35px 25px;
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 35px;
}

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.chat-input-area {
  padding: 25px 40px;
  background: rgba(0,0,0,0.15);
  border-top: 1px solid var(--aura-border);
}

.input-row {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 15px;
  background: rgba(255,255,255,0.05);
  padding: 10px;
  border-radius: 15px;
  border: 1px solid var(--aura-border);
}

.chat-textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 8px 15px;
  font-size: 1rem;
  resize: none;
  outline: none;
}

.send-btn {
  background: var(--aura-accent);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: #0b2240;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Sidebar Elements */
.sidebar-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.25);
  margin-bottom: 20px;
}

.sidebar-btn {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255,255,255,0.8);
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.sidebar-btn:hover {
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.aura-stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.5);
}

/* Welcome Banner */
.welcome-banner {
  background: rgba(26, 95, 168, 0.03);
  border: 1px solid rgba(26, 95, 168, 0.15);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.welcome-banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(26,95,168,0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(26,95,168,0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

/* ═══════════════════════════════════════
   MOBILE RESPONSIVENESS
═══════════════════════════════════════ */
@media screen and (max-width: 768px) {
  /* Widget Adjustments */
  #aura-widget {
    width: calc(100vw - 40px);
    height: calc(100vh - 120px);
    max-height: 650px;
    right: 20px;
    bottom: 95px;
    border-radius: 20px;
    z-index: 10000;
  }

  /* Ensure the widget doesn't get squished too small */
  .widget-messages {
    padding: 15px;
  }

  .widget-input-area {
    padding: 12px 15px;
  }

  /* FAB Container Adjustments */
  .aura-fab-container {
    bottom: 20px;
    right: 20px;
  }

  /* Hide the text label on smaller screens to save space */
  .aura-fab-label {
    display: none !important;
  }

  #aura-fab {
    width: 55px;
    height: 55px;
  }

  /* Full Page Chatbot Adjustments */
  .chat-page {
    flex-direction: column;
  }

  .chat-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--aura-border);
    padding: 20px;
    max-height: 250px;
    overflow-y: auto;
  }

  .chat-page.light-theme .chat-sidebar {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .sidebar-title {
    margin-bottom: 15px;
  }

  .chat-messages {
    padding: 20px;
  }

  .chat-input-area {
    padding: 15px 20px;
  }

  .input-row {
    padding: 8px;
  }

  .chat-textarea {
    font-size: 0.95rem;
  }

  .send-btn {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .welcome-banner {
    padding: 25px 20px;
    margin-bottom: 20px;
  }
}

@media screen and (max-width: 480px) {
  /* Tighter adjustments for small phones */
  #aura-widget {
    width: calc(100vw - 30px);
    right: 15px;
    bottom: 85px;
  }
  
  .aura-fab-container {
    bottom: 15px;
    right: 15px;
  }

  .msg {
    max-width: 90%;
    font-size: 0.9rem;
  }
}
