/* Bottom centre, clear of the menu's corner links. */
.smart-chat { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 80; display: flex; flex-direction: column; align-items: center; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #0b0d10; }
.smart-chat [hidden] { display: none !important; }
.smart-chat button, .smart-chat textarea { font: inherit; }
.smart-chat button { cursor: pointer; }
.smart-chat button:focus-visible, .smart-chat a:focus-visible, .smart-chat textarea:focus-visible { outline: 3px solid #0aa3ff; outline-offset: 3px; }
.chat-launch { display: flex; gap: 12px; align-items: center; padding: 11px 19px 11px 11px; background: #0b0d10; color: #fff; border: 1px solid #333; border-radius: 100px; box-shadow: 0 6px 32px #0002; font-weight: 650 !important; }
.chat-launch img, .chat-head img { object-fit: contain; }
.chat-launch > span:last-child { color: #52beff; font-size: 23px; margin-left: 8px; }
.chat-greeting { display: block; margin: 0 auto 10px; max-width: 270px; border: 1px solid #dfe4e9; background: #fff; color: #0b0d10; border-radius: 16px; padding: 12px 16px; box-shadow: 0 6px 24px #0001; text-align: left; }
.chat-panel { width: 420px; height: min(660px, calc(100dvh - 48px)); display: flex; flex-direction: column; background: #fff; border: 1px solid #dce2e7; border-radius: 24px; box-shadow: 0 18px 80px #0003; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 18px 20px; background: #0b0d10; color: #fff; flex: none; }
.chat-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.chat-head p { margin: 3px 0 0; color: #b2dfff; font-size: 12px; }
.chat-sound { margin-left: auto; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #ffffff16; border: 1px solid #ffffff25; color: #52beff; display: grid; place-items: center; padding: 0; }
.chat-sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-sound svg path:first-child { fill: currentColor; }
.chat-sound .off, .chat-sound.muted .on { display: none; }
.chat-sound.muted .off { display: inline; }
.chat-sound.muted { color: #8b97a3; }
.chat-close { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #ffffff16; border: 1px solid #ffffff25; color: #fff; font-size: 24px !important; line-height: 1; }
.chat-messages { flex: 1; min-height: 100px; overflow-y: auto; padding: 20px 18px 8px; overscroll-behavior: contain; }
.chat-message { margin: 0 0 18px; }
.chat-who { display: block; margin: 0 2px 6px; font-size: 11px; font-weight: 750; letter-spacing: .9px; text-transform: uppercase; color: #4f5d6b; }
/* Easy reading: bigger type, roomy lines, a clear edge on SMART Bot's replies, prices in bold blue. */
.chat-message p { margin: 0; padding: 14px 16px; background: #f4f7fa; border: 1px solid #e1e8ee; border-left: 3px solid #0aa3ff; border-radius: 4px 16px 16px; color: #0b0d10; font-size: 15.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-line { display: block; }
.chat-gap { display: block; height: .55em; }
.chat-li { position: relative; padding-left: 18px; margin: 3px 0; }
.chat-li::before { content: ""; position: absolute; left: 3px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: #0aa3ff; }
.chat-price { color: #0668a8; font-weight: 750; white-space: nowrap; }
.chat-ai .chat-who { color: #0668a8; }
.chat-w { opacity: 0; animation: chat-word .32s ease-out forwards; }
@keyframes chat-word { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
.chat-late { opacity: 0; animation: chat-word .3s ease-out forwards; }
.chat-user { margin-left: 32px; }
.chat-user .chat-who { text-align: right; }
.chat-user p { background: #0b0d10; border-color: #0b0d10; color: #fff; border-radius: 16px 4px 16px 16px; }
/* SMART Bot is thinking: three pulsing dots. */
.chat-typing p { display: inline-flex; gap: 6px; padding: 16px 18px; }
.chat-typing i { width: 8px; height: 8px; border-radius: 50%; background: #0aa3ff; animation: chat-dot 1s ease-in-out infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .chat-w, .chat-late { animation: none; opacity: 1; } .chat-typing i { animation: none; opacity: .7; } }
.chat-actions, .chat-quick { display: flex; flex-wrap: wrap; gap: 7px; }
.chat-actions { margin-top: 9px; }
.chat-actions a, .chat-actions button, .chat-quick button { padding: 8px 13px; background: #fff; color: #075e94; border: 1px solid #c2dcea; border-radius: 100px; font-size: 13px; font-weight: 600; text-decoration: none; }
.chat-actions a:hover, .chat-actions button:hover, .chat-quick button:hover { background: #eaf6ff; }
.chat-quick { padding: 8px 18px; flex: none; border-top: 1px solid #eef1f4; }
.chat-status { min-height: 18px; margin: 0; padding: 0 20px 6px; color: #4f5d6b; font-size: 12px; }
.chat-form { display: flex; align-items: center; gap: 10px; margin: 0 16px; border: 1px solid #d7dfe6; border-radius: 15px; padding: 8px 9px 8px 13px; background: #fff; }
.chat-form textarea { resize: none; min-width: 0; width: 100%; max-height: 88px; border: 0; background: none; color: #0b0d10; padding: 3px 0; font-size: 15px; line-height: 1.45; }
.chat-form button { flex: none; border: 0; border-radius: 12px; width: 39px; height: 39px; background: #087abd; color: #fff; font-size: 23px; }
.smart-chat button:disabled { opacity: .5; cursor: wait; }
.chat-note { margin: 0; padding: 11px 20px 16px; color: #5d6a77; font-size: 11px; line-height: 1.45; }
.chat-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 520px) {
  .smart-chat { left: 12px; right: 12px; transform: none; bottom: max(12px, env(safe-area-inset-bottom)); }
  .chat-launch { margin: 0 auto; font-size: 13px !important; padding: 8px 15px 8px 8px; }
  .chat-greeting { display: none; } /* phones: the button alone, so the menu's bottom links stay clear */
  .chat-panel { width: 100%; height: min(660px, calc(100dvh - 24px - env(safe-area-inset-bottom))); border-radius: 20px; }
  .chat-form textarea { font-size: 16px; }
}
