/* 1CAW Batch 6 — the AI Assistant (launchers, chat window, locked plans panel), shared by client
   websites AND the main website. Moved here unchanged from client.css (client.css has page-wide
   rules that must never reach the main website). */
/* ================================================================ Phase 4F-3: public AI chat */
/* the launcher sits at the BOTTOM of the floating column (chat, WhatsApp, Messenger upwards) */
.client-float-chat {
  background: var(--accent);
  color: #050505;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.client-float-chat[hidden] {
  display: none;
}
.client-float-chat:focus-visible,
.aiae-chat button:focus-visible,
.aiae-chat a:focus-visible,
.aiae-chat textarea:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
/* Virtual AI Assistant launcher: the approved design, complete and in its own proportions
   (1238 : 714) — never cropped, clipped or stretched. The "Chat Now" button is part of the artwork,
   so the whole picture is the one clickable button (its accessible name says the same). */
.client-floating {
  align-items: flex-end;
}
.client-float-chat.aiae-launcher {
  --aiae-launcher-w: 220px;
  display: block;
  width: var(--aiae-launcher-w);
  max-width: calc(100vw - 32px);
  height: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  line-height: 0;
  cursor: pointer;
}
.aiae-launcher-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1238 / 714;
  object-fit: contain;
}
.client-float-chat.aiae-launcher:hover {
  transform: translateY(-2px);
}
.client-float-chat.aiae-launcher:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  border-radius: 12px;
}
@media (min-width: 600px) {
  .client-float-chat.aiae-launcher {
    --aiae-launcher-w: 280px;
  }
}
@media (min-width: 1024px) {
  .client-float-chat.aiae-launcher {
    --aiae-launcher-w: clamp(300px, 26vw, 380px);
  }
}
/* while the chat window is open it replaces the launcher (the window has its own close button;
   the launcher comes back, and takes the focus, when the window closes) */
.client-float-chat.aiae-launcher[aria-expanded="true"] {
  display: none;
}
/* keep the footer and its "Back to top" link clear of the stack (two round buttons + the artwork) */
body.client-has-chat .footer {
  padding-bottom: calc(220px * 0.577 + 160px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 600px) {
  body.client-has-chat .footer {
    padding-bottom: calc(280px * 0.577 + 160px + env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 1024px) {
  body.client-has-chat .footer {
    padding-bottom: calc(clamp(300px, 26vw, 380px) * 0.577 + 176px + env(safe-area-inset-bottom, 0px));
  }
}
.aiae-chat textarea::placeholder {
  color: #9aa3ad;
  opacity: 1;
}

.aiae-chat {
  position: fixed;
  z-index: 60; /* above the header (50) and the floating buttons (40) */
  /* desktop / tablet: a compact panel beside the floating column, inside the viewport */
  right: calc(16px + 56px + 16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(380px, calc(100vw - 120px));
  height: min(560px, calc(100dvh - 32px));
  display: flex;
  flex-direction: column;
  background: var(--bg, #050505);
  color: var(--text, #f2f2f2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px #000c;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
}
.aiae-chat[hidden] {
  display: none;
}
.aiae-chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #0d0d0d;
}
.aiae-chat-titles {
  flex: 1;
  min-width: 0;
}
.aiae-chat-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aiae-chat-sub {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8b8b8;
}
.aiae-chat-iconbtn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text, #f2f2f2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.aiae-chat-iconbtn:hover {
  background: #ffffff14;
}
.aiae-chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aiae-chat-intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aiae-chat-note {
  margin: 0;
  font-size: 12.5px;
  color: #b8b8b8;
  overflow-wrap: anywhere;
}
.aiae-chat-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.aiae-msg {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.aiae-msg-assistant {
  align-self: flex-start;
  background: #1b1b1b;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.aiae-msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #050505;
  border-bottom-right-radius: 4px;
}
.aiae-msg-loading {
  color: #b8b8b8;
}
.aiae-dots::after {
  content: "…";
  animation: aiae-blink 1.2s steps(4, end) infinite;
}
@keyframes aiae-blink {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}
.aiae-chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.aiae-chip {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #121212;
  color: var(--text, #f2f2f2);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.aiae-chip:hover {
  border-color: var(--accent);
}
.aiae-chat-alert {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ff8a5c;
  background: #2a130a;
  color: #ffe2d6;
  font-size: 14px;
}
.aiae-chat-alert p {
  margin: 0 0 6px;
}
.aiae-chat-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aiae-chat-contacts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.aiae-contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121212;
  color: var(--text, #f2f2f2);
  text-decoration: none;
  font-size: 14px;
}
.aiae-contact:hover {
  border-color: var(--accent);
}
.aiae-chat-verify:empty {
  display: none;
}
.aiae-chat-form {
  border-top: 1px solid var(--line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #0d0d0d;
}
.aiae-chat-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.aiae-chat-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ffffff40;
  background: #050505;
  color: var(--text, #f2f2f2);
  font: inherit;
  font-size: 16px; /* 16 px: no automatic zoom on iPhone */
}
.aiae-chat-send {
  min-width: 64px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #050505;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.aiae-chat-send:disabled,
.aiae-chat-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.aiae-chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: #b8b8b8;
}
.aiae-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* phones: a full-screen chat that follows the on-screen keyboard (see client-chat-ui.js) */
@media (max-width: 640px) {
  .aiae-chat {
    top: var(--aiae-top, 0px);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--aiae-vh, 100dvh);
    border-radius: 0;
    border: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  html.aiae-chat-lock,
  html.aiae-chat-lock body {
    overflow: hidden;
    overscroll-behavior: none;
  }
  html.aiae-chat-lock .client-floating {
    opacity: 0;
    visibility: hidden;
    transition: none;
  }
  html.aiae-chat-unlocking .client-floating {
    transition: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aiae-dots::after {
    animation: none;
  }
}
@media print {
  .aiae-chat {
    display: none;
  }
}

/* ================================================================ 1CAW Phase 4: chat window redesign
   A light, messenger-style chat on every client design: deep-blue header with the approved
   assistant's portrait, rounded bubbles (visitor blue on the right, assistant white on the left),
   timestamps, a round 3D send button, smooth open/close. The approved launcher artwork is unchanged.
   Lightweight: CSS only, animations run only while a reply is being prepared, reduced motion
   respected. */
.aiae-chat {
  --aiae-blue-1: #2f6bff;
  --aiae-blue-2: #1746d1;
  --aiae-ink: #12172a;
  --aiae-muted: #5d6680;
  --aiae-bg: #eef2f9;
  background: var(--aiae-bg);
  color: var(--aiae-ink);
  border: 1px solid #ffffff2e;
  border-radius: 22px;
  box-shadow: 0 30px 70px #000000a6, 0 8px 22px #00000059;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", "Hind Siliguri", sans-serif;
  transform-origin: 100% 100%;
  animation: aiae-open 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.aiae-chat.aiae-closing {
  animation: aiae-close 0.16s ease-in forwards;
}
@keyframes aiae-open {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes aiae-close {
  to { opacity: 0; transform: translateY(10px) scale(0.97); }
}
.aiae-chat-head {
  gap: 10px;
  padding: 12px 10px 12px 12px;
  border-bottom: 0;
  background: linear-gradient(135deg, #1b2a6b 0%, #2346c7 55%, #2f6bff 100%);
  color: #fff;
  box-shadow: 0 6px 16px #1746d140;
  position: relative;
  z-index: 1;
}
.aiae-chat-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.aiae-chat-sub {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #dbe5ff;
}
.aiae-chat-status {
  margin: 1px 0 0;
  font-size: 12px;
  line-height: 1.2;
  color: #bfffd6;
}
.aiae-status-typing {
  display: none;
}
.aiae-chat.aiae-typing .aiae-status-online {
  display: none;
}
.aiae-chat.aiae-typing .aiae-status-typing {
  display: inline;
  color: #fff;
}
/* the approved assistant's portrait: a uniform crop of the launcher artwork (never stretched) */
.aiae-avatar {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
}
.aiae-avatar-img {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #cfe0ff url("/assets/img/ai-assistant-launcher-480.webp?v=1") no-repeat;
  background-size: 360% auto;
  background-position: 22% 18%;
  box-shadow: 0 0 0 2px #ffffffd9, 0 4px 10px #0000004d;
}
.aiae-avatar-dot {
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px #2346c7;
}
/* typing on her phone: a small phone badge with three dots, only while a reply is prepared */
.aiae-avatar-phone {
  position: absolute;
  left: -6px;
  bottom: -4px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 22px;
  height: 15px;
  border-radius: 5px;
  background: #0b1430;
  box-shadow: 0 0 0 1.5px #ffffffcc, 0 2px 6px #0006;
}
.aiae-avatar-phone i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #8fb4ff;
}
.aiae-chat.aiae-typing .aiae-avatar-phone {
  display: flex;
}
.aiae-chat.aiae-typing .aiae-avatar-img {
  animation: aiae-avatar-breathe 1.6s ease-in-out infinite;
}
.aiae-chat.aiae-typing .aiae-avatar-phone {
  animation: aiae-phone-tilt 1.2s ease-in-out infinite;
}
.aiae-chat.aiae-typing .aiae-avatar-phone i {
  animation: aiae-dot-bounce 1s ease-in-out infinite;
}
.aiae-chat.aiae-typing .aiae-avatar-phone i:nth-child(2) { animation-delay: 0.15s; }
.aiae-chat.aiae-typing .aiae-avatar-phone i:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiae-avatar-breathe {
  0%, 100% { box-shadow: 0 0 0 2px #ffffffd9, 0 4px 10px #0000004d; transform: none; }
  50% { box-shadow: 0 0 0 3px #9cc0ff, 0 0 0 7px #2f6bff33; transform: translateY(-1px); }
}
@keyframes aiae-phone-tilt {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(4deg) translateY(-1px); }
}
@keyframes aiae-dot-bounce {
  0%, 80%, 100% { transform: none; opacity: 0.5; }
  40% { transform: translateY(-2px); opacity: 1; }
}
.aiae-chat-iconbtn {
  border: 1px solid #ffffff3d;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff2e, #ffffff12);
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff3d, 0 2px 0 #0f2a8a;
  font-weight: 600;
  transition: transform 0.12s, background 0.15s;
}
.aiae-chat-iconbtn:hover {
  background: linear-gradient(180deg, #ffffff40, #ffffff1f);
}
.aiae-chat-iconbtn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 3px #00000040;
}
.aiae-chat-close {
  font-size: 16px;
  padding: 0;
}
/* buttons inside the light body (retry, new conversation) */
.aiae-chat-body .aiae-chat-iconbtn {
  margin: 4px 6px 0 0;
  border-color: #c9d4ee;
  background: linear-gradient(180deg, #fff, #eef2fb);
  color: var(--aiae-blue-2);
  box-shadow: 0 2px 0 #c9d4ee;
}
.aiae-chat-body {
  padding: 16px 12px 8px;
  gap: 10px;
  background:
    radial-gradient(circle at 12% 8%, #dfe8fb 0, transparent 38%),
    radial-gradient(circle at 92% 70%, #e7ecf8 0, transparent 40%),
    var(--aiae-bg);
  scroll-behavior: smooth;
}
.aiae-chat-note {
  color: var(--aiae-muted);
  font-size: 12.5px;
  text-align: center;
}
.aiae-chat-log {
  gap: 10px;
}
.aiae-msg {
  position: relative;
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  animation: aiae-msg-in 0.18s ease-out;
}
.aiae-msg[data-time]::after {
  content: attr(data-time);
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1;
  text-align: right;
  opacity: 0.7;
}
@keyframes aiae-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.aiae-msg-assistant {
  background: #fff;
  color: var(--aiae-ink);
  border: 1px solid #dfe5f2;
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 1px #1c2b5a14, 0 3px 10px #1c2b5a14;
}
.aiae-msg-user {
  background: linear-gradient(135deg, var(--aiae-blue-1), var(--aiae-blue-2));
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 3px 10px #1746d147;
}
/* typing indicator bubble: three dots (the text stays for screen readers) */
.aiae-msg-loading {
  padding: 12px 16px;
  color: transparent;
}
.aiae-dots {
  position: relative;
  display: block;
  width: 34px;
  height: 10px;
  overflow: hidden;
  font-size: 0;
  color: transparent;
}
.aiae-dots::after {
  content: none;
  animation: none;
}
.aiae-dots::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7f8bad;
  box-shadow: 12px 0 0 #7f8bad, 24px 0 0 #7f8bad;
  animation: aiae-typing 1.1s ease-in-out infinite;
}
@keyframes aiae-typing {
  0%, 100% { box-shadow: 12px 0 0 #b9c2dc, 24px 0 0 #b9c2dc; background: #4f5f8f; }
  33% { box-shadow: 12px 0 0 #4f5f8f, 24px 0 0 #b9c2dc; background: #b9c2dc; }
  66% { box-shadow: 12px 0 0 #b9c2dc, 24px 0 0 #4f5f8f; background: #b9c2dc; }
}
.aiae-chip {
  min-height: 44px;
  border: 1px solid #c9d4ee;
  border-radius: 999px;
  background: #fff;
  color: var(--aiae-blue-2);
  font-weight: 600;
  box-shadow: 0 2px 0 #d7def0;
  transition: transform 0.12s, border-color 0.15s;
}
.aiae-chip:hover {
  border-color: var(--aiae-blue-1);
}
.aiae-chip:active {
  transform: translateY(1px);
  box-shadow: none;
}
.aiae-chat-alert {
  border: 1px solid #f3b8a3;
  background: #fff3ee;
  color: #6b1f04;
}
.aiae-contact {
  border: 1px solid #c9d4ee;
  background: #fff;
  color: var(--aiae-blue-2);
  font-weight: 600;
  box-shadow: 0 2px 0 #d7def0;
}
.aiae-contact:hover {
  border-color: var(--aiae-blue-1);
}
.aiae-chat-form {
  border-top: 1px solid #dde3f0;
  background: #fff;
}
.aiae-chat-row {
  align-items: flex-end;
  gap: 8px;
}
.aiae-chat-input {
  border: 1.5px solid #c7d0e4;
  border-radius: 22px;
  background: #f5f7fc;
  color: var(--aiae-ink);
  padding: 10px 14px;
  line-height: 1.4;
}
.aiae-chat-input:focus {
  border-color: var(--aiae-blue-1);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px #2f6bff33;
}
.aiae-chat textarea::placeholder {
  color: #8a93ab;
}
.aiae-chat-send {
  flex: none;
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #4a80ff, #1b4fe0);
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff59, 0 3px 0 #1035a6, 0 6px 14px #1746d159;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.15s;
}
.aiae-chat-send svg {
  width: 21px;
  height: 21px;
  margin-left: 2px;
}
.aiae-chat-send:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.aiae-chat-send:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px #0000004d;
}
.aiae-chat-send:disabled {
  background: #c4cbe0;
  box-shadow: none;
  opacity: 1;
}
.aiae-chat-meta {
  color: var(--aiae-muted);
}
.aiae-chat button:focus-visible,
.aiae-chat a:focus-visible,
.aiae-chat textarea:focus-visible {
  outline: 3px solid #ffb020;
  outline-offset: 2px;
}
/* launcher: the approved artwork, with a little depth and a calm tap */
.client-float-chat.aiae-launcher {
  filter: drop-shadow(0 10px 18px #00000059) drop-shadow(0 2px 4px #0000004d);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), filter 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.client-float-chat.aiae-launcher:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 16px 24px #00000066) drop-shadow(0 3px 6px #0000004d);
}
.client-float-chat.aiae-launcher:active {
  transform: translateY(1px) scale(0.98);
}
@media (max-width: 640px) {
  .aiae-chat {
    border-radius: 0;
    animation: aiae-open-phone 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
  /* opacity only on phones: the full-screen panel never moves outside the screen */
  @keyframes aiae-open-phone {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .aiae-msg {
    max-width: 88%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aiae-chat,
  .aiae-chat.aiae-closing,
  .aiae-msg,
  .aiae-dots::before,
  .aiae-chat.aiae-typing .aiae-avatar-img,
  .aiae-chat.aiae-typing .aiae-avatar-phone,
  .aiae-chat.aiae-typing .aiae-avatar-phone i {
    animation: none;
  }
  .aiae-chat-body {
    scroll-behavior: auto;
  }
  .client-float-chat.aiae-launcher,
  .aiae-chat-send,
  .aiae-chip,
  .aiae-chat-iconbtn {
    transition: none;
  }
  .client-float-chat.aiae-launcher:hover,
  .client-float-chat.aiae-launcher:active {
    transform: none;
  }
}

/* phones: the launcher always shows the complete approved design, only smaller; while the visitor
   scrolls down to read it shrinks a little more (client-nav.js), and grows back on scroll up. */
@media (max-width: 480px) {
  .client-float-chat.aiae-launcher {
    --aiae-launcher-w: 176px;
    transition: width 0.25s ease;
  }
  body.client-reading .client-float-chat.aiae-launcher {
    --aiae-launcher-w: 140px;
  }
  body.client-has-chat .footer {
    padding-bottom: calc(176px * 0.577 + 150px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 480px) and (prefers-reduced-motion: reduce) {
  .client-float-chat.aiae-launcher {
    transition: none;
  }
}

/* ================================================================ 1CAW: animated neon outline
   ONE continuous outline along the OUTER silhouette of the launcher artwork (round photo + chat
   bubble + tail), drawn just outside the art — never a ring around the face. A soft base line plus a
   travelling band of colour (electric blue → cyan → purple → pink). Pure CSS on one SVG path; no
   script, no layout shift, never catches clicks. Reduced motion: a static outline. */
.client-float-chat.aiae-launcher {
  position: relative;
}
.aiae-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.aiae-outline path {
  fill: none;
  stroke: url(#aiae-outline-grad);
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.aiae-outline-base {
  stroke-width: 1.4;
  opacity: 0.55;
}
.aiae-outline-run {
  stroke-width: 2.6;
  stroke-dasharray: 230 770;
  filter: drop-shadow(0 0 2px #22d3eecc) drop-shadow(0 0 5px #a855f799);
  animation: aiae-outline-run 6s linear infinite;
}
@keyframes aiae-outline-run {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -1000;
  }
}

/* the locked launcher card: the same travelling neon light along its own rounded outline */
@property --aiae-sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.aiae-locked-launcher {
  position: relative;
  isolation: isolate;
}
.aiae-locked-launcher::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  padding: 2px;
  border-radius: 20px;
  background: conic-gradient(from var(--aiae-sweep), #3b82f6 0deg, #22d3ee 50deg, #a855f7 100deg, #f472b6 140deg, #3b82f633 190deg, #3b82f633 330deg, #3b82f6 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 4px #22d3ee88);
  pointer-events: none;
  animation: aiae-sweep 6s linear infinite;
}
@keyframes aiae-sweep {
  to {
    --aiae-sweep: 360deg;
  }
}
/* the round photos: a calm static frame (no ring, nothing near the face) */
.aiae-photo-img {
  box-shadow: 0 0 0 2px #ffffffd9, 0 3px 8px #0006;
}
/* ================================================================ 1CAW Batch 6: locked launcher */
.aiae-locked-launcher {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 152px;
  padding: 10px 10px 12px;
  border: 1px solid #ffffff26;
  border-radius: 18px;
  background: linear-gradient(180deg, #18214a 0%, #0c1230 100%);
  color: #fff;
  font: inherit;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff2e, 0 4px 0 #070b1f, 0 14px 28px #0009;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.aiae-locked-launcher[hidden] {
  display: none;
}
.aiae-locked-launcher:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 #ffffff2e, 0 6px 0 #070b1f, 0 18px 32px #000a;
}
.aiae-locked-launcher:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px #0008, 0 1px 0 #070b1f;
}
.aiae-locked-launcher:focus-visible,
.aiae-locked-panel a:focus-visible,
.aiae-locked-panel button:focus-visible {
  outline: 3px solid #ffb020;
  outline-offset: 2px;
}
/* the assistant's round photo: a uniform crop of the approved artwork (never stretched) */
.aiae-photo {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
}
.aiae-photo-img {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #cfe0ff url("/assets/img/ai-assistant-launcher-480.webp?v=1") no-repeat;
  background-size: 360% auto;
  background-position: 22% 18%;
}
.aiae-photo-sm {
  width: 48px;
  height: 48px;
}
.aiae-locked-caption {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #f1f5ff;
}
.aiae-unlock-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 72px;
  padding: 5px 14px 6px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fcd34d, #f59e0b);
  color: #2a1700;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: inset 0 1px 0 #fff7, 0 2px 0 #b45309;
}
.aiae-lock-icon {
  width: 14px;
  height: 14px;
}
@media (max-width: 480px) {
  .aiae-locked-launcher {
    width: 112px;
    padding: 7px 6px 8px;
    gap: 4px;
    border-radius: 16px;
  }
  .aiae-locked-launcher .aiae-photo {
    width: 44px;
    height: 44px;
  }
  .aiae-locked-caption {
    font-size: 10.5px;
    line-height: 1.25;
  }
  .aiae-unlock-pill {
    min-width: 60px;
    padding: 3px 10px 4px;
    font-size: 11px;
  }
  .aiae-lock-icon {
    width: 12px;
    height: 12px;
  }
}

/* ================================================================ 1CAW Batch 6: plans panel */
html.aiae-locked-open {
  overflow: hidden;
}
.aiae-locked-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
}
.aiae-locked-panel[hidden] {
  display: none;
}
.aiae-locked-backdrop {
  position: absolute;
  inset: 0;
  background: #050816c7;
  backdrop-filter: blur(3px);
}
.aiae-locked-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(820px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-radius: 22px;
  background: #eef2f9;
  color: #12172a;
  box-shadow: 0 30px 70px #000a;
  animation: aiae-open 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.aiae-locked-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: linear-gradient(135deg, #1b2a6b 0%, #2346c7 55%, #2f6bff 100%);
  color: #fff;
}
.aiae-locked-titles {
  flex: 1;
  min-width: 0;
}
.aiae-locked-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: #fff;
}
.aiae-locked-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0 0;
  font-size: 12.5px;
  color: #dbe5ff;
}
.aiae-locked-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff3d;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff2e, #ffffff12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff3d, 0 2px 0 #0f2a8a;
}
.aiae-locked-body {
  overflow-y: auto;
  padding: 16px;
  overscroll-behavior: contain;
}
.aiae-locked-intro {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.55;
  color: #2a3350;
}
.aiae-plan-features li {
  display: list-item;
}
.aiae-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.aiae-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 14px 14px;
  border: 1px solid #d9e0ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 0 #d9e0ef, 0 8px 20px #1c2b5a14;
}
.aiae-plan-rec {
  border: 2px solid #2f6bff;
  box-shadow: 0 3px 0 #1746d1, 0 12px 26px #1746d133;
}
.aiae-plan-badge {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: #1746d1;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
}
.aiae-plan-example {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #6b4a00;
  font-size: 11px;
  font-weight: 700;
}
.aiae-plan-name {
  margin: 2px 0 0;
  font-size: 17px;
  color: #12172a;
}
.aiae-plan-price {
  margin: 0;
  font-size: 15px;
  color: #12172a;
}
.aiae-plan-amount {
  font-size: 22px;
  font-weight: 800;
}
.aiae-plan-period,
.aiae-plan-price-ask {
  color: #5d6680;
  font-size: 13.5px;
}
.aiae-plan-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #3b4566;
}
.aiae-plan-features {
  margin: 2px 0 4px;
  padding-left: 18px;
  list-style: disc;
  font-size: 13.5px;
  line-height: 1.55;
  color: #2a3350;
}
.aiae-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.aiae-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.aiae-cta:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}
.aiae-cta:active {
  transform: translateY(2px);
}
.aiae-cta-wa {
  background: linear-gradient(180deg, #2fd46b, #16a34a);
  box-shadow: inset 0 1px 0 #ffffff59, 0 3px 0 #0f7a36;
}
.aiae-cta-mail {
  background: linear-gradient(180deg, #4a80ff, #1b4fe0);
  box-shadow: inset 0 1px 0 #ffffff59, 0 3px 0 #1035a6;
}
.aiae-btn-icon {
  width: 18px;
  height: 18px;
}
.aiae-locked-contact {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d9e0ef;
}
.aiae-locked-contact-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #12172a;
}
.aiae-locked-note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: #5d6680;
}
@media (max-width: 640px) {
  .aiae-locked-panel {
    align-items: flex-end;
    padding: 0;
  }
  .aiae-locked-box {
    width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
  }
  .aiae-cta {
    flex: 1 1 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aiae-outline-run,
  .aiae-locked-launcher::before,
  .aiae-locked-box {
    animation: none;
  }
  /* a static, complete outline instead of the moving light */
  .aiae-outline-run {
    stroke-dasharray: none;
    stroke-width: 2;
  }
  .aiae-locked-launcher,
  .aiae-cta {
    transition: none;
  }
}

/* the locked launcher is taller than a round button: the footer keeps room so nothing is covered */
body.client-has-locked-ai .footer {
  padding-bottom: calc(360px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 480px) {
  body.client-has-locked-ai .footer {
    padding-bottom: calc(290px + env(safe-area-inset-bottom, 0px));
  }
}

/* 1CAW: on small phones the locked AI Assistant card is a compact round photo with a small lock
   badge (the same assistant picture). It no longer covers buttons or text; a tap opens the same
   panel as before. The caption stays available to screen readers. Nothing is activated. */
@media (max-width: 480px) {
  .aiae-locked-launcher {
    position: relative;
    width: 56px;
    height: 56px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    justify-content: center;
    box-shadow: inset 0 1px 0 #ffffff2e, 0 3px 0 #070b1f, 0 8px 16px #0008;
  }
  .aiae-locked-launcher::before {
    display: none;
  }
  .aiae-locked-launcher .aiae-photo {
    width: 48px;
    height: 48px;
  }
  .aiae-locked-caption,
  .aiae-unlock-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .aiae-unlock-pill {
    position: absolute;
    right: -4px;
    bottom: -4px;
    min-width: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    flex-direction: row;
  }
}

/* 1CAW UI upgrade: the disclosure and privacy notes stay fully visible, but as one compact,
   low-key card so the conversation starts higher on phones. Text and wording are unchanged. */
.aiae-chat .aiae-chat-intro {
  gap: 8px;
}
.aiae-chat .aiae-chat-intro .aiae-chat-note {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #dfe5f2;
  border-radius: 12px;
  background: #ffffffb3;
  font-size: 11.5px;
  line-height: 1.45;
  text-align: left;
}
.aiae-chat .aiae-chat-intro .aiae-chat-note + .aiae-chat-note {
  margin-top: -6px;
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.aiae-chat .aiae-chat-intro .aiae-chat-note:has(+ .aiae-chat-note) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
/* the send button stays clearly tappable and visible */
.aiae-chat .aiae-chat-send {
  min-width: 44px;
  min-height: 44px;
}
