/* ─── Ask MaxRemind Bot — UI v2 ─── */

.amb-root {
  --amb-primary: #2181C3;
  --amb-primary-dark: #156194;
  --amb-primary-light: #e8f3fb;
  --amb-teal: #0da99b;
  --amb-teal-light: #e6f7f6;
  --amb-ink: #0f1117;
  --amb-soft-ink: #4a4a5a;
  --amb-muted: #8a8f98;
  --amb-line: #e8e8f0;
  --amb-panel: #ffffff;
  --amb-user: #f0f4f8;
  --amb-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --amb-radius: 14px;
  --amb-shadow-panel: 0 24px 56px rgba(10, 20, 40, .13), 0 2px 8px rgba(10, 20, 40, .06);
  --amb-shadow-btn: 0 6px 20px rgba(33, 129, 195, .28);
  font-family: var(--amb-font);
  color: var(--amb-ink);
  font-size: 16px;
  line-height: 1.4;
}

.amb-root * { box-sizing: border-box; letter-spacing: 0; }

.amb-root button,
.amb-root input,
.amb-root select {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
  box-shadow: none;
}

.amb-root button {
  margin: 0;
  border-style: solid;
  padding: 0 !important;
  text-align: center;
  text-decoration: none;
  line-height: 1;
  width: auto;
  max-width: none;
  min-width: 0;
  height: auto;
  overflow: visible;
  white-space: nowrap;
}

.amb-root input, .amb-root select { margin: 0; }

.amb-root svg { display: block; fill: none; overflow: visible; }

.amb-root p,
.amb-root strong,
.amb-root span,
.amb-root div,
.amb-root section,
.amb-root header,
.amb-root footer { margin-top: 0; }

.amb-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.amb-icon svg { width: 100%; height: 100%; }


/* ─── Launcher button ─── */

.amb-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: calc(100vw - 32px);
}

.amb-launcher-teaser {
  width: min(370px, calc(100vw - 32px)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: transparent !important;
  color: var(--amb-ink) !important;
  text-align: left !important;
  white-space: normal !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(.98);
}

.amb-root.is-launcher-ready .amb-launcher-teaser {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  animation: ambLauncherTeaserIn .38s cubic-bezier(.2,.8,.2,1) both;
}

.amb-root.is-launcher-dismissed .amb-launcher-teaser {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(.98);
  animation: none;
}

@keyframes ambLauncherTeaserIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.amb-launcher-intro {
  position: relative;
  width: min(360px, 100%);
  align-self: center;
  padding: 14px 34px 14px 16px !important;
  border: 1px solid rgba(214, 223, 235, .9);
  border-radius: 18px;
  background: #fff;
  color: #172033;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .12);
}

.amb-launcher-close {
  position: absolute !important;
  top: 8px;
  right: 9px;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border: 0 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: #7a8798 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  cursor: pointer;
}

.amb-launcher-close:hover {
  background: #f2f6fb !important;
  color: #172033 !important;
}

.amb-launcher-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  overflow: hidden;
  background: #eaf5ff;
  border: 3px solid #e9f3ff;
  box-shadow: inset 0 0 0 1px rgba(33, 129, 195, .12);
}

.amb-launcher-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.amb-launcher-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.amb-launcher-copy strong {
  color: #172033;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.18;
}

.amb-launcher-copy span {
  color: #5e6a7d;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
}

.amb-launcher-copy em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  margin-top: 3px;
  padding: 0 9px !important;
  border: 1px solid #d9f4e4;
  border-radius: 999px;
  background: #f6fef9;
  color: #128b45;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.amb-launcher-copy em i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #18c46b;
  box-shadow: 0 0 0 3px rgba(24, 196, 107, .12);
}

.amb-launcher .amb-launcher-suggestion {
  width: min(260px, 92%) !important;
  max-width: 100% !important;
  min-height: 44px !important;
  border: 1px solid rgba(214, 223, 235, .95) !important;
  border-radius: 60px !important;
  padding: 0 12px 0 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  background: #fff !important;
  color: #172033 !important;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .1);
  transition: border-color .14s ease, color .14s ease, transform .14s ease, box-shadow .14s ease !important;
}

.amb-launcher-suggestion:nth-of-type(2) { align-self: flex-end; }
.amb-launcher-suggestion:nth-of-type(3) { align-self: center; width: min(300px, 96%) !important; }
.amb-launcher-suggestion:nth-of-type(4) { align-self: flex-end; width: min(268px, 92%) !important; }
.amb-launcher-suggestion:nth-of-type(5) { align-self: center; width: min(220px, 82%) !important; }

.amb-launcher-suggestion-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #102033;
}

.amb-launcher-suggestion-arrow {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: #102033;
}

.amb-launcher-suggestion-arrow svg {
  width: 100%;
  height: 100%;
}

.amb-launcher-suggestion-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.amb-launcher-suggestion:hover {
  border-color: rgba(22, 135, 232, .45) !important;
  color: #0f172a !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .14);
}

.amb-open,
.amb-minimized {
  position: relative;
  width: auto !important;
  min-width: 182px !important;
  max-width: calc(100vw - 32px);
  height: 52px !important;
  min-height: 52px !important;
  border: 0 !important;
  border-radius: 999px;
  padding: 0 24px !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--amb-primary) !important;
  color: #fff !important;
  box-shadow: var(--amb-shadow-btn);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.amb-open > span:last-child,
.amb-minimized > span:last-child {
  display: block;
  min-width: 76px;
  overflow: visible;
  white-space: nowrap;
}

.amb-open:hover,
.amb-minimized:hover {
  transform: translateY(-2px);
  background: var(--amb-primary-dark) !important;
  box-shadow: 0 10px 32px rgba(33, 129, 195, .38);
}

.amb-minimized { display: none; }
.amb-minimized.is-active { display: inline-flex; }

.amb-root.is-launcher-quiet .amb-launcher-teaser,
.amb-root.is-chat-open .amb-launcher,
.amb-root.is-video-floating .amb-launcher {
  display: none;
}


/* ─── Chat panel ─── */

.amb-chat {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000000;
  width: 400px;
  max-width: 100vw;
  display: none;
  flex-direction: column;
  background: var(--amb-panel);
  color: var(--amb-ink);
  border-left: 1px solid var(--amb-line);
  box-shadow: var(--amb-shadow-panel);
  overflow: visible;
}

.amb-chat.is-active { display: flex; }


/* ─── Header ─── */

.amb-header {
  height: 72px;
  padding: 0 20px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--amb-panel);
  border-bottom: 1px solid var(--amb-line);
  flex: 0 0 auto;
}

.amb-agent {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

/* Online dot */
.amb-agent::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .22);
}

.amb-agent strong {
  color: var(--amb-ink);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.amb-agent span {
  color: var(--amb-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.amb-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.amb-header-btn {
  width: 36px;
  height: 36px;
  border: 0 !important;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: transparent !important;
  color: var(--amb-soft-ink) !important;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .14s;
}

.amb-header-btn:hover { background: var(--amb-line) !important; }

.amb-end-chat {
  width: auto !important;
  min-width: 58px !important;
  height: 30px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(220, 38, 38, .25) !important;
  border-radius: 999px !important;
  background: #fff1f2 !important;
  color: #dc2626 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: 0 4px 10px rgba(220, 38, 38, .08) !important;
}

.amb-end-chat:hover {
  background: #fee2e2 !important;
  border-color: rgba(220, 38, 38, .42) !important;
}


/* ─── Top strip (speak btn + video) ─── */

.amb-top {
  position: relative;
  padding: 16px 20px 0 !important;
  background: var(--amb-panel);
  flex: 0 0 auto;
}

.amb-speak-start {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-bottom: 12px;
}

/* ─── Primary action buttons ─── */

.amb-speak-btn,
.amb-demo-btn {
  border: 0 !important;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--amb-primary) !important;
  color: #fff !important;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  width: auto;
  max-width: 100%;
  overflow: visible;
  transition: background .16s, box-shadow .16s, transform .14s;
}

.amb-speak-btn {
  height: 56px !important;
  min-height: 56px !important;
  padding: 6px 18px 6px 7px !important;
  font-size: 14px;
  background: #fff !important;
  color: var(--amb-ink) !important;
  border: 1px solid #dce3ee !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  gap: 10px;
}

.amb-demo-btn {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 16px !important;
  font-size: 13px;
  background: #f5f5f7 !important;
  color: var(--amb-ink) !important;
  box-shadow: none;
}

.amb-speak-btn:hover {
  background: #fff !important;
  border-color: rgba(33, 129, 195, .32) !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
  transform: translateY(-1px);
}

.amb-demo-btn:hover { background: var(--amb-line) !important; }

.amb-speak-btn .amb-icon {
  width: 16px;
  height: 16px;
  color: var(--amb-primary);
}

.amb-speak-avatar {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: #dce7ef;
  border: 1px solid #e4e9f1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.amb-speak-avatar video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}

.amb-speak-avatar.is-ready video {
  opacity: 1;
}


/* ─── Avatar / video area ─── */

.amb-video {
  display: none;
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: 198px;
  margin: 0 0 14px;
  overflow: hidden;
  border-radius: var(--amb-radius);
  background: #dce7ef;
  box-shadow: 0 8px 24px rgba(10, 20, 40, .10);
}

.amb-video.is-active { display: block; }

.amb-root.is-intro-video .amb-top {
  padding-top: 16px !important;
}

.amb-root.is-intro-video .amb-speak-start {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 24px;
  z-index: 30;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}

.amb-root.is-intro-video .amb-speak-btn {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  pointer-events: auto;
  background: #2281c4 !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 8px 20px rgba(38, 20, 104, .28);
}

.amb-root.is-intro-video .amb-speak-btn:hover {
  background: #2281c4 !important;
  box-shadow: 0 10px 24px rgba(38, 20, 104, .34);
}

.amb-root.is-intro-video .amb-speak-btn .amb-icon {
  color: #fff;
}

.amb-root.is-intro-video .amb-speak-avatar {
  display: none !important;
}

.amb-root.is-intro-video .amb-video {
  display: block;
}

.amb-root.is-intro-video .amb-video-controls,
.amb-root.is-intro-video .amb-mode-note,
.amb-root.is-intro-video .amb-listening {
  display: none;
}

.amb-root.is-intro-video .amb-video.is-avatar-connecting::before {
  display: none;
}

.amb-root.is-intro-video .amb-video.is-avatar-connecting::after {
  content: "Connecting...";
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  background: rgba(255, 255, 255, .88);
  color: #344054;
  border: 1px solid rgba(207, 216, 230, .9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.amb-root.is-intro-video .amb-video.is-avatar-connecting .amb-avatar-video {
  opacity: 0;
}

.amb-video.is-avatar-switching::after {
  content: attr(data-avatar-label);
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 4;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .54);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .16);
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.amb-video.is-avatar-switching .amb-avatar-video {
  opacity: .86;
  filter: saturate(.96) brightness(.98);
}

.amb-video.is-avatar-connecting {
  background: linear-gradient(135deg, #dce7ef, #edf4f8, #dce7ef);
  background-size: 220% 220%;
  animation: amb-avatar-loading-bg 2.4s ease-in-out infinite;
}

.amb-video.is-avatar-connecting::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(40% - 14px);
  z-index: 6;
  width: 25px;
  height: 25px;
  margin: -12px 0 0 -12px;
  border: 3px solid rgba(34, 137, 201, .20);
  border-top-color: #2289c9;
  border-radius: 50%;
  animation: amb-avatar-spin .8s linear infinite;
  pointer-events: none;
}

.amb-video.is-avatar-connecting::after,
.amb-video.is-avatar-error::after {
  content: attr(data-avatar-label);
  position: absolute;
  left: 50%;
  top: calc(40% + 17px);
  z-index: 6;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .68);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .16);
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.amb-video.is-avatar-connecting .amb-avatar-video { opacity: .35; }

.amb-video.is-avatar-connecting .amb-video-controls {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.amb-video.is-avatar-error::after {
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(127, 29, 29, .78);
}

@keyframes amb-avatar-spin {
  to { transform: rotate(360deg); }
}

@keyframes amb-avatar-loading-bg {
  0%, 100% { background-position: 0 50%; }
  50% { background-position: 100% 50%; }
}

/* Expanded / floating video */

.amb-root.is-video-expanded::before {
  content: "";
  position: fixed;
  inset: 0 400px 0 0;
  z-index: 999998;
  background: rgba(10, 16, 28, .60);
  backdrop-filter: blur(3px);
}

.amb-root.is-video-expanded .amb-video {
  position: fixed;
  left: calc((100vw - 400px) / 2);
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000001;
  width: min(980px, calc(100vw - 448px), calc((100vh - 96px) * 1.777));
  max-width: 980px;
  height: auto;
  min-height: 0;
  margin: 0;
  border-radius: var(--amb-radius);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .40);
}

.amb-root.is-video-floating .amb-chat {
  display: block;
  width: 0;
  max-width: none;
  border-left: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.amb-root.is-video-floating .amb-header,
.amb-root.is-video-floating .amb-speak-start,
.amb-root.is-video-floating .amb-mode-note,
.amb-root.is-video-floating .amb-listening,
.amb-root.is-video-floating .amb-messages,
.amb-root.is-video-floating .amb-typing,
.amb-root.is-video-floating .amb-footer { display: none; }

.amb-root.is-video-floating .amb-top { padding: 0; }

.amb-root.is-video-floating .amb-video {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000001;
  display: block;
  width: min(320px, calc(100vw - 32px));
  min-height: 0;
  margin: 0;
  pointer-events: auto;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
}

.amb-root.is-video-floating .amb-video-controls { bottom: 10px; }

.amb-video.has-liveavatar .amb-video-controls,
.amb-video.has-liveavatar .amb-mic-wrap,
.amb-video.has-liveavatar ~ .amb-listening { display: none; }

.amb-root.is-video-floating .amb-mic-wrap {
  position: fixed;
  right: 34px;
  bottom: 246px;
  left: auto;
  top: auto;
  width: min(300px, calc(100vw - 48px));
  transform: none;
  pointer-events: auto;
}

/* Avatar media elements */

.amb-avatar-embed,
.amb-avatar-video,
.amb-avatar-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  object-position: center;
  border-radius: var(--amb-radius);
  display: none;
  transition: opacity .22s ease, filter .22s ease;
}

.amb-video.has-embed .amb-avatar-embed,
.amb-video.has-video .amb-avatar-video,
.amb-video.has-poster .amb-avatar-poster { display: block; }

.amb-video.has-embed .amb-avatar-local,
.amb-video.has-video .amb-avatar-local,
.amb-video.has-poster .amb-avatar-local { display: none; }

/* Illustrated avatar placeholder */
.amb-avatar-local {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--amb-radius);
  background:
    radial-gradient(circle at 18% 32%, rgba(118, 160, 200, .18) 0 18%, transparent 19%),
    linear-gradient(130deg, #e8f3fb 0%, #cce1f2 48%, #eef4fb 100%);
}

.amb-room-plant {
  position: absolute;
  left: 20px;
  bottom: 28px;
  width: 70px;
  height: 142px;
  border-left: 3px solid rgba(60, 100, 80, .40);
  transform: rotate(-10deg);
}
.amb-room-plant::before,
.amb-room-plant::after {
  content: "";
  position: absolute;
  width: 48px;
  height: 19px;
  border-radius: 50%;
  background: rgba(80, 140, 90, .38);
}
.amb-room-plant::before { top: 28px; left: -35px; transform: rotate(32deg); }
.amb-room-plant::after  { top: 70px; left: 8px;   transform: rotate(-25deg); }

.amb-wall-frame {
  position: absolute;
  right: 30px;
  top: 22px;
  width: 82px;
  height: 58px;
  border: 5px solid rgba(255, 255, 255, .82);
  background: rgba(180, 210, 230, .28);
  box-shadow: 0 8px 20px rgba(31, 41, 55, .08);
  border-radius: 3px;
}

.amb-human {
  position: absolute;
  left: 51%;
  bottom: -10px;
  width: 164px;
  height: 214px;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 28px rgba(15, 23, 42, .18));
}

.amb-hair {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 1;
  width: 106px;
  height: 112px;
  border-radius: 52% 52% 44% 44%;
  background: #20212b;
  box-shadow: -14px 18px 0 rgba(32, 33, 43, .94), 13px 20px 0 rgba(32, 33, 43, .94);
  transform: translateX(-50%);
}

.amb-head {
  position: absolute;
  top: 31px;
  left: 50%;
  z-index: 2;
  width: 78px;
  height: 90px;
  border-radius: 45% 45% 48% 48%;
  background: #c98b6b;
  box-shadow: inset 8px -8px 0 rgba(112, 52, 42, .10);
  transform: translateX(-50%);
}

.amb-eye {
  position: absolute;
  top: 42px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #15151d;
}
.amb-eye-left  { left: 22px; }
.amb-eye-right { right: 22px; }

.amb-mouth {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 24px;
  height: 7px;
  border-bottom: 3px solid #7f1d1d;
  border-radius: 0 0 14px 14px;
  transform: translateX(-50%);
}

.amb-neck {
  position: absolute;
  left: 50%;
  top: 108px;
  z-index: 1;
  width: 34px;
  height: 32px;
  border-radius: 0 0 14px 14px;
  background: #bd765b;
  transform: translateX(-50%);
}

.amb-body {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 148px;
  height: 92px;
  border-radius: 42px 42px 0 0;
  background: linear-gradient(135deg, #cce4f6, #7fb0cc);
  transform: translateX(-50%);
}

/* Speaking animations */
.amb-video.is-speaking .amb-mouth {
  animation: ambTalk .38s infinite;
}

.amb-video.is-speaking .amb-human {
  animation: ambPresence 1.25s ease-in-out infinite;
}

@keyframes ambTalk {
  0%, 100% { height: 7px; }
  50%       { height: 16px; }
}
@keyframes ambPresence {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-3px); }
}


/* ─── Video controls bar ─── */

.amb-video-controls {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 20;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(18, 24, 38, .14);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  backdrop-filter: blur(4px);
  transition: opacity .18s ease, visibility .18s ease;
}

.amb-control,
.amb-mic-btn,
.amb-send {
  width: 36px;
  min-width: 36px !important;
  height: 36px;
  min-height: 36px !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent !important;
  color: #30303a !important;
  cursor: pointer;
  transition: background .14s;
}

.amb-control:hover,
.amb-mic-btn:hover,
.amb-send:hover { background: var(--amb-line) !important; }

.amb-control .amb-icon,
.amb-mic-btn .amb-icon,
.amb-send .amb-icon { margin: 0; }

.amb-video-controls .amb-icon { width: 16px; height: 16px; }
.amb-video-controls .amb-video-mic { width: 36px; }
.amb-video-controls .amb-video-mic .amb-icon { width: 16px; height: 16px; }

/* Listening pulse on mic buttons */
.amb-control.is-listening,
.amb-mic-btn.is-listening {
  color: var(--amb-primary) !important;
  background: var(--amb-primary-light) !important;
  animation: ambPulse 1.1s ease-in-out infinite;
}

.amb-chevron {
  width: 22px;
  height: 36px;
  border: 0 !important;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent !important;
  color: #2e2e38 !important;
  cursor: pointer;
  transform: translateX(-6px);
  transition: background .14s, color .14s;
}

.amb-chevron::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.amb-chevron:hover,
.amb-chevron[aria-expanded="true"] {
  background: var(--amb-line) !important;
  color: var(--amb-primary) !important;
}

.amb-end {
  width: auto;
  min-width: 50px;
  padding: 0 6px 0 0 !important;
  border-radius: 999px;
  color: #e02424 !important;
  font-size: 18px;
  font-weight: 700;
}


/* ─── Microphone picker ─── */

.amb-mic-wrap {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 100;
  width: min(315px, calc(100vw - 56px));
  max-width: none;
  margin: 0 !important;
  transform: translateX(-50%);
  font-family: var(--amb-font) !important;
  pointer-events: auto;
}

.amb-mic-wrap.is-picker-open { display: block; }
.amb-mic-wrap label { display: none; }

.amb-mic-options {
  width: 100%;
  border: 1px solid var(--amb-line);
  border-radius: 10px;
  padding: 4px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(16, 24, 40, .16);
  max-height: 124px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.amb-mic-options::-webkit-scrollbar { width: 3px; }
.amb-mic-options::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(99, 112, 132, .24);
}

.amb-mic-option {
  width: 100%;
  max-width: 100%;
  min-height: 28px;
  height: auto !important;
  border: 0 !important;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 5px 8px !important;
  margin: 0 !important;
  background: transparent !important;
  color: #2f3037 !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  white-space: nowrap;
  overflow: hidden !important;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background .13s;
}

.amb-mic-note {
  padding: 6px 8px;
  color: #55545f;
  font-size: 10px;
  line-height: 1.4;
}

.amb-mic-option:hover,
.amb-mic-option[aria-checked="true"] {
  background: var(--amb-primary-light) !important;
  color: var(--amb-primary) !important;
}

.amb-mic-option[aria-checked="true"]::before {
  content: '✓';
  margin-right: 5px;
  font-weight: 700;
  color: var(--amb-primary);
}


/* ─── Status / mode note ─── */

.amb-mode-note,
.amb-mode-note.is-active,
.amb-listening,
.amb-listening.is-active { display: none !important; }

.amb-mode-note.is-active {
  min-height: 30px;
  width: fit-content;
  max-width: 92%;
  margin: 0 auto 12px;
  padding: 0 14px;
  border: 1px solid var(--amb-line);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--amb-soft-ink);
  background: #fff;
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(17, 24, 39, .04);
}

.amb-mode-note span {
  width: 14px;
  height: 14px;
  border: 2px solid #d8d8e4;
  border-top-color: var(--amb-primary);
  border-radius: 50%;
}

.amb-mode-note:not(.is-joining) span {
  width: 8px;
  height: 8px;
  border: 0;
  background: var(--amb-teal);
  border-radius: 50%;
}

.amb-mode-note.is-joining span { animation: ambSpin .8s linear infinite; }

.amb-listening.is-active {
  width: fit-content;
  margin: -3px auto 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--amb-primary);
  font-size: 12px;
  font-weight: 700;
}

.amb-listening.is-processing {
  color: var(--amb-soft-ink);
}

.amb-listening span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e02424;
  animation: ambPulse 1s infinite;
}

.amb-listening.is-processing span {
  width: 12px;
  height: 12px;
  border: 2px solid #d8d8e4;
  border-top-color: var(--amb-primary);
  background: transparent;
  animation: ambSpin .8s linear infinite;
}

.amb-mic-btn.is-processing,
.amb-video-mic.is-processing {
  background: rgba(33, 129, 195, .10) !important;
  color: var(--amb-primary) !important;
}


/* ─── Messages area ─── */

.amb-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 20px 20px !important;
  background: #fafbfc;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.amb-messages::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.amb-message {
  max-width: 100%;
  margin-bottom: 14px;
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-line;
  word-break: break-word;
}

.amb-message ul {
  margin: 8px 0 12px 18px;
  padding: 0;
  list-style: disc;
}

.amb-message li {
  margin: 0 0 10px;
  padding-left: 2px;
  white-space: normal;
}

.amb-message.amb-bot a {
  color: #0878be;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.amb-message.amb-bot a:hover,
.amb-message.amb-bot a:focus-visible {
  color: #075f96;
}

.amb-bot {
  padding: 0;
  color: #22222e;
  background: transparent;
}

.amb-typewriting::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--amb-primary);
  animation: ambCaretBlink .8s steps(1) infinite;
}

@keyframes ambCaretBlink {
  50% { opacity: 0; }
}

.amb-user {
  width: fit-content;
  max-width: 80%;
  margin-left: auto;
  padding: 11px 14px;
  border-radius: 14px 14px 3px 14px;
  background: var(--amb-primary);
  color: #fff;
  font-size: 14.5px;
}


/* ─── Quick chip buttons ─── */

.amb-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 2px 0 18px;
  align-items: center;
}

.amb-chip {
  width: auto;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  border: 1.5px solid rgba(33, 129, 195, .22) !important;
  border-radius: 999px;
  padding: 0 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff !important;
  color: var(--amb-primary) !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}

.amb-chip:hover {
  background: var(--amb-primary-light) !important;
  border-color: var(--amb-primary) !important;
}


/* ─── Typing indicator ─── */

.amb-typing {
  display: none;
  padding: 0 20px 12px;
  color: var(--amb-muted);
  font-size: 13px;
  font-style: italic;
  font-weight: 600;
}
.amb-typing.is-active { display: block; }

.amb-typing::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 6px;
  margin-right: 10px;
  vertical-align: 1px;
  background:
    radial-gradient(circle, #b5b6c2 45%, transparent 48%) 0 50% / 8px 6px no-repeat,
    radial-gradient(circle, #b5b6c2 45%, transparent 48%) 8px 50% / 8px 6px no-repeat,
    radial-gradient(circle, #b5b6c2 45%, transparent 48%) 16px 50% / 8px 6px no-repeat;
  animation: ambThinkingDots 1.1s steps(3, end) infinite;
}


/* ─── Footer / input ─── */

.amb-footer {
  flex: 0 0 auto;
  position: relative;
  padding: 10px 20px 16px !important;
  background: var(--amb-panel);
  border-top: 1px solid var(--amb-line);
}

.amb-jump-latest {
  position: absolute;
  right: 56px;
  top: -38px;
  z-index: 2;
  width: 28px;
  min-width: 28px !important;
  height: 28px;
  min-height: 28px !important;
  border: 0 !important;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: rgba(33, 129, 195, .92) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(33, 129, 195, .30);
  cursor: pointer;
}

.amb-jump-latest::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.amb-jump-latest.is-active { display: grid; }

.amb-input-row {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid var(--amb-line);
  border-radius: 12px;
  padding: 0 8px 0 14px !important;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.amb-input-row.is-focused {
  border-color: var(--amb-primary);
  box-shadow: 0 0 0 3px rgba(33, 129, 195, .12);
}

.amb-input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--amb-ink);
  font-size: 14.5px;
  line-height: 1.2 !important;
  padding: 0 !important;
}

.amb-input::placeholder { color: #a0a0ae; }

.amb-mic-btn,
.amb-send { flex: 0 0 auto; }

.amb-mic-btn { color: var(--amb-soft-ink) !important; }

.amb-send {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  color: #a0a0ae !important;
  background: var(--amb-line) !important;
  margin-left: 2px;
  transition: background .16s, color .16s;
}

.amb-send.is-ready {
  color: #fff !important;
  background: var(--amb-primary) !important;
}

.amb-footer p {
  margin: 8px 0 0;
  color: #9a9aa8;
  text-align: center;
  font-size: 11px;
  line-height: 1.35;
}

.amb-footer a { color: #8888a0; text-decoration: underline; }


/* ─── Keyframes ─── */

@keyframes ambPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.07); opacity: .8; }
}

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

@keyframes ambDots {
  from { background-position-x: 0; }
  to   { background-position-x: 8px; }
}

@keyframes ambThinkingDots {
  0% {
    opacity: .35;
    clip-path: inset(0 16px 0 0);
  }
  33% {
    opacity: .6;
    clip-path: inset(0 8px 0 0);
  }
  66%, 100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}


/* ─── Responsive overrides ─── */

@media (max-width: 860px) {
  .amb-root.is-video-expanded::before { display: none; }
  .amb-root.is-video-expanded .amb-video {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
  }
}

@media (max-width: 520px) {
  .amb-chat { left: 0; width: 100%; border-left: 0; }

  .amb-launcher { right: 16px; bottom: 16px; }

  .amb-root .amb-launcher-teaser { display: none !important; }

  .amb-agent span { display: none; }

  .amb-top,
  .amb-messages,
  .amb-footer,
  .amb-header { padding-left: 16px !important; padding-right: 16px !important; }

  .amb-user { max-width: 86%; }
}


/* ─── WordPress theme reset overrides ─── */

.amb-root .amb-open,
.amb-root .amb-minimized {
  width: auto !important;
  min-width: 140px !important;
  height: 52px !important;
  padding: 0 24px !important;
  overflow: visible !important;
}

.amb-root .amb-speak-btn {
  height: 56px !important;
  min-height: 56px !important;
  padding: 6px 18px 6px 7px !important;
  overflow: visible !important;
  font-size: 14px;
  font-weight: 600;
  width: auto !important;
  min-width: auto !important;
}

.amb-root .amb-demo-btn {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 16px !important;
  overflow: visible !important;
  font-size: 13px;
  font-weight: 600;
  width: auto !important;
  min-width: auto !important;
}

.amb-root .amb-chip {
  width: auto !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  overflow: visible !important;
  font-size: 12px;
  font-weight: 600;
}

.amb-root .amb-control,
.amb-root .amb-mic-btn {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
}

.amb-root .amb-send {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
}

.amb-root .amb-form-message {
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  background: transparent;
  padding: 0 !important;
}

.amb-root .amb-form-card {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--amb-line);
  border-radius: 12px;
  background: #fff;
  padding: 14px !important;
  color: var(--amb-ink);
  box-shadow: 0 10px 28px rgba(10, 20, 40, .06);
}

.amb-root .amb-form-card p {
  margin: 0 0 10px;
  color: var(--amb-soft-ink);
  font-size: 13px;
  line-height: 1.4;
}

.amb-root .amb-action-message {
  max-width: 100%;
  align-self: stretch;
  background: transparent;
  padding: 0 !important;
}

.amb-root .amb-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.amb-root .amb-action-btn,
.amb-root .amb-link-button {
  min-height: 34px !important;
  border: 1px solid rgba(33, 129, 195, .28) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--amb-primary) !important;
  padding: 7px 12px !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: none !important;
}

.amb-root .amb-action-btn:hover,
.amb-root .amb-link-button:hover {
  background: rgba(33, 129, 195, .08) !important;
}

.amb-root .amb-action-btn.is-selected {
  background: var(--amb-primary) !important;
  border-color: var(--amb-primary) !important;
  color: #fff !important;
}

.amb-root .amb-action-btn.is-muted,
.amb-root .amb-action-btn:disabled {
  cursor: default !important;
  opacity: .48;
}

.amb-root .amb-link-card {
  display: grid;
  gap: 10px;
}

.amb-root .amb-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  background: var(--amb-primary) !important;
  color: #fff !important;
}

.amb-root .amb-demo-confirmation {
  display: grid;
  gap: 8px;
}

.amb-root .amb-demo-confirmation strong {
  color: var(--amb-ink);
  font-size: 14px;
}

.amb-root .amb-demo-confirmation span {
  color: var(--amb-soft-ink);
  font-size: 13px;
  line-height: 1.4;
}

.amb-root .amb-demo-confirmation dl {
  display: grid;
  grid-template-columns: minmax(92px, auto) 1fr;
  gap: 6px 10px;
  margin: 4px 0 0;
  font-size: 12px;
}

.amb-root .amb-demo-confirmation dt {
  color: var(--amb-muted);
  font-weight: 700;
}

.amb-root .amb-demo-confirmation dd {
  margin: 0;
  color: var(--amb-ink);
}

.amb-root .amb-form-card label {
  display: block;
  margin: 0 0 6px;
  color: var(--amb-ink);
  font-size: 12px;
  font-weight: 500;
}

.amb-root .amb-form-card input,
.amb-root .amb-form-card textarea,
.amb-root .amb-form-card select {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 30px;
  margin: 0 !important;
  border: 1px solid #d9e2ee !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: var(--amb-ink) !important;
  font: inherit !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  padding: 6px 7px !important;
  box-shadow: none !important;
}

.amb-root .amb-form-card textarea {
  min-height: 50px;
  resize: vertical;
}

.amb-root .amb-form-card input:focus,
.amb-root .amb-form-card textarea:focus,
.amb-root .amb-form-card select:focus {
  border-color: var(--amb-primary) !important;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(33, 129, 195, .14) !important;
}

.amb-root .amb-form-card input[type="submit"],
.amb-root .amb-form-card button[type="submit"] {
  width: auto !important;
  min-width: 120px !important;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 0 18px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--amb-primary) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.amb-root .amb-form-card .wpcf7-not-valid-tip {
  margin-top: 5px;
  color: #d63638;
  font-size: 12px;
}

.amb-root .amb-form-card .wpcf7-response-output {
  margin: 10px 0 0 !important;
  border-radius: 9px;
  padding: 8px 10px !important;
  font-size: 13px;
}

.amb-root .amb-lead-form,
.amb-root .amb-demo-request-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.amb-root .amb-lead-form-head {
  padding-bottom: 4px;
}

.amb-root .amb-lead-form-head strong,
.amb-root .amb-lead-thanks strong {
  display: block;
  color: var(--amb-ink);
  font-size: 15px;
  font-weight: 750;
}

.amb-root .amb-lead-form-head span,
.amb-root .amb-lead-thanks span {
  display: block;
  margin-top: 3px;
  color: var(--amb-soft-ink);
  font-size: 13px;
  line-height: 1.4;
}

.amb-root .amb-lead-form label {
  margin: 0;
}

.amb-root .amb-lead-form-status {
  min-height: 18px;
  margin: 0 !important;
  color: #d63638 !important;
  font-size: 12px !important;
}

.amb-root .amb-lead-form button[disabled] {
  opacity: .65;
  cursor: progress;
}

.amb-root .amb-lead-thanks {
  border: 1px solid #b7ebc6;
  border-radius: 10px;
  padding: 12px !important;
  background: #ecfdf3;
}
