/* =========================================================
   01.00 START HERE - CHATBOT REV01 CSS
   File: assets/css/chatbot-rev01.css
   Purpose: Mobile-first chatbot shell styling for MLP rev01
   ========================================================= */

/* =========================================================
   01.01 ROOT VARIABLES
   ========================================================= */
:root {
  --cb-z: 9999;
  --cb-bg: #0e0b1f;
  --cb-panel: rgba(20, 14, 42, 0.96);
  --cb-panel-2: rgba(34, 24, 66, 0.96);
  --cb-line: rgba(170, 140, 255, 0.28);
  --cb-text: #f4f1ff;
  --cb-text-soft: #cfc6f8;
  --cb-accent: #8f5dff;
  --cb-accent-2: #b78cff;
  --cb-accent-3: #6ad7ff;
  --cb-success: #4fd18b;
  --cb-warning: #ffcc66;
  --cb-danger: #ff7b7b;
  --cb-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  --cb-radius-xl: 22px;
  --cb-radius-lg: 18px;
  --cb-radius-md: 14px;
  --cb-radius-sm: 10px;
  --cb-font: Arial, Helvetica, sans-serif;
}

/* =========================================================
   01.02 CHATBOT ROOT
   ========================================================= */
.chatbot-rev01 {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: var(--cb-z);
  font-family: var(--cb-font);
  color: var(--cb-text);
}

.chatbot-rev01 *,
.chatbot-rev01 *::before,
.chatbot-rev01 *::after {
  box-sizing: border-box;
}

/* =========================================================
   01.03 FLOATING AVATAR BUTTON
   ========================================================= */
.chatbot-rev01__fab {
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  background: radial-gradient(circle at 30% 30%, #d4beff 0%, #9a74ff 35%, #5d37d8 68%, #2a176c 100%);
  box-shadow:
    0 0 0 3px rgba(183, 140, 255, 0.28),
    0 10px 28px rgba(78, 42, 180, 0.48),
    0 0 26px rgba(129, 90, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chatbot-rev01__fab:hover,
.chatbot-rev01__fab:focus-visible {
  transform: translateY(-2px) scale(1.02);
  outline: none;
}

.chatbot-rev01__fab-ring {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(138, 106, 255, 0.42);
  animation: chatbotPulse 1.8s infinite;
  pointer-events: none;
}

.chatbot-rev01__fab-img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 999px;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.34);
  background: #241553;
}

.chatbot-rev01--has-alert .chatbot-rev01__fab {
  animation: chatbotBounce 1.2s infinite;
}
.chatbot-rev01__fab.is-speaking {
  animation: chatbotBounce 0.8s infinite;
  box-shadow:
    0 0 0 4px rgba(255, 170, 90, 0.34),
    0 12px 32px rgba(78, 42, 180, 0.56),
    0 0 30px rgba(255, 153, 51, 0.38);
}

.chatbot-rev01--speaking .chatbot-rev01__panel {
  box-shadow:
    0 0 0 1px rgba(255, 170, 90, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(255, 153, 51, 0.18);
}



/* =========================================================
   01.04 PANEL SHELL
   ========================================================= */
.chatbot-rev01__panel {
  width: min(92vw, 380px);
  max-height: min(72vh, 680px);
  background:
    linear-gradient(180deg, rgba(36, 26, 72, 0.98) 0%, rgba(16, 12, 36, 0.98) 100%);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-xl);
  box-shadow: var(--cb-shadow);
  overflow: hidden;
  display: none;
  margin: 0 0 12px auto;
  backdrop-filter: blur(10px);
}

.chatbot-rev01.is-open .chatbot-rev01__panel {
  display: flex;
  flex-direction: column;
}

/* =========================================================
   01.05 PANEL HEADER
   ========================================================= */
.chatbot-rev01__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(132, 96, 255, 0.22) 0%, rgba(132, 96, 255, 0.06) 100%);
  border-bottom: 1px solid var(--cb-line);
}

.chatbot-rev01__avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 48px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.chatbot-rev01__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chatbot-rev01__title-box {
  min-width: 0;
  flex: 1 1 auto;
}

.chatbot-rev01__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--cb-text);
}

.chatbot-rev01__subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--cb-text-soft);
}

.chatbot-rev01__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-rev01__icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(183, 140, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cb-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.chatbot-rev01__icon-btn:hover,
.chatbot-rev01__icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.chatbot-rev01__icon-btn.is-muted {
  opacity: 0.72;
}

/* =========================================================
   01.06 PANEL BODY
   ========================================================= */
.chatbot-rev01__body {
  padding: 12px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at top right, rgba(106, 215, 255, 0.08), transparent 26%),
    radial-gradient(circle at left center, rgba(183, 140, 255, 0.10), transparent 28%),
    transparent;
}

.chatbot-rev01__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cb-text-soft);
  font-size: 12px;
  line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chatbot-rev01__status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--cb-success);
  box-shadow: 0 0 10px rgba(79, 209, 139, 0.7);
  flex: 0 0 9px;
}

.chatbot-rev01__card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(183, 140, 255, 0.16);
  border-radius: var(--cb-radius-lg);
  padding: 12px;
}

.chatbot-rev01__question {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--cb-text);
}

.chatbot-rev01__answer {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--cb-text-soft);
}

.chatbot-rev01__section-title {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d8cbff;
}
.chatbot-rev01__helper-note {
  margin: 6px 0 10px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--cb-text-soft);
}


/* =========================================================
   01.07 QUICK REPLIES
   ========================================================= */
.chatbot-rev01__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chatbot-rev01__chip {
  border: 1px solid rgba(183, 140, 255, 0.24);
  background: rgba(143, 93, 255, 0.13);
  color: var(--cb-text);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.chatbot-rev01__chip:hover,
.chatbot-rev01__chip:focus-visible {
  background: rgba(143, 93, 255, 0.24);
  transform: translateY(-1px);
  outline: none;
}

/* =========================================================
   01.08 FOOTER
   ========================================================= */
.chatbot-rev01__footer {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--cb-line);
  background: rgba(255, 255, 255, 0.03);
}

.chatbot-rev01__footer-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--cb-text-soft);
}

/* =========================================================
   01.09 COACHMARK / HIGHLIGHT STATE
   ========================================================= */
.chatbot-rev01__coachmark {
  display: none;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--cb-radius-md);
  background: rgba(106, 215, 255, 0.10);
  border: 1px solid rgba(106, 215, 255, 0.20);
  color: #eafaff;
  font-size: 12px;
  line-height: 1.45;
}

.chatbot-rev01__coachmark.is-visible {
  display: block;
}

/* =========================================================
   01.10 HIDDEN / UTILITY
   ========================================================= */
.chatbot-rev01__sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.chatbot-rev01__hidden {
  display: none !important;
}

/* =========================================================
   01.11 DESKTOP ADJUSTMENT
   ========================================================= */
@media (min-width: 768px) {
  .chatbot-rev01 {
    right: 20px;
    bottom: 20px;
  }

  .chatbot-rev01__fab {
    width: 76px;
    height: 76px;
  }

  .chatbot-rev01__fab-img {
    width: 64px;
    height: 64px;
  }

  .chatbot-rev01__panel {
    width: min(420px, 34vw);
  }

  .chatbot-rev01__title {
    font-size: 17px;
  }

  .chatbot-rev01__subtitle {
    font-size: 12px;
  }

  .chatbot-rev01__question {
    font-size: 15px;
  }

  .chatbot-rev01__answer {
    font-size: 13px;
  }
}

/* =========================================================
   01.12 ANIMATIONS
   ========================================================= */
@keyframes chatbotPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.12);
    opacity: 0;
  }
  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}

@keyframes chatbotBounce {
  0%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-3px);
  }
  60% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-1px);
  }
}

/* =========================================================
   01.13 END HERE - CHATBOT REV01 CSS
   ========================================================= */