/* Website assistant. Uses the site tokens from site-shell.css.
   Desktop: bottom-right, above the WhatsApp button. Mobile: above the sticky bottom bar. */
.chatbot { position: fixed; right: 20px; bottom: 92px; z-index: 1036; font: 14px/1.4 var(--font-sans, system-ui, sans-serif); }
.chatbot-launcher { display: flex; align-items: center; gap: 9px; background: var(--forest, #002E57); color: #fff; border: 3px solid #fff; border-radius: 999px; box-shadow: var(--shadow, 0 18px 40px -22px rgba(0, 46, 87, .32)); padding: 10px 18px 10px 10px; font: 600 13px/1 var(--font-sans, inherit); cursor: pointer; transition: transform .2s; }
.chatbot-launcher:hover, .chatbot-launcher:focus-visible { transform: translateY(-2px); }
.chatbot-launcher, .chatbot-launcher span { color: #fff; }
.chatbot-launcher-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--leaf, #0066BE); }
.chatbot.is-open .chatbot-launcher { display: none; }

.chatbot-panel { position: absolute; right: 0; bottom: 0; width: 370px; max-width: calc(100vw - 32px); height: min(560px, calc(100vh - 130px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line, #dde3ec); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 30, 58, .25); overflow: hidden; }
.chatbot-panel[hidden] { display: none; }

.chatbot-header { display: flex; align-items: center; gap: 11px; padding: 14px 14px 14px 16px; background: var(--forest, #002E57); }
.chatbot-header, .chatbot-header h2, .chatbot-header p { color: #fff; }
.chatbot-header h2 { margin: 0; font: 600 15px/1.2 var(--font-sans, inherit); }
.chatbot-header p { margin: 2px 0 0; font-size: 11px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.chatbot-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--leaf, #0066BE); color: #fff; font-weight: 700; }
.chatbot-online { width: 8px; height: 8px; border-radius: 50%; background: #5fe08e; box-shadow: 0 0 0 3px rgba(95, 224, 142, .25); }
.chatbot-close { margin-left: auto; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; display: grid; place-items: center; border-radius: 8px; }
.chatbot-close:hover { background: rgba(255, 255, 255, .14); }

.chatbot-log { flex: 1; overflow-y: auto; padding: 16px 14px 6px; display: flex; flex-direction: column; gap: 10px; background: var(--cream, #f5f7fa); }
.chatbot-msg { display: flex; }
.chatbot-msg-user { justify-content: flex-end; }
.chatbot-bubble { max-width: 85%; padding: 10px 13px; border-radius: 14px; line-height: 1.5; background: #fff; border: 1px solid var(--line, #dde3ec); }
.chatbot-bubble p { margin: 0; }
.chatbot-bubble p + p { margin-top: 6px; }
.chatbot-msg-bot .chatbot-bubble { border-bottom-left-radius: 4px; }
.chatbot-msg-bot .chatbot-bubble, .chatbot-msg-bot .chatbot-bubble p { color: var(--ink, #142033); }
.chatbot-msg-user .chatbot-bubble { background: var(--forest, #002E57); border-color: var(--forest, #002E57); border-bottom-right-radius: 4px; }
.chatbot-msg-user .chatbot-bubble, .chatbot-msg-user .chatbot-bubble p { color: #fff; }

.chatbot-typing .chatbot-bubble { display: flex; gap: 4px; padding: 13px 15px; }
.chatbot-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf, #0066BE); animation: chatbot-dot 1.2s infinite ease-in-out; }
.chatbot-typing span:nth-child(2) { animation-delay: .15s; }
.chatbot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatbot-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.chatbot-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.chatbot-links a { font-weight: 600; color: var(--leaf, #0066BE); text-decoration: underline; text-underline-offset: 3px; }
.chatbot-links a.chatbot-wa { background: var(--wa, #1faa55); color: #fff; text-decoration: none; padding: 6px 11px; border-radius: 999px; font-size: 12px; }
.chatbot-links a.chatbot-cb { background: var(--forest, #002E57); color: #fff; text-decoration: none; padding: 6px 11px; border-radius: 999px; font-size: 12px; }

.chatbot-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 4px; background: var(--cream, #f5f7fa); }
.chatbot-chips:empty { display: none; }
.chatbot-chip { background: #fff; border: 1px solid var(--leaf, #0066BE); color: var(--forest, #002E57); border-radius: 999px; padding: 6px 11px; font: 500 12px/1.3 var(--font-sans, inherit); cursor: pointer; text-align: left; }
.chatbot-chip:hover, .chatbot-chip:focus-visible { background: var(--leaf, #0066BE); color: #fff; }

.chatbot-contact { padding: 10px 12px; border-top: 1px solid var(--line, #dde3ec); background: #fff; max-height: 60%; overflow-y: auto; }
.chatbot-contact[hidden] { display: none; }
.chatbot-contact .single-entry-input { margin-bottom: 8px; }
.chatbot-contact .country-dropdown { position: static; width: 100%; max-width: none; margin-top: 6px; }
.chatbot-contact .country-list { max-height: 150px; }
.chatbot-contact-submit { width: 100%; justify-content: center; }
.chatbot-contact .fp-form-feedback:empty { display: none; }
.chatbot-privacy { margin: 8px 0 0; font-size: 11px; color: var(--muted, #5b6878); }
.chatbot-privacy a { color: inherit; text-decoration: underline; }

.chatbot-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line, #dde3ec); background: #fff; }
.chatbot-input[hidden] { display: none; }
.chatbot-input input { flex: 1; min-width: 0; border: 1px solid var(--line, #dde3ec); border-radius: 999px; padding: 10px 14px; font: inherit; }
.chatbot-input input:focus { outline: 2px solid var(--leaf, #0066BE); outline-offset: 1px; }
.chatbot-input button { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--forest, #002E57); color: #fff; display: grid; place-items: center; cursor: pointer; }

@keyframes chatbot-pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 102, 190, .55); } 70% { box-shadow: 0 0 0 14px rgba(0, 102, 190, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 102, 190, 0); } }
.chatbot:not(.is-open) .chatbot-launcher-icon { animation: chatbot-pulse 2.4s infinite; }
@media (prefers-reduced-motion: reduce) {
    .chatbot:not(.is-open) .chatbot-launcher-icon, .chatbot-typing span { animation: none; opacity: .8; }
}

/* The WhatsApp button is replaced by the sticky bottom bar below 992px, so sit above that bar instead. */
@media (max-width: 991.98px) {
    .chatbot { right: 12px; bottom: calc(var(--mbar-h, 62px) + 14px); }
    .chatbot-launcher { padding: 8px 15px 8px 8px; border-width: 2px; }
    .chatbot-panel { position: fixed; left: 8px; right: 8px; width: auto; max-width: none; bottom: calc(var(--mbar-h, 62px) + 10px); height: min(72vh, calc(100dvh - var(--mbar-h, 62px) - 90px)); }
}
