:root {
  --aurv-chat-blue: #2463eb;
  --aurv-chat-navy: #07122d;
  --aurv-chat-ink: #0f172a;
  --aurv-chat-muted: #64748b;
  --aurv-chat-line: #dbe5f3;
  --aurv-chat-soft: #f5f8ff;
  --aurv-chat-pink: #ef3f8f;
}

.aurv-chatbot,
.aurv-chatbot * {
  box-sizing: border-box;
}

.aurv-chatbot {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 99990;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--aurv-chat-ink);
}

.aurv-chatbot__toggle {
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 13px 9px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--aurv-chat-blue), #12347f 72%, var(--aurv-chat-pink));
  box-shadow: 0 18px 46px rgba(15, 23, 42, .22);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, opacity .22s ease;
}

.aurv-chatbot__toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, .27);
}

.aurv-chatbot__toggle-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}

.aurv-chatbot__toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.aurv-chatbot__toggle-text {
  display: grid;
  gap: 2px;
  text-align: left;
}

.aurv-chatbot__toggle-text strong {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
}

.aurv-chatbot__toggle-text span {
  font-size: 10px;
  line-height: 1.1;
  opacity: .82;
}

.aurv-chatbot__panel {
  position: absolute;
  left: 0;
  bottom: 60px;
  width: min(314px, calc(100vw - 28px));
  max-height: min(510px, calc(100dvh - 92px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(219, 229, 243, .95);
  border-radius: 17px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 26px 80px rgba(15, 23, 42, .24);
  opacity: 0;
  transform: translateY(18px) scale(.96);
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}

.aurv-chatbot.is-open .aurv-chatbot__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.aurv-chatbot.is-open .aurv-chatbot__toggle {
  opacity: .94;
}

.aurv-chatbot__header {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #fff;
  background: radial-gradient(circle at 14% 12%, rgba(239, 63, 143, .42), transparent 28%), linear-gradient(135deg, #07122d, #12347f 70%, #2463eb);
}

.aurv-chatbot__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.aurv-chatbot__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
}

.aurv-chatbot__title {
  min-width: 0;
}

.aurv-chatbot__title strong {
  display: block;
  font-size: 11.5px;
  line-height: 1.12;
}

.aurv-chatbot__title span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, .78);
}

.aurv-chatbot__title span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #38d477;
  box-shadow: 0 0 0 4px rgba(56, 212, 119, .18);
}

.aurv-chatbot__close {
  border: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: background .18s ease;
}

.aurv-chatbot__close:hover {
  background: rgba(255, 255, 255, .2);
}

.aurv-chatbot__body {
  min-height: 190px;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 58%);
  scroll-behavior: smooth;
}

.aurv-chatbot__body::-webkit-scrollbar {
  width: 8px;
}

.aurv-chatbot__body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.aurv-chatbot__message {
  display: grid;
  gap: 5px;
  max-width: 84%;
  margin-bottom: 9px;
  animation: aurvChatIn .2s ease both;
}

.aurv-chatbot__message--user {
  margin-left: auto;
  justify-items: end;
}

.aurv-chatbot__bubble {
  padding: 8px 10px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--aurv-chat-line);
  color: #172033;
  font-size: 11.7px;
  line-height: 1.42;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  white-space: pre-wrap;
}

.aurv-chatbot__message--user .aurv-chatbot__bubble {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--aurv-chat-blue), #0f3c9b);
}

.aurv-chatbot__time {
  color: #94a3b8;
  font-size: 10.5px;
  line-height: 1;
  padding: 0 3px;
}

.aurv-chatbot__quick {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 0 12px 8px;
  background: #fff;
}

.aurv-chatbot__quick button,
.aurv-chatbot__lead-toggle {
  border: 1px solid #cddaf1;
  border-radius: 999px;
  background: #f8fbff;
  color: #17356f;
  padding: 4px 7px;
  font-size: 9.8px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.aurv-chatbot__quick button:hover,
.aurv-chatbot__lead-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--aurv-chat-blue);
  color: var(--aurv-chat-blue);
  background: #eef4ff;
}

.aurv-chatbot__lead {
  display: none;
  margin: 0 12px 9px;
  padding: 9px;
  border: 1px solid #dbe5f3;
  border-radius: 16px;
  background: #f8fbff;
}

.aurv-chatbot.show-lead .aurv-chatbot__lead {
  display: grid;
  gap: 8px;
}

.aurv-chatbot__lead-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.aurv-chatbot__lead-title strong {
  font-size: 11.5px;
  color: #07122d;
}

.aurv-chatbot__lead-title button {
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.aurv-chatbot__lead input,
.aurv-chatbot__lead textarea {
  width: 100%;
  border: 1px solid #cddaf1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 11.5px;
  padding: 8px;
  outline: none;
}

.aurv-chatbot__lead textarea {
  min-height: 52px;
  resize: vertical;
}

.aurv-chatbot__lead input:focus,
.aurv-chatbot__lead textarea:focus {
  border-color: var(--aurv-chat-blue);
  box-shadow: 0 0 0 3px rgba(36, 99, 235, .12);
}

.aurv-chatbot__lead-submit {
  border: 0;
  border-radius: 11px;
  padding: 8px 10px;
  background: var(--aurv-chat-navy);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
}

.aurv-chatbot__composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 9px 10px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.aurv-chatbot__input {
  width: 100%;
  min-height: 36px;
  max-height: 82px;
  resize: none;
  border: 1px solid #d6e1f1;
  border-radius: 11px;
  padding: 9px 10px;
  color: #0f172a;
  font: inherit;
  font-size: 11.5px;
  line-height: 1.3;
  outline: none;
}

.aurv-chatbot__input:focus {
  border-color: var(--aurv-chat-blue);
  box-shadow: 0 0 0 3px rgba(36, 99, 235, .11);
}

.aurv-chatbot__send {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--aurv-chat-blue);
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(36, 99, 235, .24);
}

.aurv-chatbot__send svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.aurv-chatbot__bubble p {
  margin: 0;
}

.aurv-chatbot__bubble p + p {
  margin-top: 10px;
}

.aurv-chatbot__bubble strong {
  color: #07122d;
  font-weight: 900;
}

.aurv-chatbot__bubble ul {
  margin: 7px 0 10px;
  padding: 0;
  display: grid;
  gap: 5px;
  list-style: none;
}

.aurv-chatbot__bubble li {
  position: relative;
  padding-left: 16px;
}

.aurv-chatbot__bubble li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--aurv-chat-blue), var(--aurv-chat-pink));
}

.aurv-chatbot__typing {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: #334155;
}

.aurv-chatbot__typing em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.aurv-chatbot__loader {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--aurv-chat-blue), var(--aurv-chat-pink), #38d477, var(--aurv-chat-blue));
  animation: aurvLoaderSpin 1s linear infinite;
}

.aurv-chatbot__loader::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

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

@keyframes aurvLoaderSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .aurv-chatbot {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .aurv-chatbot__toggle {
    min-height: 52px;
    padding-right: 14px;
  }

  .aurv-chatbot__panel {
    left: 0;
    right: 0;
    width: auto;
    bottom: 58px;
    max-height: calc(100dvh - 80px);
    border-radius: 18px;
  }

  .aurv-chatbot__message {
    max-width: 91%;
  }

  .aurv-chatbot__quick {
    gap: 5px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .aurv-chatbot__quick button,
  .aurv-chatbot__lead-toggle {
    padding: 4px 6px;
    font-size: 9.5px;
  }

  .aurv-chatbot__header {
    padding: 14px;
  }
}


/* Compact assistant sizing override */
.aurv-chatbot__body {
  max-height: 332px;
}

.aurv-chatbot__bubble p + p {
  margin-top: 7px;
}

.aurv-chatbot__bubble ul {
  gap: 3px;
  margin: 5px 0 7px;
}

.aurv-chatbot__lead input,
.aurv-chatbot__lead textarea {
  min-height: 34px;
}

@media (min-width: 641px) {
  .aurv-chatbot__panel {
    width: 314px;
  }
}
