/* CHANNMAS Connect Chat: strictly namespaced to avoid affecting the site theme. */
.chmcc{--c-bg:#fff;--c-text:#16332a;--c-muted:#697b73;--c-border:#dde9e2;--c-soft:#f1f6f3;--c-accent:#176c50;--c-dark:#0c241c;--c-mint:#b9edcf;position:fixed;bottom:24px;right:24px;z-index:999990;font-family:inherit;color:var(--c-text);font-size:14px;line-height:1.45;pointer-events:none}
html[data-theme="dark"] .chmcc{--c-bg:#13241e;--c-text:#effbf3;--c-muted:#aec9bc;--c-border:#335044;--c-soft:#1b342a;--c-accent:#61bd90;--c-dark:#0b1f18;--c-mint:#beefd4}
.chmcc *, .chmcc *::before,.chmcc *::after{box-sizing:border-box}
.chmcc button,.chmcc input{font:inherit}
.chmcc button{cursor:pointer}
.chmcc [hidden]{display:none!important}
.chmcc[data-ready="0"]{visibility:hidden}
.chmcc-fab{pointer-events:auto;display:grid;place-items:center;position:absolute;right:0;bottom:0;width:62px;height:62px;border-radius:22px;background:linear-gradient(150deg,#1c9065,#064d3c);color:white;border:1px solid rgba(255,255,255,.2);box-shadow:0 12px 34px rgba(0,33,23,.35);transition:transform .24s ease,box-shadow .24s ease}
.chmcc-fab:hover{transform:translateY(-3px);box-shadow:0 18px 42px rgba(0,33,23,.35)}
.chmcc-fab:focus-visible,.chmcc button:focus-visible,.chmcc a:focus-visible,.chmcc input:focus-visible{outline:3px solid #7de5ba;outline-offset:3px}
.chmcc-open .chmcc-fab{transform:scale(.91)}
.chmcc-fab-dot{width:11px;height:11px;border-radius:100%;background:#bbf4d4;border:2px solid #1e7957;position:absolute;top:-3px;right:-2px}
.chmcc-nudge{pointer-events:auto;position:absolute;right:76px;bottom:10px;background:var(--c-bg);color:var(--c-text);border:1px solid var(--c-border);box-shadow:0 14px 40px rgba(0,30,20,.17);padding:14px 36px 14px 16px;border-radius:16px;max-width:270px;min-width:190px;font-weight:700;cursor:pointer;animation:chmcc-rise .24s ease}
.chmcc-nudge::after{content:"";position:absolute;right:-7px;bottom:19px;width:12px;height:12px;background:var(--c-bg);transform:rotate(45deg);border-right:1px solid var(--c-border);border-top:1px solid var(--c-border)}
.chmcc-nudge-close{position:absolute;top:4px;right:6px;border:0;background:transparent;color:var(--c-muted);font-size:20px;width:30px;height:30px}
.chmcc-panel{pointer-events:auto;display:flex;flex-direction:column;position:absolute;bottom:77px;right:0;width:min(388px,calc(100vw - 28px));height:min(610px,calc(100dvh - 105px));background:var(--c-bg);color:var(--c-text);border:1px solid var(--c-border);border-radius:25px;overflow:hidden;box-shadow:0 28px 85px rgba(0,25,17,.27);animation:chmcc-rise .23s ease}
.chmcc-head{flex:0 0 auto;display:flex;align-items:center;gap:11px;padding:17px 16px;background:var(--c-bg);border-bottom:1px solid var(--c-border)}
.chmcc-mark{display:grid;place-items:center;flex-shrink:0;width:46px;height:46px;overflow:hidden;background:#e8f4ed;color:#124835;border-radius:14px;font-weight:850;font-size:17px}
html[data-theme="dark"] .chmcc-mark{background:#0d3d2e;color:#fff}
.chmcc-mark img{max-width:90%;max-height:90%;width:auto;height:auto;object-fit:contain}
html[data-theme=light] .chmcc-logo-dark,html[data-theme=dark] .chmcc-logo-light{display:none}
.chmcc-head-name{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.chmcc-head-name strong{font-size:15px;font-weight:850;letter-spacing:-.02em}
.chmcc-head-name small{font-size:10.8px;color:var(--c-muted);font-weight:600;white-space:nowrap}
.chmcc-dot{display:inline-block;width:7px;height:7px;background:#42b683;border-radius:50%;vertical-align:1px;margin-right:4px}
.chmcc-close{border:1px solid var(--c-border);border-radius:50%;width:33px;height:33px;background:var(--c-soft);color:var(--c-text);font-size:25px;line-height:26px;flex-shrink:0}
.chmcc-messages{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:60px;display:flex;flex-direction:column;gap:14px;background:var(--c-bg);padding:20px 17px 14px;scrollbar-width:thin}
.chmcc-message{max-width:89%;align-self:flex-start;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.chmcc-message.chmcc-visitor{align-self:flex-end}
.chmcc-speaker{font-size:10px;font-weight:800;display:block;color:var(--c-muted);margin:0 0 4px 7px}
.chmcc-bubble{padding:13px 14px;border-radius:16px;background:var(--c-soft);color:var(--c-text);line-height:1.55}
.chmcc-visitor .chmcc-bubble{background:linear-gradient(145deg,#0d654c,#10432f);color:white;border-bottom-right-radius:5px}
.chmcc-assistant .chmcc-bubble,.chmcc-team .chmcc-bubble{border-bottom-left-radius:5px}
.chmcc-team .chmcc-bubble{border:1px solid var(--c-border)}
.chmcc-system{align-self:center;max-width:95%;text-align:center;color:var(--c-muted);font-size:11px}
.chmcc-system .chmcc-bubble{padding:7px 12px}
.chmcc-message-links{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}
.chmcc-message-link{background:var(--c-soft);border:1px solid var(--c-border);border-radius:10px;padding:7px 10px;font-size:11px;font-weight:700;color:var(--c-text);text-decoration:none}
.chmcc-message-link:hover{text-decoration:underline}
.chmcc-actions{padding:0 17px 11px;display:grid;gap:6px;max-height:240px;overflow:auto}
.chmcc-action{border:1px solid var(--c-border);display:flex;align-items:center;width:100%;background:var(--c-bg);color:var(--c-text);border-radius:12px;padding:9px 11px;text-align:left;gap:9px;font-size:12px;font-weight:720;min-height:41px;transition:background .15s,border-color .15s}
.chmcc-action:hover{background:var(--c-soft);border-color:#80b6a1}
.chmcc-action-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:7px;background:var(--c-soft);color:var(--c-accent);font-size:17px}
.chmcc-chevron{margin-left:auto;font-size:21px;color:var(--c-accent);font-weight:400}
.chmcc-compose{display:flex;gap:7px;align-items:center;background:var(--c-bg);padding:11px 16px 5px;border-top:1px solid var(--c-border);flex-shrink:0}
.chmcc-compose input{min-width:0;flex:1;background:var(--c-soft);color:var(--c-text);border:1px solid var(--c-border);padding:12px 14px;border-radius:28px;font-size:12px;outline:0}
.chmcc-compose button{border:0;background:linear-gradient(155deg,#1e8461,#0a5a42);color:white;border-radius:50%;font-size:23px;width:43px;height:43px;flex-shrink:0}
.chmcc-foot{text-align:center;font-size:9.4px;line-height:1.3;color:var(--c-muted);padding:7px 12px 11px;background:var(--c-bg);flex-shrink:0}
.chmcc-handoff{padding:13px 16px;background:var(--c-soft);border-top:1px solid var(--c-border);overflow-y:auto;max-height:300px}
.chmcc-handoff>strong{display:block;font-size:13px;margin-bottom:3px}
.chmcc-handoff p{font-size:11px;color:var(--c-muted);margin:0 0 7px}
.chmcc-handoff label{display:block;font-weight:700;font-size:11px;margin:6px 0;color:var(--c-text)}
.chmcc-handoff input:not([type=checkbox]){display:block;width:100%;background:var(--c-bg);border:1px solid var(--c-border);color:var(--c-text);border-radius:8px;padding:10px;margin-top:3px;font-size:12px}
.chmcc-handoff label.chmcc-consent{display:flex;align-items:start;gap:7px;font-weight:500;line-height:1.4}
.chmcc-handoff label.chmcc-consent input{margin-top:3px;accent-color:#168760}
.chmcc-handoff-actions{display:flex;gap:9px;align-items:center;margin-top:9px}
.chmcc-handoff-actions button{border:1px solid var(--c-border);border-radius:10px;padding:8px 12px;background:var(--c-bg);color:var(--c-text);font-size:11px;font-weight:700}
.chmcc-handoff-actions button:first-child{background:#136b4e;color:#fff}
.chmcc-error{padding:9px 10px;color:#9d3d25;background:#fff0e8;border-radius:9px;font-size:11px}
@keyframes chmcc-rise{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:480px){.chmcc{right:14px;bottom:14px}.chmcc-panel{right:-1px;bottom:71px;height:min(590px,calc(100dvh - 100px));border-radius:20px}.chmcc-fab{width:57px;height:57px;border-radius:19px}.chmcc-nudge{right:70px;max-width:min(235px,calc(100vw - 105px))}.chmcc-head{padding:13px 14px}.chmcc-messages{padding:15px}.chmcc-actions{padding:0 14px 9px}}
@media(prefers-reduced-motion:reduce){.chmcc *,.chmcc *::before,.chmcc *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* v1.1 Smart Engagement: compact guided welcome; real conversations retain a taller transcript. */
.chmcc-welcome .chmcc-panel{height:auto;max-height:min(610px,calc(100dvh - 105px))}
.chmcc-welcome .chmcc-messages{flex:0 1 auto;max-height:195px;min-height:0;padding:15px 17px 8px;overflow:auto}
.chmcc-welcome .chmcc-actions{grid-template-columns:repeat(2,minmax(0,1fr));padding:7px 14px 10px;gap:8px;max-height:none}
.chmcc-welcome .chmcc-action{min-width:0;min-height:80px;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;border-radius:13px;padding:11px;line-height:1.25;font-size:11.5px;position:relative}
.chmcc-welcome .chmcc-action-icon{width:30px;height:30px;border-radius:9px;font-size:17px;background:var(--c-soft)}
.chmcc-welcome .chmcc-chevron{position:absolute;right:9px;top:12px;font-size:16px}
.chmcc-welcome .chmcc-action-secondary{min-height:36px;flex-direction:row;align-items:center;justify-content:flex-start;padding:8px 10px;font-size:11px}
.chmcc-welcome .chmcc-action-secondary .chmcc-action-icon{width:23px;height:23px;font-size:12px}
.chmcc-welcome .chmcc-action-secondary .chmcc-chevron{position:static;margin-left:auto}
.chmcc-handoff{max-height:min(410px,calc(100dvh - 250px))}
.chmcc-handoff select,.chmcc-handoff textarea{display:block;width:100%;background:var(--c-bg);border:1px solid var(--c-border);color:var(--c-text);border-radius:8px;padding:10px;margin-top:3px;font-size:12px;resize:vertical;font:inherit}
.chmcc-handoff textarea{min-height:68px}
.chmcc-welcome .chmcc-compose{padding-top:7px}
@media(max-width:480px){.chmcc-welcome .chmcc-panel{max-height:calc(100dvh - 90px)}.chmcc-welcome .chmcc-messages{padding:13px 14px 8px}.chmcc-welcome .chmcc-actions{padding:7px 12px 9px}.chmcc-welcome .chmcc-action{min-height:70px}}

/* v1.1.1: keep all six guided actions visible after the visitor makes a choice.
   Two rows of concise buttons remain in view with no need to restart the chat. */
.chmcc [hidden]{display:none!important}
.chmcc-engaged .chmcc-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:168px;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;padding:8px 13px 10px;flex:0 0 auto}
.chmcc-engaged .chmcc-action{display:flex;width:100%;min-width:0;min-height:35px;padding:7px 8px;gap:6px;border-radius:10px;font-size:10.5px;line-height:1.2;background:var(--c-soft);align-items:center;white-space:normal}
.chmcc-engaged .chmcc-action-icon{width:18px;height:18px;flex-shrink:0;font-size:12px;border-radius:5px}
.chmcc-engaged .chmcc-action .chmcc-chevron{display:none}
/* v1.1.2: one explicit optional marketing checkbox; submitting the form requests service follow-up. */
.chmcc-handoff p.chmcc-contact-notice{font-size:10.5px;line-height:1.5;color:var(--c-muted);margin:9px 0 7px;padding:9px 10px;border:1px solid var(--c-border);border-radius:9px;background:var(--c-bg)}
.chmcc-handoff label.chmcc-marketing-optin{display:flex;align-items:flex-start;flex-wrap:nowrap;gap:9px;margin:7px 0 11px;padding:5px 2px;color:var(--c-text)}
.chmcc-handoff label.chmcc-marketing-optin input{flex:0 0 15px;width:15px;height:15px;margin:2px 0 0;accent-color:#168760}
.chmcc-marketing-copy{display:block;flex:1;min-width:0;line-height:1.45;overflow-wrap:break-word}
.chmcc-marketing-copy strong{display:block;font-size:11px;font-weight:650}
.chmcc-marketing-copy small{display:none!important} /* Hide obsolete helper copy if older cached markup is served with current CSS. */

.chmcc .screen-reader-text{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

.chmcc-handoff-open .chmcc-panel{height:min(610px,calc(100dvh - 105px))}
.chmcc-handoff-open .chmcc-handoff{flex:1;max-height:none;min-height:0;overflow-y:auto;padding:17px}
.chmcc-handoff-open .chmcc-handoff-actions{position:sticky;bottom:-2px;background:var(--c-soft);padding:8px 0;z-index:1}
@media(max-width:480px){.chmcc-handoff-open .chmcc-panel{height:min(620px,calc(100dvh - 98px))}}
