/* Public AI adviser. Its styles are isolated from the CRM and landing cards. */
.chat-launcher { position: fixed; right: 24px; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 25; display: flex; align-items: center; gap: 12px; padding: 0; background: none; }
.chat-launch-label { padding: 10px 16px; border: 1px solid #e0e8e2; border-radius: 12px; color: var(--ink); background: #fff; box-shadow: 0 4px 20px #08192b0d; font-size: 12px; font-weight: 500; }
.chat-launch-icon { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border: 1px solid #408883; border-radius: 20px; background: #155f65; color: #fff; box-shadow: 0 8px 24px #174d5c30; transition: background .2s, transform .2s; }
.chat-launch-icon > svg { width: 28px; height: 28px; }
.chat-launcher:hover .chat-launch-icon { background: #0d4b52; transform: translateY(-2px); }
.chat-ai-badge { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 25px; height: 19px; border: 2px solid var(--paper); border-radius: 7px; color: var(--ink); background: #c3f1d5; font-size: 8px; line-height: 1; font-weight: 700; letter-spacing: .04em; }
.website-chat { position: fixed; inset: auto 24px 96px auto; width: 420px; max-width: calc(100% - 32px); height: min(730px, calc(100dvh - 120px)); max-height: calc(100dvh - 32px); margin: 0; padding: 0; overflow: hidden; border: 1px solid #cfddd6; border-radius: 24px; color: var(--ink); background: #fbfcfa; box-shadow: 0 25px 90px #08192b38; font: 14px/1.6 var(--body); }
.website-chat[open] { display: flex; flex-direction: column; }
.website-chat::backdrop { background: #08192b1c; }
html.chat-is-open { overflow: hidden; }
.website-chat button, .website-chat textarea, .website-chat select { font: inherit; }
.website-chat button { -webkit-tap-highlight-color: transparent; }
.website-chat :focus-visible { outline-offset: 2px; }
.chat-header { display: flex; align-items: center; gap: 12px; flex: none; padding: 20px 18px 16px; background: linear-gradient(110deg, #e8f2eb, #f5f9f3); }
.chat-brand { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid #d4e3d8; border-radius: 14px; background: #fff; }
.chat-heading { min-width: 0; }
.chat-heading h2 { font-size: 17px; line-height: 1.4; letter-spacing: -.03em; }
.chat-heading p { margin-top: 3px; font-size: 10px; line-height: 1.5; }
.chat-icon-button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; margin-left: auto; border-radius: 50%; color: #45605b; background: transparent; }
.chat-icon-button:hover { background: #dceadf; }
.chat-icon-button svg { width: 20px; height: 20px; }
.chat-toolbar { display: flex; align-items: center; justify-content: space-between; flex: none; padding-inline: 20px; border-bottom: 1px solid #e4eae4; background: #f1f6ef; }
.chat-toolbar select { max-width: 105px; min-height: 40px; border: 0; background: transparent; color: #345d59; font-size: 11px; }
.chat-toolbar button { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px; background: transparent; color: #345d59; font-size: 11px; }
.chat-toolbar button > span:first-child { font-size: 18px; }
.chat-conversation { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 20px 18px; scrollbar-width: thin; scrollbar-color: #b7ccc3 transparent; }
.chat-intro-mark { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border: 1px solid #dce9df; border-radius: 14px; background: #eaf4eb; color: #286d62; font-size: 25px; }
.chat-intro h3 { max-width: 300px; margin-bottom: 12px; font-size: 25px; line-height: 1.3; letter-spacing: -.045em; }
.chat-intro > p { font-size: 13px; line-height: 1.8; }
.chat-suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }
.chat-suggestions button { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 12px; border: 1px solid #dae5dc; border-radius: 11px; background: #fff; color: #305d55; font-size: 12px; line-height: 1.45; text-align: left; }
.chat-suggestions button:hover { background: #edf5ed; border-color: #a6cbb7; }
.chat-suggestions button > span:first-child { width: 17px; flex: none; font-size: 19px; }
.chat-messages { display: flex; flex-direction: column; gap: 22px; }
.chat-message { min-width: 0; max-width: 100%; }
.chat-message-label { margin: 0 3px 6px; color: #667970; font-size: 10px; font-weight: 500; }
.chat-message-body { padding: 14px 16px; border: 1px solid #e0e7df; border-radius: 16px 16px 16px 4px; color: var(--ink); background: #fff; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message-user { align-self: flex-end; max-width: 90%; }
.chat-message-user .chat-message-label { text-align: right; }
.chat-message-user .chat-message-body { border-color: #216c68; border-radius: 16px 16px 4px 16px; color: #fff; background: #216c68; }
.chat-recommendation { margin-top: 10px; padding: 18px; border: 1px solid #c8decf; border-radius: 15px; background: #edf5ed; }
.chat-recommendation-label { margin-bottom: 8px; color: #2c6f60; font-size: 10px; letter-spacing: .05em; font-weight: 600; }
.chat-recommendation h3 { font-size: 18px; line-height: 1.4; letter-spacing: -.03em; }
.chat-recommendation-reason { margin-top: 10px; color: #35574d; font-size: 12px; line-height: 1.8; }
.chat-recommendation-price { margin-top: 14px; color: #124d43; font-size: 12px; font-weight: 600; }
.chat-recommendation-note { margin-top: 6px; font-size: 10px; line-height: 1.7; }
.chat-review-button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; margin-top: 16px; padding: 10px 12px; border-radius: 9px; color: #fff; background: #1d655b; text-align: left; font-size: 12px !important; }
.chat-thinking { display: flex; align-items: center; gap: 9px; padding-block: 20px 6px; font-size: 11px; }
.chat-thinking-dots { display: flex; gap: 3px; }
.chat-thinking-dots i { width: 4px; height: 4px; border-radius: 50%; background: #438778; animation: chat-pulse 1.2s infinite; }
.chat-thinking-dots i:nth-child(2) { animation-delay: .15s; }
.chat-thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-pulse { 50% { opacity: .25; } }
.chat-error { margin-top: 16px; padding: 12px 14px; border: 1px solid #e8d8ba; border-radius: 12px; background: #fcf8ef; }
.chat-error p { color: #74562b; font-size: 12px; line-height: 1.7; }
.chat-error button { min-height: 44px; margin-top: 4px; padding: 0; background: transparent; color: #74562b; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.chat-composer { flex: none; margin: 0; padding: 12px 16px 0; border-top: 1px solid #e3e9e1; background: #fbfcfa; }
.chat-input-wrap { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border: 1px solid #cfddd3; border-radius: 14px; background: #fff; }
.chat-input-wrap:focus-within { border-color: #468c7b; box-shadow: 0 0 0 2px #468c7b16; }
.chat-input-wrap textarea { width: 100%; min-width: 0; max-height: 90px; padding: 2px 4px; resize: none; border: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.5; outline: none; }
.chat-input-wrap textarea::placeholder { color: #72857a; font-size: 13px; }
.chat-send { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 11px; background: #1d655b; color: #fff; }
.chat-send svg { width: 20px; height: 20px; }
.chat-send:disabled { background: #e6eee7; color: #8c9e90; cursor: default; }
.chat-composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-composer-bottom > span { color: #738476; font-size: 10px; font-variant-numeric: tabular-nums; }
.chat-composer-bottom button { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0; color: #2b6e61; background: transparent; font-size: 11px; }
.website-chat button:disabled { opacity: .55; cursor: default; }
.chat-disclosure { flex: none; padding: 0 18px 14px; color: #6a7970; font-size: 9px; line-height: 1.6; }
.chat-disclosure a { text-decoration: underline; text-underline-offset: 2px; }
.chat-review { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 12px; overflow-y: auto; overscroll-behavior: contain; padding: 10px 20px 20px; }
.chat-back { display: flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 44px; padding: 0; color: #41695b; background: transparent; font-size: 11px !important; }
.chat-review-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 12px; border-radius: 50%; color: #286b55; background: #e3f1e5; }
.chat-review-heading h3 { max-width: 320px; font-size: 23px; line-height: 1.35; }
.chat-review-heading p { margin-top: 8px; font-size: 12px; }
.chat-review > label { margin-top: 3px; font-size: 11px; font-weight: 500; }
.chat-review > textarea { width: 100%; flex: 1 0 190px; min-height: 190px; padding: 12px; border: 1px solid #cadccf; border-radius: 12px; resize: vertical; font-size: 16px; line-height: 1.7; background: #fff; color: var(--ink); }
.chat-handoff-note { font-size: 11px; line-height: 1.7; }
.chat-handoff { flex: none; width: 100%; justify-content: space-between; background: #1b7058; border-color: #1b7058; border-radius: 11px; font-size: 13px; }
.chat-handoff[aria-disabled=true] { opacity: .5; }
@media (max-width: 650px) {
  .chat-launcher { right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); }
  .chat-launch-label { display: none; }
  .chat-launch-icon { width: 56px; height: 56px; border-radius: 19px; }
  .website-chat { inset: var(--chat-top, 12px) 12px auto; width: calc(100% - 24px); max-width: none; height: calc(var(--chat-viewport, 100dvh) - 24px); max-height: none; border-radius: 22px; }
  .chat-header { padding: 14px 14px 12px; gap: 10px; }
  .chat-heading h2 { font-size: 16px; }
  .chat-heading p { font-size: 9px; }
  .chat-scroll { padding: 20px 16px 16px; }
  .chat-intro h3 { font-size: 24px; }
  .chat-toolbar select, .chat-toolbar button, .chat-composer-bottom button { min-height: 44px; }
  .chat-review { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-thinking-dots i { animation: none; }
  .chat-launch-icon { transition: none; }
}
