/* ==========================================================================
   The chat bubble in the corner of the landing pages (#mucinlyChat in index.html, chat-bubble.js): the same bubble
   as in the client portal, in this site's glass look. Loaded after premium.css, whose colours it reuses.
   To take the chat away: remove the #mucinlyChat block, chat-bubble.js and this file's <link>.
   ========================================================================== */
.mchat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 92; /* above the floating link bar (90), below the phone menu (95) and the top bar (100) */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--f-body, 'Inter', system-ui, sans-serif);
  pointer-events: none; /* only the pieces themselves take clicks, not the column they sit in */
  transition: bottom 0.3s var(--ease-out, ease);
}
.mchat > * { pointer-events: auto; }
.mchat[hidden], .mchat [hidden] { display: none !important; }
body.menu-open .mchat { display: none; }
.mchat button { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mchat button:focus-visible, .mchat textarea:focus-visible, .mchat input:focus-visible { outline: 2px solid #8fa8ff; outline-offset: 3px; }

/* ---------- the button ---------- */
.mchat .mchat__button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0.05)), rgb(13 16 24 / 0.86);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.34), inset 0 0 0 1px rgb(255 255 255 / 0.12), 0 18px 44px -14px rgb(0 0 0 / 0.75);
  color: #fff;
  text-align: left;
  /* the orbiting border light of the site's main buttons (brand.css: --mucinly-glow-angle, mucinly-border-orbit) */
  overflow: visible;
  isolation: isolate;
  animation: mucinly-border-orbit 4s linear infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mchat .mchat__button::before,
.mchat .mchat__button::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 2px;
  border: 0;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(from var(--mucinly-glow-angle), transparent 0% 58%, #295bff 73%, #c4d5ff 80%, #4e7dfd 86%, transparent 96%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 1;
  transition: opacity 0.3s, filter 0.3s;
}
.mchat .mchat__button::after { z-index: 2; }
.mchat .mchat__button::before { inset: -5px; padding: 6px; filter: blur(9px); opacity: 0.55; z-index: -1; }
.mchat .mchat__button:focus-visible { animation-play-state: paused; }
.mchat .mchat__button:focus-visible::before { opacity: 0.9; filter: blur(12px); }
@media (hover: hover) {
  .mchat .mchat__button:hover { transform: translateY(-2px); animation-play-state: paused; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.34), inset 0 0 0 1px rgb(255 255 255 / 0.12), 0 18px 44px -14px rgb(0 0 0 / 0.75), 0 0 24px rgb(41 91 255 / 0.22); }
  .mchat .mchat__button:hover::before { opacity: 0.9; filter: blur(12px); }
}

.mchat .mchat__avatar { position: relative; flex: none; display: block; width: 44px; height: 44px; }
.mchat .mchat__avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.mchat .mchat__avatar i { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: #6b7280; box-shadow: 0 0 0 3px #0d1018; }
.mchat.is-online .mchat__avatar i { background: #34d399; }
.mchat.is-online .mchat__button .mchat__avatar i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #34d399; animation: mchat-pulse 2.2s ease-out infinite; }
.mchat .mchat__label { display: block; }
.mchat .mchat__label strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; color: #fff; }
.mchat .mchat__label small { display: block; font-size: 12px; line-height: 1.3; color: var(--text-lead, #a9adb8); }
.mchat.is-online .mchat__label small { color: #a7f3d0; }
.mchat .mchat__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 3; /* above the orbiting light */
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #295bff;
  box-shadow: 0 0 0 3px #050608;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

/* ---------- the greeting or a new answer, next to the button ---------- */
.mchat .mchat__teaser {
  position: relative;
  max-width: min(300px, calc(100vw - 44px));
  border-radius: 20px 20px 6px 20px;
  background: linear-gradient(160deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0.04) 45%, rgb(255 255 255 / 0.07)), rgb(13 16 24 / 0.9);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.24), inset 0 0 0 1px rgb(255 255 255 / 0.1), 0 24px 60px -24px rgb(0 0 0 / 0.8);
  animation: mchat-in 0.35s ease both;
}
.mchat .mchat__teaser-body { display: block; width: 100%; padding: 14px 44px 15px 17px; text-align: left; font-size: 14px; line-height: 1.5; color: var(--text-bright, #f4f5f8); overflow-wrap: anywhere; }
.mchat .mchat__teaser-body small { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 500; color: var(--label-accent, #8fa8ff); }
.mchat .mchat__teaser-close, .mchat .mchat__close { display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / 0.08); color: var(--text-soft, #d6d9e1); font-size: 18px; line-height: 1; }
.mchat .mchat__teaser-close { position: absolute; top: 9px; right: 9px; width: 26px; height: 26px; }
.mchat .mchat__close { flex: none; width: 34px; height: 34px; margin-left: auto; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); }
.mchat .mchat__teaser-close:hover, .mchat .mchat__close:hover { background: rgb(255 255 255 / 0.16); color: #fff; }

/* ---------- the open chat ---------- */
.mchat .mchat__panel {
  display: flex;
  flex-direction: column;
  width: min(384px, calc(100vw - 44px));
  height: min(560px, calc(100vh - 130px));
  height: min(560px, calc(100dvh - 130px));
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(160deg, rgb(255 255 255 / 0.13), rgb(255 255 255 / 0.035) 45%, rgb(255 255 255 / 0.06)), rgb(11 13 19 / 0.93);
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  backdrop-filter: blur(30px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), inset 0 0 0 1px rgb(255 255 255 / 0.09), 0 40px 100px -30px rgb(0 0 0 / 0.9);
  color: var(--text-on-page, #eef0f5);
  animation: mchat-in 0.25s ease both;
}
.mchat .mchat__head { flex: none; display: flex; align-items: center; gap: 12px; padding: 16px 15px 16px 18px; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.mchat .mchat__head .mchat__avatar { width: 40px; height: 40px; }
.mchat .mchat__head strong { display: block; font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; color: #fff; }
.mchat .mchat__head small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--text-sub, #7f8493); }
.mchat.is-online .mchat__head small { color: #a7f3d0; }

.mchat .mchat__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 18px 16px; }
.mchat .mchat__msg { max-width: 86%; display: flex; flex-direction: column; gap: 3px; }
.mchat .mchat__msg p { margin: 0; padding: 10px 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.mchat .mchat__msg time { font-size: 11px; color: var(--text-faint, #6b7080); }
.mchat .mchat__msg--z { align-self: flex-start; }
.mchat .mchat__msg--z p { border-radius: 18px 18px 18px 6px; background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07); color: var(--text-bright, #f4f5f8); }
.mchat .mchat__msg--me { align-self: flex-end; align-items: flex-end; }
.mchat .mchat__msg--me p { border-radius: 18px 18px 6px 18px; background: #295bff; color: #fff; }
.mchat .mchat__msg.is-pending p { opacity: 0.6; }

.mchat .mchat__email { flex: none; margin: 0 14px 10px; padding: 12px 14px 13px; border-radius: 18px; background: rgb(255 255 255 / 0.05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.mchat .mchat__email label { display: block; margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--text-soft, #d6d9e1); }
.mchat .mchat__email div { display: flex; gap: 8px; }
.mchat .mchat__email input { flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: rgb(0 0 0 / 0.35); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); color: #fff; font: inherit; font-size: 16px; }
.mchat .mchat__email input::placeholder, .mchat .mchat__form textarea::placeholder { color: var(--text-faint, #6b7080); }
.mchat .mchat__email button { flex: none; height: 40px; padding: 0 16px; border-radius: 12px; background: #295bff; color: #fff; font-size: 14px; font-weight: 500; }
.mchat .mchat__email button:hover { background: #3a6bff; }
.mchat .mchat__email small { display: block; margin-top: 8px; font-size: 11.5px; line-height: 1.45; color: var(--text-sub, #7f8493); }
.mchat .mchat__email small a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.mchat .mchat__note { flex: none; margin: 0 16px 10px; font-size: 13px; line-height: 1.45; color: var(--text-soft, #d6d9e1); }

.mchat .mchat__form { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid rgb(255 255 255 / 0.08); }
.mchat .mchat__form textarea { flex: 1 1 auto; min-width: 0; height: 44px; max-height: 120px; padding: 11px 14px; border: 0; border-radius: 16px; resize: none; background: rgb(0 0 0 / 0.35); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); color: #fff; font: inherit; font-size: 16px; line-height: 1.4; }
.mchat .mchat__form button { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #295bff; color: #fff; font-size: 20px; line-height: 1; transition: background 0.2s, opacity 0.2s; }
.mchat .mchat__form button:hover { background: #3a6bff; }
.mchat .mchat__form button:disabled { opacity: 0.45; cursor: default; }

@keyframes mchat-pulse { from { transform: scale(1); opacity: 0.55; } to { transform: scale(2.7); opacity: 0; } }
@keyframes mchat-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Narrower windows: the floating link bar reaches under the bubble, so the bubble moves up while that bar shows. */
@media (max-width: 1100px) {
  .sticky-intake.is-visible ~ .mchat:not(.is-open) { bottom: 92px; }
}
@media (max-width: 700px) {
  .mchat { right: 14px; bottom: 14px; gap: 10px; }
  .mchat .mchat__button { padding: 6px; }
  .mchat .mchat__label { display: none; }
  .mchat .mchat__button .mchat__avatar { width: 50px; height: 50px; }
  .sticky-intake.is-visible ~ .mchat:not(.is-open) { bottom: 78px; }
  /* open: one sheet over the page, above the top bar, lifted over the on-screen keyboard (chat-bubble.js sets both values) */
  .mchat.is-open { z-index: 120; bottom: calc(14px + var(--mchat-keyboard, 0px)); }
  .mchat.is-open .mchat__button { display: none; }
  body:has(.mchat.is-open) .sticky-intake { visibility: hidden; }
  .mchat .mchat__panel { width: calc(100vw - 28px); height: min(620px, calc(100vh - 28px)); height: min(620px, calc(var(--mchat-vh, 100dvh) - 28px)); border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .mchat { transition: none; }
  .mchat.is-online .mchat__button .mchat__avatar i::after, .mchat .mchat__teaser, .mchat .mchat__panel { animation: none; }
  .mchat .mchat__button { transition: none; animation: none; }
  .mchat .mchat__button::before { display: none; } /* as on the site's buttons: no halo, the ring stays still */
}

/* ---------- the founder's photo in the founder section (was a "ZM" monogram) ---------- */
.founder__photo { flex-shrink: 0; display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.16), 0 10px 30px -12px rgb(0 0 0 / 0.8); }
