/*
  LIO AI Chatbot styles
  This stylesheet is intentionally scoped to .lio-chatbot so it can be enabled
  on additional pages later without affecting existing site layout or plugins.
*/
.lio-chatbot,
.lio-chatbot * {
  box-sizing: border-box;
}

.lio-chatbot {
  --lio-chatbot-primary: #b18422;
  --lio-chatbot-primary-dark: #10152a;
  --lio-chatbot-surface: #ffffff;
  --lio-chatbot-text: #1d2733;
  --lio-chatbot-muted: #667085;
  --lio-chatbot-border: #d9dee7;
  --lio-chatbot-shadow: 0 18px 50px rgba(16, 21, 42, 0.2);
  font-family: inherit;
  position: fixed;
  right: 14px;
  bottom: 130px;
  z-index: 9999;
}

.lio-chatbot__toggle {
  align-items: center;
  animation: lio-chatbot-float 3.6s ease-in-out infinite;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(135deg, #d9a43a 0%, #b18422 55%, #8a6418 100%);
  border: 0;
  border-radius: 50%;
  box-shadow:
    0 14px 28px rgba(177, 132, 34, 0.45),
    0 6px 12px rgba(16, 21, 42, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 6px rgba(0, 0, 0, 0.12);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  height: 66px;
  justify-content: center;
  padding: 0;
  position: relative;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 66px;
}

.lio-chatbot__toggle-inner {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  position: relative;
  transition: transform 0.35s ease;
  width: 100%;
  /* z-index: 2; */
}

.lio-chatbot__toggle-inner img {
  display: block;
  height: 78%;
  object-fit: contain;
  width: 78%;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  transition: transform 0.35s ease;
}

/* Concentric expanding rings to draw the user's eye. */
.lio-chatbot__pulse {
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(177, 132, 34, 0.55);
  content: "";
  height: 100%;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1;
}

.lio-chatbot__pulse--1 {
  animation: lio-chatbot-pulse-ring 2.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.lio-chatbot__pulse--2 {
  animation: lio-chatbot-pulse-ring 2.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.2s infinite;
}

/* Small notification dot to signal "new message". */
.lio-chatbot__badge {
  align-items: center;
  animation: lio-chatbot-badge-pop 2.6s ease-in-out infinite;
  background: linear-gradient(135deg, #ff5b6b 0%, #d6263a 100%);
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(214, 38, 58, 0.45);
  color: #ffffff;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  line-height: 1;
  min-width: 20px;
  padding: 0 5px;
  position: absolute;
  right: -2px;
  top: -2px;
  z-index: 3;
}

.lio-chatbot--open .lio-chatbot__toggle {
  animation: none;
}

.lio-chatbot--open .lio-chatbot__pulse,
.lio-chatbot--open .lio-chatbot__badge {
  display: none;
}

.lio-chatbot__welcome {
  align-items: center;
  animation: lio-chatbot-welcome-width 6s steps(1, end) infinite;
  background: #ffffff;
  border: 1px solid rgba(217, 222, 231, 0.9);
  border-radius: 16px;
  bottom: 10px;
  box-shadow:
    0 14px 30px rgba(16, 21, 42, 0.18),
    0 2px 6px rgba(16, 21, 42, 0.08);
  color: var(--lio-chatbot-text);
  display: grid;
  font-size: 14px;
  line-height: 1.35;
  max-width: 230px;
  min-height: 44px;
  min-width: 0;
  opacity: 1;
  padding: 8px 14px;
  pointer-events: none;
  position: absolute;
  right: calc(100% + 14px);
  transform: translateY(0);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  visibility: visible;
  width: 140px;
}

.lio-chatbot__welcome::after {
  background: #ffffff;
  border-right: 1px solid rgba(217, 222, 231, 0.9);
  border-top: 1px solid rgba(217, 222, 231, 0.9);
  content: "";
  height: 10px;
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
}

.lio-chatbot__welcome-text {
  display: block;
  grid-area: 1 / 1;
  white-space: nowrap;
  width: 100%;
}

.lio-chatbot__welcome-text--intro {
  animation: lio-chatbot-welcome-cycle 6s ease-in-out infinite;
  color: #10152a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.lio-chatbot__welcome-text--help {
  animation: lio-chatbot-welcome-cycle 6s ease-in-out 3s infinite;
  color: #b18422;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  opacity: 0;
}

@keyframes lio-chatbot-welcome-cycle {
  0%,
  42% {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
  50%,
  92% {
    opacity: 0;
    transform: translateY(5px);
    visibility: hidden;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
}

/* Switches the bubble width at the same time as the visible welcome text. */
@keyframes lio-chatbot-welcome-width {
  0%,
  49.99%,
  100% {
    width: 140px;
  }
  50%,
  99.99% {
    width: 220px;
  }
}

.lio-chatbot--open .lio-chatbot__welcome {
  opacity: 0;
  transform: translateY(6px);
  visibility: hidden;
}

.lio-chatbot__toggle:hover,
.lio-chatbot__toggle:focus-visible {
  animation: none;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(135deg, #1c2547 0%, #10152a 60%, #060a1b 100%);
  box-shadow:
    0 18px 38px rgba(16, 21, 42, 0.5),
    0 6px 14px rgba(16, 21, 42, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  outline: none;
  transform: translateY(-3px) scale(1.04);
}

.lio-chatbot__toggle:hover .lio-chatbot__toggle-inner img,
.lio-chatbot__toggle:focus-visible .lio-chatbot__toggle-inner img {
  animation: lio-chatbot-wiggle 0.6s ease-in-out;
  transform: scale(1.08);
}

.lio-chatbot__toggle:active {
  transform: translateY(-1px) scale(0.98);
}

.lio-chatbot__toggle-icon {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.lio-chatbot__panel {
  background: var(--lio-chatbot-surface);
  border: 1px solid rgba(217, 222, 231, 0.85);
  border-radius: 8px;
  bottom: 0;
  box-shadow: var(--lio-chatbot-shadow);
  display: flex;
  flex-direction: column;
  /* Reserves chatbot's bottom offset (130px) + ~30px top buffer so the panel
     never clips on short laptop screens, Chrome at 100% zoom, or with devtools open. */
  height: min(500px, calc(100vh - 160px));
  height: min(500px, calc(100dvh - 160px));
  max-height: min(500px, calc(100vh - 160px));
  max-height: min(500px, calc(100dvh - 160px));
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(16px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  visibility: hidden;
  width: min(380px, calc(100vw - 32px));
}

.lio-chatbot--open .lio-chatbot__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.lio-chatbot__header {
  align-items: center;
  background: #111827;
  color: #ffffff;
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  padding: 12px 14px;
}

.lio-chatbot__eyebrow {
  color: rgba(255, 255, 255, 0.52);
  font-size: 14px;
  line-height: 1.25;
  margin: 3px 0 0;
  font-weight: 500;
}

.lio-chatbot__title {
  color: #ffffff;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

/* Keeps the clear control beside close without moving the existing close button. */
.lio-chatbot__header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.lio-chatbot__reset,
.lio-chatbot__close {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 24px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 34px;
}

.lio-chatbot__reset svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 17px;
}

.lio-chatbot__reset:hover,
.lio-chatbot__reset:focus,
.lio-chatbot__close:hover,
.lio-chatbot__close:focus {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.lio-chatbot__messages {
  background: #f6f8fb;
  /* This is the only flexible section, so header and input always remain visible. */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.lio-chatbot__message {
  display: flex;
  margin-bottom: 12px;
}

.lio-chatbot__message--user {
  justify-content: flex-end;
}

.lio-chatbot__bubble {
  border-radius: 10px 10px 10px 0;
  box-shadow: 0 2px 10px rgba(20, 28, 38, 0.06);
  color: var(--lio-chatbot-text);
  font-size: 14px;
  line-height: 1.45;
  max-width: 85%;
  overflow-wrap: anywhere;
  padding: 11px 13px;
  white-space: pre-wrap;
  font-weight: 500;
}

.lio-chatbot__message--user .lio-chatbot__bubble {
  border-radius: 10px 10px 0 10px;
}

.lio-chatbot__bubble.default-message-leo {
  white-space: normal;
}

.lio-chatbot__message--bot .lio-chatbot__bubble {
  background: #ffffff;
  border: 1px solid var(--lio-chatbot-border);
}

.lio-chatbot__message--user .lio-chatbot__bubble {
  background: var(--lio-chatbot-primary);
  color: #ffffff;
}

.lio-chatbot__message--error .lio-chatbot__bubble {
  background: #fff4f4;
  border: 1px solid #f3b6bc;
  color: #9f1d2c;
}

.lio-chatbot__typing {
  align-items: center;
  background: #f6f8fb;
  border-top: 0;
  color: var(--lio-chatbot-muted);
  display: none;
  flex: 0 0 auto;
  gap: 5px;
  padding: 3px 15px;
}

.lio-chatbot--loading .lio-chatbot__typing {
  display: flex;
}

.lio-chatbot__typing span {
  animation: lio-chatbot-pulse 1.2s infinite ease-in-out;
  background: var(--lio-chatbot-muted);
  border-radius: 50%;
  display: inline-block;
  height: 6px;
  width: 6px;
}

.lio-chatbot__typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.lio-chatbot__typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.lio-chatbot__typing em {
  font-size: 12px;
  font-style: normal;
  margin-left: 4px;
}

.lio-chatbot__form {
  align-items: flex-end;
  background: #f6f8fb;
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 14px 8px;
}

/* Compact attribution below the input; it does not interfere with form submission. */
.lio-chatbot__powered-by {
  align-items: center;
  color: var(--lio-chatbot-muted);
  display: flex;
  font-size: 10px;
  font-weight: 500;
  gap: 4px;
  justify-content: center;
  line-height: 1;
  margin-top: 6px;
  min-height: 16px;
  width: 100%;
}

.lio-chatbot__powered-logo {
  display: block;
  height: 16px;
  object-fit: contain;
  width: 16px;
}

.lio-chatbot__input {
  /* border: 1px solid var(--lio-chatbot-border); */
  border: 0;
  border-radius: 50px;
  color: var(--lio-chatbot-text);
  flex: 1;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  max-height: 110px;
  min-height: 44px;
  overflow-y: auto;
  padding: 11px 12px;
  resize: none;
}

.lio-chatbot__input:focus {
  /* border-color: var(--lio-chatbot-primary);
  box-shadow: 0 0 0 3px rgba(16, 21, 42, 0.14); */
  outline: none;
}

.lio-chatbot__send {
  background: transparent;
  border: 0;
  border-radius: 50px;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  height: 44px;
  padding: 0 12px;
  transition:
    background 0.2s ease,
    opacity 0.2s ease;
  white-space: nowrap;
}

.lio-chatbot__send img {
  max-width: 20px;
}

.lio-chatbot__send:hover,
.lio-chatbot__send:focus {
  background: transparent;
  outline: none;
}

.lio-chatbot__send:disabled,
.lio-chatbot__input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

@keyframes lio-chatbot-pulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes lio-chatbot-bg-blink {
  0%,
  100% {
    background: var(--lio-chatbot-primary);
  }
  50% {
    background: #1f6fff;
  }
}

/* Gentle vertical bob to make the launcher feel alive. */
@keyframes lio-chatbot-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* Outward-radiating attention ring around the launcher. */
@keyframes lio-chatbot-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(177, 132, 34, 0.55);
    opacity: 0.85;
    transform: scale(1);
  }
  80% {
    box-shadow: 0 0 0 14px rgba(177, 132, 34, 0);
    opacity: 0;
    transform: scale(1.45);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(177, 132, 34, 0);
    opacity: 0;
    transform: scale(1.45);
  }
}

/* Soft heartbeat on the notification badge. */
@keyframes lio-chatbot-badge-pop {
  0%,
  70%,
  100% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.18);
  }
}

/* Playful side-to-side wiggle for Leo on hover. */
@keyframes lio-chatbot-wiggle {
  0%,
  100% {
    transform: scale(1.08) rotate(0deg);
  }
  25% {
    transform: scale(1.08) rotate(-6deg);
  }
  75% {
    transform: scale(1.08) rotate(6deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lio-chatbot__toggle,
  .lio-chatbot__pulse,
  .lio-chatbot__badge,
  .lio-chatbot__welcome,
  .lio-chatbot__welcome-text--intro,
  .lio-chatbot__welcome-text--help {
    animation: none !important;
  }

  .lio-chatbot__welcome-text--help {
    opacity: 1;
  }
}

@media (max-width: 575px) {
  .lio-chatbot {
    bottom: 10px;
    right: 10px;
  }

  .lio-chatbot__toggle {
    border-radius: 50%;
    height: 56px;
    width: 56px;
  }

  .lio-chatbot__badge {
    font-size: 10px;
    height: 18px;
    min-width: 18px;
  }

  .lio-chatbot__panel {
    /* Fixed viewport insets keep the complete chat visible on every mobile height. */
    bottom: max(80px, env(safe-area-inset-bottom));
    height: auto;
    left: max(12px, env(safe-area-inset-left));
    max-height: none;
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    top: max(12px, env(safe-area-inset-top));
    width: auto;
  }

  .lio-chatbot__welcome {
    bottom: 4px;
    max-width: calc(100vw - 88px);
    min-width: 0;
    right: calc(100% + 10px);
    width: 220px;
  }

  .lio-chatbot__welcome::after {
    bottom: auto;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }

  .lio-chatbot__eyebrow {
    font-size: 12px;
  }

  .lio-chatbot__header {
    padding: 10px;
  }

  .lio-chatbot__header-actions {
    gap: 4px;
  }

  .lio-chatbot__reset,
  .lio-chatbot__close {
    height: 30px;
    width: 30px;
  }

  .lio-chatbot__form {
    gap: 8px;
    padding: 12px 12px 7px;
  }

  .lio-chatbot__powered-by {
    font-size: 9px;
    margin-top: 5px;
  }

  .lio-chatbot__send {
    padding: 0 14px;
  }
}

/* Compact spacing keeps every section usable in short landscape mobile screens. */
@media (max-width: 575px) and (max-height: 500px) {
  .lio-chatbot__panel {
    bottom: max(66px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    top: max(8px, env(safe-area-inset-top));
  }

  .lio-chatbot__header {
    padding: 8px 10px;
  }

  .lio-chatbot__form {
    padding: 8px 10px 5px;
  }

  .lio-chatbot__messages {
    padding: 10px;
  }
}

.lio_chatbot_header_detail {
  display: flex;
  align-items: center;
}

.lio_chatbot_header_detail .lio_header_image {
  width: 35px;
  margin-right: 8px;
}

.lio_icon_image {
  width: 42px;
  height: auto;
}

@media (max-width: 575px) {
  .lio_icon_image {
    width: 34px;
  }
}

.leo-chatboat-input-wrapper {
  display: flex;
  gap: 5px;
  border: 1px solid var(--lio-chatbot-border);
  background: #ffffff;
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(20, 28, 38, 0.06);
}

.lio-main-ico {
  max-width: 60px;
}

/* ============================================================
   Open-state panel makeover — premium look & feel.
   Loaded after the base rules so these win on equal specificity.
   ============================================================ */

/* Softer rounded panel with a richer floating shadow. */
.lio-chatbot .lio-chatbot__panel {
  border: 1px solid rgba(16, 21, 42, 0.08);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(16, 21, 42, 0.28),
    0 6px 18px rgba(16, 21, 42, 0.12);
}

/* Premium gradient header with a thin gold accent stripe at the bottom. */
.lio-chatbot .lio-chatbot__header {
  background: linear-gradient(135deg, #1c2547 0%, #10152a 55%, #060a1b 100%);
  padding: 14px 16px 15px;
  position: relative;
}

.lio-chatbot .lio-chatbot__header::after {
  background: linear-gradient(90deg, #f1c75c 0%, #d9a43a 35%, #b18422 70%, #8a6418 100%);
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}

/* Avatar wrapper holds Leo + the green online dot. */
.lio-chatbot__avatar {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(217, 164, 58, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  margin-right: 12px;
  padding: 3px;
  position: relative;
  width: 44px;
}

.lio-chatbot__avatar .lio_icon_image {
  border-radius: 50%;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.lio-chatbot__status-dot {
  animation: lio-chatbot-status-pulse 2.2s ease-in-out infinite;
  background: #22c55e;
  border: 2px solid #0c1024;
  border-radius: 50%;
  bottom: 0;
  height: 12px;
  position: absolute;
  right: 0;
  width: 12px;
}

@keyframes lio-chatbot-status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Eyebrow becomes a tidy "● Online · …" line. */
.lio-chatbot .lio-chatbot__eyebrow {
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
  margin-top: 4px;
}

.lio-chatbot__online-pill {
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
  display: inline-block;
  height: 7px;
  width: 7px;
}

/* Header action buttons get a soft glass treatment. */
.lio-chatbot .lio-chatbot__reset,
.lio-chatbot .lio-chatbot__close {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.lio-chatbot .lio-chatbot__reset:hover,
.lio-chatbot .lio-chatbot__reset:focus-visible,
.lio-chatbot .lio-chatbot__close:hover,
.lio-chatbot .lio-chatbot__close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}

/* Messages area: warm tinted background + custom scrollbar. */
.lio-chatbot .lio-chatbot__messages {
  background:
    radial-gradient(circle at 0% 0%, rgba(177, 132, 34, 0.06), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(16, 21, 42, 0.05), transparent 45%),
    #f7f9fc;
  padding: 16px 14px;
  scroll-behavior: smooth;
}

.lio-chatbot .lio-chatbot__messages::-webkit-scrollbar {
  width: 6px;
}

.lio-chatbot .lio-chatbot__messages::-webkit-scrollbar-track {
  background: transparent;
}

.lio-chatbot .lio-chatbot__messages::-webkit-scrollbar-thumb {
  background: rgba(16, 21, 42, 0.18);
  border-radius: 3px;
}

.lio-chatbot .lio-chatbot__messages::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 21, 42, 0.32);
}

/* Each new message slides in gracefully. */
.lio-chatbot .lio-chatbot__message {
  animation: lio-chatbot-msg-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
  margin-bottom: 10px;
}

@keyframes lio-chatbot-msg-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Softer, modern bubble corners + subtle elevation. */
.lio-chatbot .lio-chatbot__bubble {
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 4px 14px rgba(16, 21, 42, 0.08);
  padding: 12px 14px;
}

.lio-chatbot .lio-chatbot__message--user .lio-chatbot__bubble {
  background: linear-gradient(135deg, #e0ad42 0%, #b18422 60%, #8a6418 100%);
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 6px 16px rgba(177, 132, 34, 0.35);
  color: #ffffff;
}

.lio-chatbot .lio-chatbot__message--bot .lio-chatbot__bubble {
  background: #ffffff;
  border: 1px solid rgba(217, 222, 231, 0.7);
}

/* Typing indicator: warmer dots. */
.lio-chatbot .lio-chatbot__typing {
  background: transparent;
  padding: 2px 18px 6px;
}

.lio-chatbot .lio-chatbot__typing span {
  background: var(--lio-chatbot-primary);
}

.lio-chatbot .lio-chatbot__typing em {
  color: var(--lio-chatbot-muted);
  font-weight: 500;
}

/* Form area: fades into the messages background. */
.lio-chatbot .lio-chatbot__form {
  background: linear-gradient(180deg, rgba(247, 249, 252, 0) 0%, #f7f9fc 28%);
  padding: 12px 14px 10px;
}

/* Frosted pill input pod with focus-within glow. */
.lio-chatbot .leo-chatboat-input-wrapper {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--lio-chatbot-border);
  border-radius: 26px;
  box-shadow: 0 4px 14px rgba(16, 21, 42, 0.06);
  gap: 6px;
  padding: 4px 5px 4px 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lio-chatbot .leo-chatboat-input-wrapper:focus-within {
  border-color: var(--lio-chatbot-primary);
  box-shadow:
    0 0 0 4px rgba(177, 132, 34, 0.15),
    0 6px 16px rgba(16, 21, 42, 0.08);
}

.lio-chatbot .lio-chatbot__input {
  background: transparent;
  font-size: 14px;
  min-height: 40px;
  padding: 10px 14px;
}

/* Circular gold send button with hover lift. */
.lio-chatbot .lio-chatbot__send {
  align-items: center;
  align-self: center;
  background: linear-gradient(135deg, #e0ad42 0%, #b18422 60%, #8a6418 100%);
  border-radius: 50%;
  box-shadow:
    0 6px 14px rgba(177, 132, 34, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  display: flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  padding: 0;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
  width: 40px;
}

.lio-chatbot .lio-chatbot__send:hover,
.lio-chatbot .lio-chatbot__send:focus-visible {
  background: linear-gradient(135deg, #ecb84b 0%, #c19327 60%, #9a701c 100%);
  box-shadow:
    0 9px 20px rgba(177, 132, 34, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.lio-chatbot .lio-chatbot__send:active {
  transform: translateY(0) scale(0.96);
}

.lio-chatbot .lio-chatbot__send img {
  display: block;
  filter: brightness(0) invert(1);
  height: 18px;
  max-width: 18px;
  width: 18px;
}

.lio-chatbot .lio-chatbot__send:disabled {
  background: #c9cfdb;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

/* Compact tweaks on phones. */
@media (max-width: 575px) {
  .lio-chatbot__avatar {
    height: 38px;
    margin-right: 10px;
    width: 38px;
  }

  .lio-chatbot__status-dot {
    height: 10px;
    width: 10px;
  }

  .lio-chatbot .lio-chatbot__send {
    height: 38px;
    width: 38px;
  }
}

/*
  Bottom-right declutter — keep the chatbot the visual hero.
  Hides the floating social-toggle widget (its links live in the page footer)
  and shrinks the Book A Test Drive launcher into a compact circular FAB
  tucked above the chatbot so it stops competing for attention.
*/
.socila-icon {
  display: none !important;
}

/* ===========================================================
   Book A Test Drive — premium pill (icon + text).
   Identical visual on desktop AND mobile, gold-trimmed navy.
   =========================================================== */

/* Always show the styled pill (.web-book) — legacy responsive.css forces it
   to display:none on 320-426px widths; this override beats that. */
#openTestDriveModal .book-footer.web-book {
  display: inline-flex !important;
}

/* Always hide the legacy duplicate (.moblie-book) — responsive.css forces it
   to display:block on 320-426px; this override beats that. */
#openTestDriveModal .book-footer.moblie-book {
  display: none !important;
}

#openTestDriveModal .book-footer.web-book {
  align-items: center;
  animation: lio-test-drive-float 4.2s ease-in-out infinite;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(140deg, #1f2a52 0%, #131a35 45%, #0a0f24 100%);
  border-radius: 999px;
  bottom: 210px;
  box-shadow:
    0 14px 30px rgba(10, 15, 36, 0.45),
    0 4px 10px rgba(10, 15, 36, 0.3),
    inset 0 0 0 1.5px rgba(217, 164, 58, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  display: inline-flex;
  gap: 0;
  height: 52px;
  justify-content: flex-start;
  overflow: hidden;
  padding: 0 12px;
  position: fixed;
  right: 22px;
  text-decoration: none;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    gap 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  width: 52px;
}

/* Hidden by default — slides in on hover so the icon stays the resting state. */
.book-test-label {
  color: #ffffff;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.25px;
  line-height: 1;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  position: relative;
  transition:
    max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease 0.08s;
  white-space: nowrap;
  z-index: 2;
}

/* Soft gold ambient halo behind the tile — gives the floating feel. */
.book-test-glow {
  background: radial-gradient(circle, rgba(217, 164, 58, 0.45) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
  height: 100%;
  left: 0;
  opacity: 0.65;
  pointer-events: none;
  position: absolute;
  top: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: 100%;
  z-index: -1;
}

/* Steering-wheel-only icon — gold line-art via currentColor.
   Continuous gentle steering motion keeps it alive without distracting. */
.book-test-icon {
  animation: lio-test-drive-steer 5.5s ease-in-out infinite;
  color: #f1c75c;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  flex: 0 0 auto;
  height: 32px;
  object-fit: contain;
  position: relative;
  transform-origin: center center;
  transition:
    color 0.25s ease,
    filter 0.25s ease;
  width: 32px;
  z-index: 2;
}

/* Professional steering motion — wheel tilts left, returns, tilts right, returns. */
@keyframes lio-test-drive-steer {
  0%,
  100% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(-18deg);
  }
  40%,
  60% {
    transform: rotate(0deg);
  }
  80% {
    transform: rotate(18deg);
  }
}

/* Mobile pill variant (currently d-none-hidden, but kept consistent). */
.book-test-icon--inline {
  display: inline-block;
  height: 20px;
  margin-right: 6px;
  vertical-align: middle;
  width: 20px;
}

/* Hover: pill expands left, label slides in, icon stays anchored at the left. */
#openTestDriveModal .book-footer.web-book:hover,
#openTestDriveModal .book-footer.web-book:focus-visible {
  animation: none;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(140deg, #2a3768 0%, #1a2348 45%, #0d1330 100%);
  box-shadow:
    0 18px 38px rgba(10, 15, 36, 0.55),
    0 6px 14px rgba(10, 15, 36, 0.35),
    inset 0 0 0 1.5px rgba(241, 199, 92, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  gap: 10px;
  outline: none;
  padding: 0 20px 0 12px;
  transform: translateY(-3px);
  width: 210px;
}

#openTestDriveModal .book-footer.web-book:hover .book-test-label,
#openTestDriveModal .book-footer.web-book:focus-visible .book-test-label {
  max-width: 160px;
  opacity: 1;
}

#openTestDriveModal .book-footer.web-book:hover .book-test-glow,
#openTestDriveModal .book-footer.web-book:focus-visible .book-test-glow {
  opacity: 1;
  transform: scale(1.15);
}

#openTestDriveModal .book-footer.web-book:hover .book-test-icon,
#openTestDriveModal .book-footer.web-book:focus-visible .book-test-icon {
  color: #ffd76b;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.55));
}

#openTestDriveModal .book-footer.web-book:active {
  transform: translateY(-1px);
}

/* No tooltip needed — the label is always visible inside the pill. */
#openTestDriveModal .book-footer.web-book::before,
#openTestDriveModal .book-footer.web-book::after {
  content: none;
  display: none;
}

@keyframes lio-test-drive-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* "Drive forward" — pull back slightly, then dart forward, then settle. */
@keyframes lio-test-drive-go {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-3px);
  }
  55% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #openTestDriveModal .book-footer.web-book,
  .book-test-glow,
  .book-test-icon {
    animation: none !important;
    transition: none !important;
  }
}

/* Tablet / small-laptop: same collapse/expand behavior, tighter right gutter. */
@media (max-width: 991px) {
  #openTestDriveModal .book-footer.web-book {
    bottom: 208px;
    right: 18px;
  }

  #openTestDriveModal .book-footer.web-book:hover,
  #openTestDriveModal .book-footer.web-book:focus-visible {
    width: 205px;
  }
}

/* Phones: smaller collapsed circle + smaller expanded pill, same icon-only-by-default. */
@media (max-width: 575px) {
  #openTestDriveModal .book-footer.web-book {
    bottom: 178px;
    height: 48px;
    left: auto;
    padding: 0 11px;
    right: 12px;
    width: 48px;
  }

  .book-test-icon {
    height: 29px;
    width: 29px;
  }

  .book-test-label {
    font-size: 13px;
    letter-spacing: 0.2px;
  }

  #openTestDriveModal .book-footer.web-book:hover,
  #openTestDriveModal .book-footer.web-book:active,
  #openTestDriveModal .book-footer.web-book:focus-visible {
    gap: 8px;
    padding: 0 16px 0 11px;
    width: 188px;
  }

  /* On touch devices :hover sticks briefly after tap — :active reveals label
     during the press so users see what they're tapping. */
  #openTestDriveModal .book-footer.web-book:active .book-test-label {
    max-width: 150px;
    opacity: 1;
  }
}

/* Very narrow phones (≤374px): the existing site CSS forces .book-footer to
   left: 45px/80px on these widths — neutralize so the pill stays bottom-right. */
@media (max-width: 374px) {
  #openTestDriveModal .book-footer.web-book {
    bottom: 178px;
    height: 44px;
    left: auto !important;
    padding: 0 10px;
    right: 10px !important;
    width: 44px;
  }

  .book-test-label {
    font-size: 12.5px;
  }

  .book-test-icon {
    height: 26px;
    width: 26px;
  }

  #openTestDriveModal .book-footer.web-book:hover,
  #openTestDriveModal .book-footer.web-book:active,
  #openTestDriveModal .book-footer.web-book:focus-visible {
    gap: 8px;
    padding: 0 14px 0 10px;
    width: 178px;
  }
}
