/* Habitat Chatbot v4.1 */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Inter:wght@400;500;600;700&display=swap");

:root {
    --hcb-primary: #5b6933;
    --hcb-primary-dark: #475326;
    --hcb-black: #171717;
    --hcb-offwhite: #f7f5f0;
    --hcb-stone-dark: #6f6a61;
    --hcb-shadow: 0 30px 80px rgba(16, 18, 13, .18), 0 10px 30px rgba(16, 18, 13, .08);
    --hcb-radius: 24px;
    --hcb-transition: all .24s cubic-bezier(.4,0,.2,1);
    --hcb-font-serif: "Cormorant Garamond", Georgia, serif;
    --hcb-font-sans: "Inter", system-ui, sans-serif;
    --hcb-panel-w: 400px;
    --hcb-panel-h: 620px;
    --hcb-bottom: 65px;
    --hcb-right: 25px;
}
#hcb-root { position: fixed !important; right: var(--hcb-right) !important; bottom: var(--hcb-bottom) !important; left: auto !important; z-index: 2147483647 !important; font-family: var(--hcb-font-sans); }
#hcb-root * { box-sizing: border-box; }
#hcb-toggle { position: relative; width: 55px; height: 55px; border: none; border-radius: 999px; display: grid; place-items: center; cursor: pointer; color: #fff; background: radial-gradient(circle at 30% 30%, #788b46 0%, var(--hcb-primary) 50%, var(--hcb-primary-dark) 100%); box-shadow: 0 18px 36px rgba(91,105,51,.34); transition: var(--hcb-transition); overflow: visible; -webkit-tap-highlight-color: transparent; }
#hcb-toggle::before,#hcb-toggle::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 1px solid rgba(91,105,51,.25); animation: hcbRing 2.8s ease-out infinite; }
#hcb-toggle::after { animation-delay: 1.2s; }
#hcb-toggle.is-open::before, #hcb-toggle.is-open::after, #hcb-root.is-open .hcb-toggle-pulse { opacity: 0; animation: none; }
#hcb-toggle:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 22px 44px rgba(91,105,51,.42); }
#hcb-toggle:active { transform: scale(.98); }
.hcb-toggle-icon { display: grid; place-items: center; position: absolute; inset: 0; }
.hcb-toggle-icon--close { opacity: 0; transform: scale(.72) rotate(-90deg); pointer-events: none; }
.hcb-toggle-icon--open { opacity: 1; transform: scale(1) rotate(0deg); }
#hcb-toggle.is-open .hcb-toggle-icon--open { opacity: 0; transform: scale(.72) rotate(90deg); }
#hcb-toggle.is-open .hcb-toggle-icon--close { opacity: 1; transform: scale(1) rotate(0deg); }
.hcb-toggle-icon--open, .hcb-toggle-icon--close { transition: opacity .2s ease, transform .24s ease; }
.hcb-toggle-pulse { position: absolute; top: 6px; right: 7px; width: 12px; height: 12px; border-radius: 50%; background: #d9f7c9; box-shadow: 0 0 0 0 rgba(217,247,201,.85); animation: hcbPulseDot 2s infinite; }
#hcb-panel { position: absolute; right: 0; bottom: calc(100% + 16px); width: min(var(--hcb-panel-w), calc(100vw - 32px)); height: min(var(--hcb-panel-h), calc(100dvh - 110px)); max-height: calc(100dvh - 110px); background: linear-gradient(180deg, #fbfaf7 0%, #f7f4ee 100%); border: 1px solid rgba(91,105,51,.12); border-radius: var(--hcb-radius); box-shadow: var(--hcb-shadow); overflow: hidden; display: flex; flex-direction: column; transform-origin: bottom right; backdrop-filter: blur(16px); }
#hcb-panel:not([hidden]) { animation: hcbPanelIn .28s cubic-bezier(.2,.8,.2,1) both; }
#hcb-header { position: relative; padding: 18px 18px 16px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--hcb-primary-dark) 0%, var(--hcb-primary) 55%, #6f7e3f 100%); color: #fff; }
#hcb-header::after { content: ""; position: absolute; inset: auto -20% -18px auto; width: 220px; height: 90px; background: radial-gradient(circle, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 68%); pointer-events: none; }
.hcb-header-left { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.hcb-avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); font-weight: 700; letter-spacing: .4px; font-size: 13px; }
.hcb-header-name { font-family: var(--hcb-font-serif); font-size: 22px; line-height: 1; }
.hcb-header-status { margin-top: 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 6px; }
.hcb-dot { width: 7px; height: 7px; border-radius: 50%; background: #d9f7c9; animation: hcbPulseDot 2s infinite; }
#hcb-close { width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,.11); color: rgba(255,255,255,.95); cursor: pointer; font-size: 24px; line-height: 1; display: grid; place-items: center; transition: var(--hcb-transition); position: relative; z-index: 1; }
#hcb-close:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }
#hcb-progress-bar-wrap { height: 4px; background: rgba(91,105,51,.08); }
#hcb-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #778847, var(--hcb-primary)); transition: width .36s ease; }
#hcb-step-label { padding: 10px 18px 2px; min-height: 26px; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--hcb-stone-dark); }
#hcb-messages { flex: 1; padding: 8px 18px 4px; overflow-y: auto; scroll-behavior: smooth; }
#hcb-messages::-webkit-scrollbar { width: 5px; }
#hcb-messages::-webkit-scrollbar-thumb { background: rgba(91,105,51,.18); border-radius: 999px; }
.hcb-msg { margin-bottom: 12px; max-width: 88%; animation: hcbBubbleIn .24s ease both; }
.hcb-msg--user { margin-left: auto; text-align: right; }
.hcb-bubble { display: inline-block; padding: 13px 16px; border-radius: 18px; font-size: 14px; line-height: 1.62; word-break: break-word; }
.hcb-msg--bot .hcb-bubble { color: var(--hcb-black); background: rgba(255,255,255,.96); border: 1px solid rgba(91,105,51,.1); border-top-left-radius: 6px; box-shadow: 0 8px 18px rgba(16,18,13,.04); }
.hcb-msg--user .hcb-bubble { background: linear-gradient(135deg, var(--hcb-primary) 0%, var(--hcb-primary-dark) 100%); color: #fff; border-top-right-radius: 6px; }
.hcb-msg--personalized .hcb-bubble { background: linear-gradient(135deg, #4d5929 0%, #69783d 100%); color: #fff; font-family: var(--hcb-font-serif); font-size: 17px; line-height: 1.5; }
#hcb-typing { padding: 2px 18px 8px; display: flex; gap: 5px; align-items: center; }
#hcb-typing span { width: 7px; height: 7px; background: rgba(91,105,51,.55); border-radius: 50%; animation: hcbTyping 1.1s ease-in-out infinite; }
#hcb-typing span:nth-child(2) { animation-delay: .15s; }
#hcb-typing span:nth-child(3) { animation-delay: .3s; }
#hcb-options { padding: 10px 14px 14px; display: grid; grid-template-columns: 1fr; gap: 10px; background: linear-gradient(180deg, rgba(91,105,51,.02), rgba(91,105,51,.05)); border-top: 1px solid rgba(91,105,51,.06); }
.hcb-option-btn { width: 100%; min-height: 58px; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(91,105,51,.12); background: rgba(255,255,255,.98); color: var(--hcb-black); font-family: var(--hcb-font-sans); font-size: 13px; font-weight: 600; line-height: 1.45; cursor: pointer; transition: var(--hcb-transition); display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:left; box-shadow: 0 10px 22px rgba(16,18,13,.04); }
.hcb-option-btn__text { flex: 1; }
.hcb-option-btn__arrow { flex: 0 0 auto; font-size: 16px; opacity: .7; transition: transform .2s ease, opacity .2s ease; }
.hcb-option-btn--soft { background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,249,241,.98)); }
.hcb-option-btn--accent { background: linear-gradient(180deg, rgba(248,250,244,.98), rgba(241,245,232,.98)); border-color: rgba(91,105,51,.18); }
.hcb-option-btn:hover,.hcb-option-btn.selected { background: linear-gradient(135deg, var(--hcb-primary) 0%, var(--hcb-primary-dark) 100%); color: #fff; border-color: var(--hcb-primary); transform: translateY(-1px); }
.hcb-option-btn:hover .hcb-option-btn__arrow,.hcb-option-btn.selected .hcb-option-btn__arrow { opacity: 1; transform: translateX(2px); }
.hcb-option-btn:disabled { opacity: .62; cursor: not-allowed; transform: none; }
#hcb-input-area,#hcb-phone-area { display: flex; align-items: center; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid rgba(91,105,51,.08); background: rgba(255,255,255,.92); }
#hcb-input,#hcb-phone-input { width: 100%; min-width: 0; height: 48px; border-radius: 999px; border: 1px solid rgba(91,105,51,.18); background: #fbfbf8; padding: 0 16px; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
#hcb-input:focus,#hcb-phone-input:focus { border-color: var(--hcb-primary); box-shadow: 0 0 0 4px rgba(91,105,51,.08); }
.hcb-phone-wrap { flex: 1; min-width: 0; }
.hcb-phone-wrap .iti { width: 100%; }
.iti__country-list { z-index: 2147483646 !important; }
#hcb-send,#hcb-phone-send { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; border: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--hcb-primary) 0%, var(--hcb-primary-dark) 100%); color: #fff; cursor: pointer; transition: var(--hcb-transition); }
#hcb-send:hover,#hcb-phone-send:hover { transform: scale(1.04); }
#hcb-send:disabled,#hcb-phone-send:disabled { opacity: .45; cursor: not-allowed; transform: none; }
#hcb-back-wrap { padding: 0 14px 10px; }
#hcb-back { border: none; background: transparent; color: var(--hcb-stone-dark); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
#hcb-back:hover { color: var(--hcb-black); }
.hcb-error-bubble { margin: 0 14px 10px; padding: 10px 12px; border-radius: 12px; background: #fff0ef; border: 1px solid rgba(192,57,43,.15); color: #9a2e22; font-size: 13px; }
.hcb-action-buttons { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; }
.hcb-action-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 16px; border-radius: 14px; text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .04em; transition: var(--hcb-transition); }
.hcb-action-btn--primary { background:#FF9900; color: #fff; }
.hcb-action-btn--outline { color: var(--hcb-primary); background: #fff; border: 1px solid rgba(91,105,51,.18); }
.hcb-action-btn--whatsapp { background: #5b6933; color: #fff; }
.hcb-action-btn:hover { transform: translateY(-1px); }
[hidden] { display: none !important; }
body.hcb-no-scroll { overflow: hidden !important; overscroll-behavior: none; touch-action: none; }

@keyframes hcbPanelIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes hcbBubbleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hcbTyping { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes hcbRing { 0% { transform: scale(.92); opacity: .75; } 70%,100% { transform: scale(1.28); opacity: 0; } }
@keyframes hcbPulseDot { 0% { box-shadow: 0 0 0 0 rgba(217,247,201,.8); } 70% { box-shadow: 0 0 0 10px rgba(217,247,201,0); } 100% { box-shadow: 0 0 0 0 rgba(217,247,201,0); } }
@media (max-width: 640px) { :root { --hcb-bottom: 0px; --hcb-right: 0px; } #hcb-toggle { width: 58px; height: 58px; right: 16px; bottom: 16px; } #hcb-panel { position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: 0 !important; width: 100% !important; height: 100svh !important; max-height: 100svh !important; border-radius: 0 !important; transform-origin: bottom center; } .hcb-option-btn { width: 100%; justify-content: space-between; } #hcb-input, #hcb-phone-input { font-size: 16px; } }
@media (min-width: 641px) and (max-width: 960px) { :root { --hcb-panel-w: 370px; --hcb-panel-h: 600px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
