/* The help control floats without changing the approved page layout. */
.mbn-help-controls {
  position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 22; display: flex; align-items: flex-end; max-width: calc(100vw - 28px); isolation: isolate; direction: ltr;
}
.mbn-help-controls[hidden], .mbn-help-choice[hidden] { display: none !important; }
.mbn-help-controls, .mbn-help-controls * { box-sizing: border-box; }
.mbn-help-launcher {
  position: relative; z-index: 2; display: inline-flex; flex: 0 var(--mbn-help-launcher-shrink, 1) auto; align-items: center; justify-content: center; gap: 9px; min-height: 48px; min-width: 0;
  padding: 11px 17px; border: 1px solid #78c2ff; border-radius: 28px;
  background: #0b2d52; color: #f2f8ff; box-shadow: 0 5px 24px #0008;
  font: 700 15px/1.3 system-ui, sans-serif; cursor: pointer;
  overflow: hidden; opacity: 1; transition: padding .65s cubic-bezier(.22, 1, .36, 1), gap .65s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}
.mbn-help-launcher[hidden] { display: none !important; }
.mbn-help-launcher svg { flex: 0 0 auto; width: 23px; height: 23px; transition: width .65s cubic-bezier(.22, 1, .36, 1), opacity .3s ease; }
.mbn-help-launcher-label { max-width: var(--mbn-help-label-width, min(190px, 40vw)); max-height: var(--mbn-help-label-height, none); overflow-wrap: anywhere; overflow: hidden; transition: max-width .65s cubic-bezier(.22, 1, .36, 1), max-height .65s cubic-bezier(.22, 1, .36, 1), opacity .3s ease; }
/* Reveal a stable text box instead of rewrapping the words at every frame. */
.mbn-help-launcher-label-text { display: block; width: var(--mbn-help-label-width, auto); }
.mbn-help-measuring .mbn-help-launcher, .mbn-help-measuring .mbn-help-launcher * { transition: none !important; }
.mbn-help-launcher-question { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; font-size: 25px; line-height: 1; transition: opacity .3s ease; }
.mbn-help-launcher.mbn-help-compact { min-width: 48px; padding: 11px 23px; gap: 0; }
.mbn-help-compact svg { width: 0; opacity: 0; }
.mbn-help-compact .mbn-help-launcher-label { max-width: 0; max-height: 0; opacity: 0; }
.mbn-help-compact .mbn-help-launcher-question { opacity: 1; }
.mbn-help-launcher.mbn-help-compact.mbn-help-resting { opacity: .55; }
.mbn-help-launcher.mbn-help-compact.mbn-help-resting:is(:hover, :focus-visible) { opacity: 1; }
.mbn-help-choice {
  position: relative; z-index: 1; flex: 0 1 auto; min-width: 0; min-height: 48px;
  margin-left: -16px; padding: 11px 17px 11px 29px; border: 1px solid #78c2ff; border-radius: 28px;
  background: #174675; color: #f2f8ff; box-shadow: 0 5px 24px #0008;
  font: 700 15px/1.3 system-ui, sans-serif; text-transform: capitalize; overflow-wrap: anywhere; cursor: pointer;
}
.mbn-help-choices-ready .mbn-help-choice { animation: mbn-help-choice-reveal .35s ease-out both; }
@keyframes mbn-help-choice-reveal { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: translateX(0); } }
.mbn-help-controls button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .mbn-help-launcher, .mbn-help-launcher svg, .mbn-help-launcher-label, .mbn-help-launcher-question { transition: none; }
  .mbn-help-choices-ready .mbn-help-choice { animation: none; }
}
.mbn-help-accessibility-status { position: absolute; bottom: 100%; left: 0; padding: 12px; background: #fff; border: 2px solid #1463b4; border-radius: 8px; }
.mbn-help-accessibility-status a { color: #084985; text-decoration: underline; }
.mbn-help-accessibility-status button { display: block; min-height: 44px; margin-top: 8px; border: 1px solid #1463b4; border-radius: 6px; padding: 8px 12px; background: #1463b4; color: #fff; font: 700 16px/1.4 system-ui, sans-serif; cursor: pointer; }
.mbn-help-dialog {
  position: fixed; inset: auto auto calc(max(14px, env(safe-area-inset-bottom)) + var(--mbn-help-keyboard-offset, 0px)) max(14px, env(safe-area-inset-left));
  margin: 0; width: min(420px, calc(100vw - 28px)); max-width: none;
  height: min(650px, calc(var(--mbn-help-viewport-height, 100dvh) - 28px)); max-height: calc(var(--mbn-help-viewport-height, 100dvh) - 28px);
  padding: 0; border: 1px solid #6abaff; border-radius: 18px;
  background: #eaf4ff; color: #142d47; box-shadow: 0 15px 55px #000b;
  font: 16px/1.45 system-ui, sans-serif; overflow: hidden; color-scheme: light;
}
.mbn-help-dialog[open] { display: flex; flex-direction: column; }
.mbn-help-dialog::backdrop { background: #02081480; }
.mbn-help-dialog *, .mbn-help-launcher { box-sizing: border-box; }
.mbn-help-dialog [hidden] { display: none !important; }
.mbn-help-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px; border-bottom: 1px solid #2b69a3; background: linear-gradient(120deg, #12395d, #185b92); direction: ltr; }
.mbn-help-header > div { min-width: 0; }
html[dir="rtl"] .mbn-help-header > div { direction: rtl; }
.mbn-help-size-toggle { flex: 0 0 44px; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid #82b9e2; border-radius: 10px; background: #103753; color: #fff; cursor: pointer; }
.mbn-help-size-toggle svg { width: 23px; height: 23px; }
.mbn-help-size-toggle .mbn-help-restore-icon, .mbn-help-expanded .mbn-help-expand-icon { display: none; }
.mbn-help-expanded .mbn-help-restore-icon { display: block; }
.mbn-help-header h2 { margin: 0; color: #edf6ff; font: 750 19px/1.3 system-ui, sans-serif; }
.mbn-help-header p { margin: 3px 0 0; font-size: 13px; color: #b7d4ec; }
.mbn-help-dialog button, .mbn-help-dialog a { font: inherit; }
.mbn-help-close { flex: 0 0 44px; height: 44px; padding: 0; border: 1px solid #44617a; border-radius: 10px; color: #fff; background: #132d43; cursor: pointer; }
.mbn-help-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 16px 16px; background: radial-gradient(ellipse at 10% 5%, #d5eaff, transparent 70%), #eaf4ff; }
.mbn-help-message { display: flex; align-items: flex-end; gap: 12px; padding: 3px 0; margin: 0 0 15px; overflow-wrap: anywhere; }
.mbn-help-robot { display: block; flex: 0 0 auto; width: 54px; height: 66px; max-width: 25%; object-fit: contain; object-position: bottom; }
.mbn-help-welcome .mbn-help-robot { width: 84px; height: 102px; }
.mbn-help-bubble { position: relative; isolation: isolate; flex: 1; min-width: 0; padding: 15px 16px; color: #142d47; text-align: start; }
.mbn-help-bubble::before { content: ""; position: absolute; z-index: -1; inset: 0; border: 1px solid #cadff2; border-radius: 25px 23px 24px 9px; background: #fff; box-shadow: 0 4px 12px #163e6520; transform: rotate(-.7deg); }
.mbn-help-bubble::after { content: ""; position: absolute; z-index: -1; inset-inline-start: -9px; bottom: 18px; width: 17px; height: 18px; background: #fff; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.mbn-help-message[data-speaker="user"] { margin-inline-start: 48px; margin-inline-end: 8px; }
.mbn-help-message[data-speaker="user"] .mbn-help-bubble { flex: 0 1 auto; margin-inline-start: auto; color: #fff; }
.mbn-help-message[data-speaker="user"] .mbn-help-bubble::before { background: #185b92; border-color: #185b92; border-radius: 23px 25px 9px 24px; transform: rotate(.7deg); }
.mbn-help-message[data-speaker="user"] .mbn-help-bubble::after { inset-inline-start: auto; inset-inline-end: -9px; background: #185b92; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.mbn-help-message strong { display: block; font-size: 12px; letter-spacing: .02em; color: #245d88; margin-bottom: 5px; }
.mbn-help-message p { margin: 0; white-space: pre-wrap; color: inherit; font-size: 16px; line-height: 1.5; }
.mbn-help-message[data-speaker="user"] strong { color: #dfedff; }
html[dir="rtl"] .mbn-help-bubble::after { scale: -1 1; }
html[data-mbn-a11y-simple] .mbn-help-bubble::before { transform: none !important; box-shadow: none; }
html[data-mbn-a11y-simple] .mbn-help-bubble::after { display: none; }
html[data-mbn-a11y-theme] .mbn-help-bubble::before { background: var(--mbn-a11y-bg) !important; border-color: var(--mbn-a11y-border) !important; box-shadow: none; }
html[data-mbn-a11y-theme] .mbn-help-bubble::after { background: var(--mbn-a11y-bg) !important; }
@media (forced-colors: active) { .mbn-help-bubble::before { background: Canvas !important; border-color: CanvasText !important; box-shadow: none; } .mbn-help-bubble::after { display: none; } }
@media (max-width: 360px) { .mbn-help-welcome .mbn-help-robot { width: 58px; height: 72px; } .mbn-help-bubble { padding: 12px 13px; } }
.mbn-help-suggestions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.mbn-help-suggestions button { padding: 9px 11px; min-height: 44px; border: 1px solid #9dbcd7; background: #f8fcff; color: #164f80; border-radius: 16px; cursor: pointer; font-size: 14px; }
.mbn-help-contact { display: grid; gap: 9px; margin-top: 12px; padding: 14px; border: 1px solid #a8c4dd; border-radius: 16px; background: #fff; }
.mbn-help-contact h3 { margin: 0; font-size: 17px; color: #142d47; }
.mbn-help-contact p { margin: 0; font-size: 14px; color: #425e77; }
.mbn-help-contact a { color: #164f80; overflow-wrap: anywhere; }
.mbn-help-contact .mbn-help-email { display: block; padding: 11px; min-height: 44px; border: 1px solid #7bc6ff; border-radius: 10px; background: #164870; color: white; text-align: center; text-decoration: none; font-weight: 700; }
.mbn-help-composer { flex: 0 0 auto; margin: 0; padding: 12px 16px; border-top: 1px solid #b8d3e9; background: #fff; }
.mbn-help-composer label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: #142d47; }
.mbn-help-entry { display: flex; align-items: stretch; gap: 8px; }
.mbn-help-entry textarea { display: block; flex: 1; min-width: 0; width: 100%; min-height: 48px; max-height: 120px; margin: 0; padding: 10px; border: 1px solid #7097b7; border-radius: 14px; background: #f6faff; color: #142d47; font: 16px/1.4 system-ui, sans-serif; resize: vertical; }
.mbn-help-entry textarea::placeholder { color: #526c83; opacity: 1; }
.mbn-help-entry textarea { box-shadow: none !important; overflow-wrap: anywhere; }
html[data-mbn-a11y-theme] .mbn-help-entry textarea::placeholder { color: var(--mbn-a11y-fg); }
.mbn-help-send { min-width: 64px; max-width: 45%; min-height: 48px; margin: 0; padding: 8px 12px; border: 1px solid #72bdf5; border-radius: 10px; background: #155380; color: #fff; font-weight: 700 !important; overflow-wrap: anywhere; cursor: pointer; }
.mbn-help-dialog button:disabled { opacity: .55; cursor: wait; }
.mbn-help-note { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: #4b6175; }
.mbn-help-note a { color: #164f80; }
.mbn-help-status { margin: 8px 0 0; color: #8c3b08; font-size: 14px; }
.mbn-help-tools { display: flex; flex-wrap: wrap; gap: 5px 12px; padding: 9px 16px; border-top: 1px solid #b8d3e9; background: #eaf4ff; }
.mbn-help-tools button { min-height: 36px; border: 0; padding: 4px 0; background: transparent; color: #164f80; text-decoration: underline; cursor: pointer; font-size: 13px; }
.mbn-help-bottom-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex-basis: 100%; gap: 12px; }
.mbn-help-bottom-actions button { min-width: 0; min-height: 44px; height: auto; padding: 8px 12px; overflow-wrap: anywhere; }
.mbn-help-launcher:focus-visible { outline: 3px solid #c0e5ff; outline-offset: 3px; }
.mbn-help-dialog :is(button, a, textarea):focus-visible { outline: 3px solid #086bba; outline-offset: 3px; }
html.laptop-intro-active .mbn-help-controls { visibility: hidden; }
@media (max-width: 480px) {
  .mbn-help-dialog { inset: auto 0 var(--mbn-help-keyboard-offset, 0px) 0; width: 100%; height: min(720px, var(--mbn-help-viewport-height, 100dvh)); max-height: var(--mbn-help-viewport-height, 100dvh); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
@media (max-height: 500px) {
  .mbn-help-dialog { inset: auto auto calc(6px + var(--mbn-help-keyboard-offset, 0px)) max(6px, env(safe-area-inset-left)); height: calc(var(--mbn-help-viewport-height, 100dvh) - 12px); max-height: calc(var(--mbn-help-viewport-height, 100dvh) - 12px); width: min(520px, calc(100vw - 12px)); border-radius: 12px; }
  .mbn-help-header { padding: 7px 12px; }
  .mbn-help-composer { padding: 8px 12px; }
  .mbn-help-tools { padding: 4px 12px; }
  .mbn-help-note { font-size: 11px; }
}
.mbn-help-dialog.mbn-help-short[open] { display: block; overflow-y: auto; overscroll-behavior: contain; }
.mbn-help-short .mbn-help-scroll { overflow: visible; }
.mbn-help-short .mbn-help-header { position: sticky; top: 0; z-index: 1; }
html:has(.mbn-help-dialog.mbn-help-expanded[open]) { overflow: hidden; scrollbar-gutter: auto; }
.mbn-help-dialog.mbn-help-expanded {
  inset: auto 0 var(--mbn-help-keyboard-offset, 0px) 0; width: 100%; max-width: none;
  height: var(--mbn-help-viewport-height, 100dvh); max-height: var(--mbn-help-viewport-height, 100dvh);
  border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom);
}
.mbn-help-expanded .mbn-help-header { padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 16px max(20px, env(safe-area-inset-left)); }
.mbn-help-expanded .mbn-help-scroll { padding: 28px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left)); }
.mbn-help-expanded :is(.mbn-help-messages,.mbn-help-suggestions,.mbn-help-contact), .mbn-help-expanded .mbn-help-composer > *, .mbn-help-expanded .mbn-help-tools { width: 100%; max-width: 980px; margin-inline: auto; }
.mbn-help-expanded .mbn-help-message { gap: clamp(18px, 2.5vw, 32px); margin-bottom: 24px; }
.mbn-help-expanded .mbn-help-robot { width: clamp(128px, 18vw, 220px); height: clamp(152px, 22vw, 264px); max-width: 30%; }
.mbn-help-expanded .mbn-help-welcome .mbn-help-robot { width: clamp(180px, 24vw, 300px); height: clamp(210px, 28vw, 350px); max-width: 35%; }
.mbn-help-expanded .mbn-help-bubble { padding: 22px 24px; }
@media (max-width: 600px), (max-width: 650px) and (orientation: portrait) {
  .mbn-help-expanded .mbn-help-message[data-speaker="assistant"] { flex-direction: column; align-items: stretch; gap: 12px; }
  .mbn-help-expanded .mbn-help-robot { align-self: center; width: 150px; height: 170px; max-width: 65%; }
  .mbn-help-expanded .mbn-help-welcome .mbn-help-robot { width: 200px; height: 220px; max-width: 75%; }
  .mbn-help-expanded .mbn-help-message[data-speaker="assistant"] .mbn-help-bubble { flex: 0 1 auto; }
  .mbn-help-expanded .mbn-help-message[data-speaker="assistant"] .mbn-help-bubble::after { inset-inline-start: calc(50% - 10px); top: -12px; bottom: auto; width: 20px; height: 18px; clip-path: polygon(0 100%, 50% 0, 100% 100%); }
}
/* Preserve the approved portrait robot size when the conversation has room for it. */
@media (max-width: 650px) and (orientation: portrait) {
  .mbn-help-dialog:not(.mbn-help-short) .mbn-help-scroll { container-type: size; }
  .mbn-help-dialog:not(.mbn-help-short) .mbn-help-robot { max-height: max(0px, calc(100cqh - 6px)); }
}
/* Keep the robot visible in the conversation space available on laptops. */
@media (min-width: 941px) and (orientation: landscape) and (hover: hover) and (pointer: fine) {
  .mbn-help-dialog .mbn-help-message[data-speaker="assistant"] { align-items: flex-start; }
  .mbn-help-dialog .mbn-help-message[data-speaker="assistant"] .mbn-help-bubble::after { top: 38px; bottom: auto; }
  .mbn-help-dialog .mbn-help-message .mbn-help-robot { height: auto; object-position: top; }
  .mbn-help-dialog:not(.mbn-help-short) .mbn-help-scroll { container-type: size; }
  .mbn-help-dialog:not(.mbn-help-short) .mbn-help-robot {
    max-width: min(35%, max(0px, calc(100cqh - 6px)));
    max-height: max(0px, calc(100cqh - 6px));
  }
}
@media print { .mbn-help-controls, .mbn-help-dialog, .mbn-a11y-dialog { display: none !important; } }
