/* Calcimag website helper */
.cmgh-btn { position: fixed; left: 20px; bottom: 20px; z-index: 99990; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 6px; height: 52px; border: 0; border-radius: 26px; background: linear-gradient(135deg, #1C4973, #24658F); color: #fff; font: 600 14px/1 Montserrat, Inter, Arial, sans-serif; box-shadow: 0 10px 28px rgba(15,42,68,.28); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.cmgh-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(15,42,68,.34); }
.cmgh-btn:focus-visible { outline: 3px solid #3CA9B3; outline-offset: 3px; }
.cmgh-btn__ico { width: 40px; height: 40px; border-radius: 50%; background: #3CA9B3; display: grid; place-items: center; }
.cmgh-btn__ico svg { width: 22px; height: 22px; }
.cmgh-btn.is-open { opacity: 0; pointer-events: none; transform: translateY(10px); }
.cmgh-panel { position: fixed; left: 20px; bottom: 20px; z-index: 99991; width: 370px; max-width: calc(100vw - 32px); height: auto; max-height: min(600px, calc(100vh - 40px)); max-height: min(600px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(15,42,68,.32); overflow: hidden; opacity: 0; transform: translateY(16px) scale(.98); transform-origin: bottom left; pointer-events: none; transition: opacity .22s ease, transform .22s ease; font: 400 14px/1.55 Inter, Arial, sans-serif; color: #3B4A57; }
.cmgh-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.cmgh-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; background: linear-gradient(135deg, #0F2A44, #1C4973); color: #fff; }
.cmgh-head__ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: rgba(60,169,179,.9); display: grid; place-items: center; }
.cmgh-head__ico svg { width: 20px; height: 20px; }
.cmgh-head b { display: block; font: 700 15px/1.2 Montserrat, Arial, sans-serif; }
.cmgh-head span { display: block; font-size: 12px; color: #BFE6EA; margin-top: 2px; }
.cmgh-close { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.cmgh-close:hover { background: rgba(255,255,255,.22); }
.cmgh-log { flex: 1 1 auto; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 8px; background: #F2F7F9; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.cmgh-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; animation: cmghIn .25s ease; word-wrap: break-word; }
.cmgh-msg a { color: #1C4973; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cmgh-bot { align-self: flex-start; background: #fff; border: 1px solid #D6E2E8; border-bottom-left-radius: 4px; }
.cmgh-me { align-self: flex-end; background: #1C4973; color: #fff; border-bottom-right-radius: 4px; }
.cmgh-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cmgh-links a { display: inline-block; padding: 6px 11px; border-radius: 6px; background: #1C4973; color: #fff !important; text-decoration: none !important; font-size: 13px; }
.cmgh-links a:hover { background: #3CA9B3; }
.cmgh-chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; animation: cmghIn .25s ease; }
.cmgh-chips button { border: 1px solid #3CA9B3; background: #fff; color: #1C4973; border-radius: 16px; padding: 6px 12px; font: 600 12.5px/1.2 Inter, Arial, sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.cmgh-chips button:hover, .cmgh-chips button:focus-visible { background: #3CA9B3; color: #fff; outline: none; }
.cmgh-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid #D6E2E8; border-radius: 14px; border-bottom-left-radius: 4px; }
.cmgh-typing i { width: 6px; height: 6px; border-radius: 50%; background: #3CA9B3; animation: cmghDot 1s infinite ease-in-out; }
.cmgh-typing i:nth-child(2) { animation-delay: .15s; } .cmgh-typing i:nth-child(3) { animation-delay: .3s; }
.cmgh-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #D6E2E8; background: #fff; }
.cmgh-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #D6E2E8; border-radius: 20px; font: 400 14px Inter, Arial, sans-serif; color: #3B4A57; }
.cmgh-form input:focus { outline: none; border-color: #3CA9B3; box-shadow: 0 0 0 3px rgba(60,169,179,.18); }
.cmgh-form button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #3CA9B3; color: #fff; cursor: pointer; display: grid; place-items: center; }
.cmgh-form button:hover { background: #1C4973; }
.cmgh-note { padding: 0 14px 10px; background: #fff; font-size: 11px; color: #7A8A96; text-align: center; }
@keyframes cmghIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cmghDot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@media (max-width: 767px) {
	.cmgh-btn { left: 14px; bottom: 14px; height: 48px; padding-right: 14px; font-size: 13px; }
	.cmgh-btn__ico { width: 36px; height: 36px; }
	.cmgh-panel { left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100% !important; max-width: 100% !important; max-height: 85vh; max-height: 85dvh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0); }
	.cmgh-head { padding: 14px 14px 12px; }
	.cmgh-form input { font-size: 16px; } /* stops iPhone zooming into the field */
	.cmgh-teaser { left: 14px; bottom: 74px; }
}
@media (prefers-reduced-motion: reduce) { .cmgh-panel, .cmgh-msg, .cmgh-chips, .cmgh-btn { transition: none !important; animation: none !important; } }
/* guard against theme button styles */
.cmgh-panel button { min-width: 0; min-height: 0; line-height: 1; text-transform: none; letter-spacing: normal; box-shadow: none; }
.cmgh-panel .cmgh-close { flex: 0 0 34px; width: 34px !important; height: 34px !important; padding: 0 !important; display: grid; place-items: center; }
.cmgh-panel .cmgh-form button { flex: 0 0 40px; width: 40px !important; height: 40px !important; padding: 0 !important; }
.cmgh-btn { min-height: 0; text-transform: none; letter-spacing: normal; }
/* hide the WhatsApp bubble while the helper is open (it would cover the send button) */
body.cmgh-open .ht-ctc, body.cmgh-open .ht_ctc_chat_style, body.cmgh-open #ht-ctc-chat { display: none !important; }
/* lead form */
.cmgh-lead { max-width: 100%; width: 100%; display: grid; gap: 8px; }
.cmgh-lead label { display: grid; gap: 3px; font: 600 12px/1.2 Inter, Arial, sans-serif; color: #1C4973; }
.cmgh-lead input, .cmgh-lead select, .cmgh-lead textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #D6E2E8; border-radius: 8px; font: 400 14px Inter, Arial, sans-serif; color: #3B4A57; background: #fff; }
.cmgh-lead textarea { resize: vertical; min-height: 64px; }
.cmgh-lead input:focus, .cmgh-lead select:focus, .cmgh-lead textarea:focus { outline: none; border-color: #3CA9B3; box-shadow: 0 0 0 3px rgba(60,169,179,.18); }
.cmgh-lead .cmgh-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cmgh-consent { margin: 0; font-size: 11.5px; color: #7A8A96; }
.cmgh-consent a { font-weight: 600; }
.cmgh-err { margin: 0; color: #B42318; font-size: 12.5px; min-height: 0; }
.cmgh-err:empty { display: none; }
.cmgh-panel .cmgh-send { height: 40px; border: 0; border-radius: 8px; background: #1C4973; color: #fff; font: 600 14px/1 Montserrat, Inter, Arial, sans-serif; cursor: pointer; padding: 0 14px !important; }
.cmgh-panel .cmgh-send:hover { background: #3CA9B3; }
.cmgh-panel .cmgh-send:disabled { opacity: .6; cursor: default; }
/* proactive invite bubble */
.cmgh-teaser { position: fixed; left: 20px; bottom: 84px; z-index: 99990; width: 290px; max-width: calc(100vw - 40px); padding: 14px 16px 14px; background: #fff; border-radius: 14px 14px 14px 4px; box-shadow: 0 16px 40px rgba(15,42,68,.25); font: 400 14px/1.5 Inter, Arial, sans-serif; color: #3B4A57; opacity: 0; transform: translateY(10px); transition: opacity .25s ease, transform .25s ease; }
.cmgh-teaser.is-on { opacity: 1; transform: none; }
.cmgh-teaser p { margin: 0 18px 10px 0; cursor: pointer; }
.cmgh-teaser .cmgh-teaser__go { border: 0; border-radius: 8px; background: #3CA9B3; color: #fff; font: 600 13px/1 Montserrat, Inter, Arial, sans-serif; padding: 9px 14px; cursor: pointer; min-height: 0; text-transform: none; }
.cmgh-teaser .cmgh-teaser__go:hover { background: #1C4973; }
.cmgh-teaser .cmgh-teaser__x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #7A8A96; font-size: 18px; line-height: 1; cursor: pointer; min-height: 0; }
.cmgh-teaser .cmgh-teaser__x:hover { background: #F2F7F9; color: #1C4973; }

@media (prefers-reduced-motion: reduce) { .cmgh-teaser { transition: none; } }

/* icons: always centred, whatever the theme does to svg */
.cmgh-btn__ico, .cmgh-head__ico { display: flex !important; align-items: center; justify-content: center; line-height: 0; padding: 0; }
.cmgh-btn__ico svg, .cmgh-head__ico svg { display: block; margin: 0 !important; flex: 0 0 auto; max-width: none; }
.cmgh-btn__ico svg { width: 22px !important; height: 22px !important; }
.cmgh-head__ico svg { width: 20px !important; height: 20px !important; }
.cmgh-form button svg, .cmgh-close { line-height: 0; }
.cmgh-form button svg { display: block; margin: 0; }
