/* Keep the consultant entry visible at every breakpoint; report its real status. */
.ai-fab.laksi-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 65;
  display: flex;
  width: auto;
  min-width: 210px;
  max-width: calc(100vw - 32px);
  height: auto;
  min-height: 62px;
  padding: 12px 18px;
  gap: 12px;
  color: #fff;
  background: var(--navy);
  border: 1px solid #cbd4df;
  border-radius: 18px;
  box-shadow: 0 8px 26px #071d3a26;
  letter-spacing: 0;
  text-align: left;
}
.laksi-launcher svg { flex: 0 0 26px; width: 26px; height: 26px; color: #e0e7ef; }
.ai-fab .laksi-launcher__copy { display: grid; min-width: 0; gap: 3px; }
.laksi-launcher__copy strong { font-size: 14px; font-weight: 600; line-height: 1.35; }
.laksi-launcher__copy small { color: #d4dbe4; font-size: 11px; font-weight: 400; line-height: 1.35; }
.ai-fab.laksi-launcher:hover { background: var(--blue); }
.ai-fab.laksi-launcher:focus-visible { outline: 3px solid #637f9f; outline-offset: 4px; }
.toast { bottom: 106px; }

/* The chat shrinks with the visual viewport when the mobile keyboard opens. */
#ai-dialog {
  position: fixed;
  top: var(--ai-viewport-top, 0px);
  right: 0;
  bottom: auto;
  left: auto;
  width: min(520px, 100%);
  height: var(--ai-viewport-height, 100dvh);
  max-height: none;
  min-height: 0;
  margin: 0;
  padding: 24px 24px max(18px, env(safe-area-inset-bottom));
  overflow: hidden;
  overscroll-behavior: contain;
}
#ai-dialog[open] { display: flex; flex-direction: column; }
#ai-dialog .dialog-header { flex: 0 0 auto; min-height: 44px; margin-bottom: 14px; gap: 12px; }
#ai-dialog .dialog-header > div { min-width: 0; }
#ai-dialog .dialog-header h2 { margin-bottom: 12px; font-size: clamp(24px, 5vw, 32px); line-height: 1.15; overflow-wrap: anywhere; }
#ai-dialog .ai-chat { flex: 1 1 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px 4px 8px 0; scroll-padding-block: 12px; }
#ai-dialog .ai-chat:focus-visible { outline: 2px solid #637f9f; outline-offset: -2px; }
#ai-dialog .ai-message { width: 94%; border-radius: 14px; }
#ai-dialog .ai-message p { font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
#ai-dialog .ai-message--user p { color: #fff; }
#ai-dialog .ai-product-links { display: grid; gap: 8px; margin-top: 12px; }
#ai-dialog .ai-product-link { min-height: 44px; padding: 10px 12px; border: 1px solid #afbfcd; border-radius: 10px; color: var(--navy); background: #fff; text-align: left; cursor: pointer; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#ai-dialog .ai-product-link:hover { border-color: var(--navy); background: #f7f9fc; }
#ai-dialog .ai-feedback { flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding-top: 6px; }
#ai-dialog .ai-feedback p { flex: 1 1 180px; margin: 0; font-size: 12px; line-height: 1.45; color: #455b70; overflow-wrap: anywhere; }
#ai-dialog .ai-retry { min-height: 44px; padding: 7px 10px; border: 1px solid #bac4cd; border-radius: 8px; background: #fff; color: var(--navy); cursor: pointer; font-size: 13px; }
#ai-dialog .ai-quick { flex: 0 0 auto; margin: 8px 0; }
#ai-dialog .ai-quick .button { min-height: 44px; padding: 8px 12px; font-size: 13px; }
#ai-dialog .ai-input { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 48px; border-radius: 12px; overflow: hidden; background: #fff; }
#ai-dialog .ai-input textarea { display: block; width: 100%; min-width: 0; height: 72px; min-height: 52px; max-height: 120px; padding: 11px 12px; border: 0; background: transparent; color: var(--ink); resize: none; font: inherit; font-size: 16px; line-height: 1.45; }
#ai-dialog .ai-input textarea:focus-visible { outline: 2px solid #637f9f; outline-offset: -3px; }
#ai-dialog .ai-input textarea:disabled { color: #657184; opacity: 1; background: #f3f5f7; }
#ai-dialog .ai-input button:disabled { cursor: default; opacity: .5; }
#ai-dialog .ai-input button:focus-visible { outline: 2px solid #b7cadb; outline-offset: -4px; }
#ai-dialog .ai-disclaimer { flex: 0 0 auto; margin-top: 8px; color: #657184; font-size: 11px; line-height: 1.4; }
@media (max-width: 800px) {
  .ai-fab.laksi-launcher { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); min-width: 190px; min-height: 58px; padding: 10px 14px; border-radius: 16px; }
  .toast { bottom: calc(172px + env(safe-area-inset-bottom)); }
  #ai-dialog { padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom)); }
}
#ai-dialog[data-ai-compact="true"] { overflow-y: auto; }
#ai-dialog[data-ai-compact="true"] .dialog-header { margin-bottom: 8px; }
#ai-dialog[data-ai-compact="true"] .dialog-header .eyebrow { display: none; }
#ai-dialog[data-ai-compact="true"] .dialog-header h2 { margin-bottom: 8px; font-size: 22px; }
#ai-dialog[data-ai-compact="true"] .ai-chat { min-height: 80px; }
#ai-dialog[data-ai-compact="true"] .ai-quick { display: none; }
#ai-dialog[data-ai-compact="true"] .ai-input textarea { height: 52px; }
@media print {
  .ai-fab.laksi-launcher { display: none; }
}
