#chat-widget { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 1000; font-family: inherit; }
.chat-toggle, .chat-send { border: 0; color: #fff; cursor: pointer; font: inherit; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.chat-toggle { display: inline-flex; align-items: center; gap: 9px; padding: 13px 18px; border-radius: 999px; background: #2d5a27; box-shadow: 0 8px 24px rgb(27 51 25 / 25%); }
.chat-toggle::before { content: '✦'; display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: rgb(255 255 255 / 18%); font-size: 13px; }
.chat-toggle:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgb(27 51 25 / 30%); }
.chat-toggle:focus-visible, .chat-close:focus-visible, .chat-send:focus-visible, .chat-input:focus-visible { outline: 3px solid #e4a84d; outline-offset: 2px; }
.chat-box { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: calc(84px + max(20px, env(safe-area-inset-bottom))); display: flex; flex-direction: column; width: min(390px, calc(100vw - 40px)); height: min(590px, calc(100dvh - 120px)); overflow: hidden; background: #fff; border: 1px solid #dfe7dc; border-radius: 22px; box-shadow: 0 20px 60px rgb(20 39 18 / 22%), 0 3px 12px rgb(0 0 0 / 8%); }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; background: linear-gradient(135deg, #2d5a27, #477a3d); color: #fff; }
.chat-heading { display: flex; align-items: center; gap: 11px; }
.chat-heading::before { content: '✦'; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 12px; background: rgb(255 255 255 / 16%); }
.chat-subtitle { margin: 3px 0 0; color: rgb(255 255 255 / 75%); font-size: 12px; font-weight: 400; }
.chat-close { border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 28px; line-height: 1; opacity: .85; }
.chat-close:hover { opacity: 1; }
.chat-messages { display: flex; flex: 1; flex-direction: column; gap: 11px; padding: 18px 16px; overflow-y: auto; overscroll-behavior: contain; color: #252a25; font-size: 14px; line-height: 1.5; }
.chat-message { max-width: 88%; padding: 11px 13px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message-user { align-self: flex-end; border-bottom-right-radius: 5px; background: #e4f0df; color: #20351d; }
.chat-message-assistant { align-self: flex-start; border-bottom-left-radius: 5px; background: #f3f5f2; }
.chat-form { display: flex; gap: 8px; padding: 13px 14px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid #edf0eb; background: #fff; }
.chat-input { min-width: 0; flex: 1; padding: 11px 13px; border: 1px solid #d6dfd2; border-radius: 13px; background: #fafcf9; color: #252a25; font: inherit; }
.chat-input::placeholder { color: #7b8678; }
.chat-send { padding: 0 16px; border-radius: 13px; background: #2d5a27; }
.chat-send:hover { background: #23491f; }
.chat-send:disabled { cursor: wait; opacity: .55; }
@media (max-width: 600px) { #chat-widget { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); } .chat-toggle { padding: 12px 16px; } .chat-box { right: 0; bottom: 0; width: 100vw; height: min(650px, 88dvh); max-height: calc(100dvh - 8px); border-right: 0; border-bottom: 0; border-radius: 22px 22px 0 0; } }
@media (prefers-reduced-motion: reduce) { .chat-toggle, .chat-send { transition: none; } }
