/* LeadChat widget. Colours come from LeadChat → Settings (CSS variables set inline). */
.lcw { --lcw-primary: #1E3A8A; --lcw-on-primary: #fff; --lcw-accent: #F97316; --lcw-on-accent: #111827; --lcw-link: #1E3A8A; --lcw-ink-primary: #1E3A8A; --lcw-ink: #1B2340; --lcw-muted: #5B6275; --lcw-line: #E3E6EE; --lcw-cloud: #F4F6FA;
	position: fixed; right: 20px; bottom: 20px; z-index: 85; font-family: "Inter", "Segoe UI", Arial, sans-serif; font-size: 15px; line-height: 1.45; color: var(--lcw-ink); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.lcw *, .lcw *::before, .lcw *::after { box-sizing: border-box; }
.lcw__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lcw__bubble { position: relative; height: 64px; min-width: 64px; padding: 0 22px 0 8px; border-radius: 32px; border: 0; cursor: pointer; background: var(--lcw-primary); color: var(--lcw-on-primary); display: inline-flex; align-items: center; gap: 12px; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 12px 30px rgba(15,23,42,.38); transition: transform .2s ease, box-shadow .2s ease; font: inherit; text-align: left; }
.lcw__bubble::before { content: ""; position: absolute; inset: -6px; border-radius: 38px; border: 2px solid var(--lcw-accent); opacity: 0; animation: lcw-halo 3.2s ease-out 1.5s 3; pointer-events: none; }
@keyframes lcw-halo { 0% { opacity: .7; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.12); } }
.lcw__bubble:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15,23,42,.45); }
.lcw__ic { position: relative; width: 48px; height: 48px; border-radius: 50%; background: var(--lcw-accent); color: var(--lcw-on-accent); display: grid; place-items: center; flex: none; overflow: hidden; }
.lcw__ic svg { width: 28px; height: 28px; }
.lcw__ic svg circle { fill: var(--lcw-accent); }
.lcw__ic img { width: 100%; height: 100%; object-fit: cover; }
.lcw__dot { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: #9AA3BF; border: 2.5px solid var(--lcw-primary); }
.lcw.is-online .lcw__dot { background: #4ADE80; }
.lcw__label { display: flex; flex-direction: column; line-height: 1.2; }
.lcw__label strong { font-size: 16px; font-weight: 700; }
.lcw__label small { font-size: 12.5px; opacity: .8; }
.lcw.is-open .lcw__bubble { width: 60px; height: 60px; min-width: 0; padding: 0; justify-content: center; border-radius: 50%; }
.lcw.is-open .lcw__bubble::before { display: none; }
.lcw.is-waving .lcw__ic svg { animation: lcw-wave 1.4s ease-in-out; transform-origin: 50% 80%; }
@keyframes lcw-wave { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-14deg) scale(1.08); } 30% { transform: rotate(12deg) scale(1.08); } 45% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } 75% { transform: rotate(-2deg); } }
.lcw__bubble.has-unread { animation: lcw-pulse 2s ease-in-out 3; }
@keyframes lcw-pulse { 50% { box-shadow: 0 0 0 10px rgba(254,104,48,.25), 0 10px 28px rgba(15,23,42,.35); } }
.lcw__badge[hidden] { display: none; }
.lcw__badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--lcw-link); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.lcw__teaser { display: grid; grid-template-columns: 1fr auto; align-items: flex-start; gap: 4px; max-width: 300px; background: #fff; border: 1px solid var(--lcw-line); border-radius: 16px 16px 4px 16px; box-shadow: 0 12px 30px rgba(15,23,42,.18); padding: 4px; animation: lcw-in .35s ease; }
.lcw__teaser-text { border: 0; background: none; text-align: left; font: inherit; color: var(--lcw-ink); padding: 10px 6px 4px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.lcw__teaser-text strong { color: var(--lcw-ink-primary); }
.lcw__teaser-chips { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 4px 10px 10px; }
.lcw__chip { border: 1.5px solid var(--lcw-accent); background: #fff; color: var(--lcw-link); border-radius: 18px; padding: 7px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.lcw__chip:hover { background: color-mix(in srgb, var(--lcw-accent) 10%, #fff); }
.lcw__chips { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 16px; }
.lcw__chips p { margin: 0 0 2px; font-size: 13px; }
.lcw__choice--cal svg { background: var(--lcw-accent); color: var(--lcw-on-accent); }
.lcw__attach { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--lcw-muted); cursor: pointer; border: 1px solid var(--lcw-line); }
.lcw__attach:hover { color: var(--lcw-ink-primary); border-color: var(--lcw-ink-primary); }
.lcw__links { display: flex; justify-content: center; gap: 18px; padding: 0 12px 10px; }
.lcw__linkbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--lcw-ink-primary); cursor: pointer; padding: 0; }
.lcw__linkbtn svg, .lcw__links .lcw__walink svg { width: 16px; height: 16px; }
.lcw__links .lcw__walink { padding: 0; }
.lcw__file { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.lcw__file img { max-width: 220px; max-height: 220px; border-radius: 10px; display: block; background: #fff; }
.lcw__fileic { display: inline-grid; place-items: center; width: 44px; height: 52px; border-radius: 6px; background: #B91C1C; color: #fff; font-size: 12px; font-weight: 800; }
.lcw__filename { font-size: 13px; text-decoration: underline; word-break: break-all; }
.lcw__join { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; text-decoration: none; padding: 9px 14px; }
.lcw__join svg { width: 18px; height: 18px; }
.lcw__teaser-x { border: 0; background: none; color: var(--lcw-muted); cursor: pointer; padding: 6px; line-height: 0; }
.lcw__teaser-x svg { width: 16px; height: 16px; }
.lcw__panel { width: 370px; max-width: calc(100vw - 32px); height: min(580px, calc(100vh - 120px)); background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(15,23,42,.28); display: flex; flex-direction: column; overflow: hidden; animation: lcw-in .25s ease; }
.lcw__panel[hidden] { display: none; }
@keyframes lcw-in { from { opacity: 0; transform: translateY(10px); } }
.lcw__head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: var(--lcw-primary); color: var(--lcw-on-primary); }
.lcw__avatar { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; color: var(--lcw-ink-primary); font-weight: 800; flex: none; }
.lcw__avatar img { width: 32px; height: 32px; object-fit: contain; }
.lcw__title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lcw__title strong { font-size: 16px; }
.lcw__status { font-size: 13px; color: var(--lcw-on-primary); opacity: .82; display: inline-flex; align-items: center; gap: 6px; }
.lcw__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9AA3BF; }
.lcw__status.is-on::before { background: #4ADE80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
.lcw__x { border: 0; background: rgba(127,127,127,.18); color: var(--lcw-on-primary); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.lcw__body { flex: 1; overflow-y: auto; padding: 16px; background: var(--lcw-cloud); overscroll-behavior: contain; }
.lcw__foot { background: #fff; border-top: 1px solid var(--lcw-line); }
.lcw__foot:empty { display: none; }
.lcw__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lcw__msg { max-width: 85%; padding: 10px 13px; border-radius: 16px; background: #fff; border: 1px solid var(--lcw-line); align-self: flex-start; word-wrap: break-word; overflow-wrap: anywhere; }
.lcw__msg p { margin: 0; }
.lcw__msg p + p { margin-top: 4px; }
.lcw__msg time { display: block; margin-top: 4px; font-size: 11px; color: var(--lcw-muted); }
.lcw__msg--visitor { align-self: flex-end; background: var(--lcw-primary); border-color: var(--lcw-primary); color: var(--lcw-on-primary); border-bottom-right-radius: 4px; }
.lcw__msg--visitor time { color: var(--lcw-on-primary); opacity: .75; text-align: right; }
.lcw__msg--agent { border-bottom-left-radius: 4px; }
.lcw__msg--system { align-self: center; background: transparent; border: 0; text-align: center; font-size: 13px; color: var(--lcw-muted); max-width: 95%; padding: 4px 8px; }
.lcw__msg--err { color: #B91C1C; }
.lcw__msg.is-pending { opacity: .6; }
.lcw__who { display: block; font-size: 12px; font-weight: 700; color: var(--lcw-link); margin-bottom: 2px; }
.lcw__muted { color: var(--lcw-muted); }
.lcw__body > .lcw__msg { margin-bottom: 14px; }
.lcw__choices { display: grid; gap: 10px; }
.lcw__choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; border: 1.5px solid var(--lcw-line); background: #fff; color: var(--lcw-ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .15s, transform .15s; }
.lcw__choice:hover { border-color: var(--lcw-ink-primary); transform: translateY(-1px); color: var(--lcw-ink); }
.lcw__choice svg { flex: none; width: 36px; height: 36px; padding: 7px; border-radius: 10px; }
.lcw__choice--chat svg { background: var(--lcw-primary); color: var(--lcw-on-primary); }
.lcw__choice--chat svg circle { fill: var(--lcw-primary); }
.lcw__choice--wa svg { background: #128C4B; color: #fff; }
.lcw__choice span { display: flex; flex-direction: column; }
.lcw__choice small { color: var(--lcw-muted); font-size: 13px; }
.lcw__form { display: grid; gap: 10px; }
.lcw__form p { margin: 0; }
.lcw__form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--lcw-ink-primary); }
.lcw__form label span { font-weight: 400; color: var(--lcw-muted); }
.lcw__form input, .lcw__form textarea, .lcw__compose textarea { font: inherit; font-size: 16px; width: 100%; padding: 10px 12px; border: 1px solid #C9CEDB; border-radius: 10px; background: #fff; color: var(--lcw-ink); resize: none; }
.lcw__hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }
.lcw__fine { font-size: 12px; color: var(--lcw-muted); }
.lcw__fine a { color: var(--lcw-link); }
.lcw__err { color: #B91C1C; font-size: 14px; }
.lcw__btn { border: 0; border-radius: 12px; padding: 12px 16px; background: var(--lcw-accent); color: var(--lcw-on-accent); font: inherit; font-weight: 700; cursor: pointer; }
.lcw__btn:hover { filter: brightness(1.06); }
.lcw__btn[disabled] { opacity: .6; cursor: wait; }
.lcw__again { display: block; width: calc(100% - 24px); margin: 12px; }
.lcw__compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; }
.lcw__compose textarea { min-height: 44px; max-height: 120px; }
.lcw__send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--lcw-accent); color: var(--lcw-on-accent); display: grid; place-items: center; cursor: pointer; }
.lcw__walink { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px 10px; font-size: 13px; color: #0F6B3A; text-decoration: none; font-weight: 600; }
.lcw__walink svg { width: 16px; height: 16px; }
/* Above the theme's mobile quick-action bar. */
@media (max-width: 720px) {
	.lcw { right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); }
	.lcw__bubble { height: 58px; padding: 0 18px 0 6px; gap: 10px; }
	.lcw__ic { width: 46px; height: 46px; }
	.lcw__label small { display: none; }
	.lcw__teaser { max-width: calc(100vw - 28px); }
	body:has(.bot-mobilebar) .lcw { bottom: calc(76px + env(safe-area-inset-bottom)); }
	.lcw.is-open { left: 0; right: 0; bottom: 0 !important; top: 0; gap: 0; }
	.lcw.is-open .lcw__bubble { display: none; }
	.lcw.is-open .lcw__panel { width: 100%; max-width: none; height: 100%; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .lcw__bubble::before, .lcw.is-waving .lcw__ic svg { animation: none; } .lcw__panel, .lcw__teaser { animation: none; } .lcw__bubble.has-unread { animation: none; } .lcw__bubble:hover, .lcw__choice:hover { transform: none; } }
@media print { .lcw { display: none !important; } }
.lcw.is-open .lcw__bubble { background: #fff; color: var(--lcw-ink-primary); border: 1px solid var(--lcw-line); }

.lcw__msg--bot { border-bottom-left-radius: 4px; background: color-mix(in srgb, var(--lcw-accent) 7%, #fff); border-color: color-mix(in srgb, var(--lcw-accent) 30%, #fff); }
.lcw__msg--bot .lcw__who { color: var(--lcw-link); }
.lcw__more { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--lcw-link); text-decoration: none; }

/* Position and style options */
.lcw--left { right: auto; left: 20px; align-items: flex-start; }
.lcw--left .lcw__teaser { border-radius: 16px 16px 16px 4px; }
.lcw--round .lcw__label { display: none; }
.lcw--round .lcw__bubble { padding: 0; width: 64px; justify-content: center; border-radius: 50%; }
.lcw--round .lcw__bubble::before { border-radius: 50%; }
@media (max-width: 720px) { .lcw--left { left: 14px; right: auto; } .lcw--round .lcw__bubble { width: 58px; } }

/* Voice call */
.lcw__callbtn { margin-left: auto; }
.lcw__callbtn + .lcw__x { margin-left: 0; }
.lcw__choice--call svg { background: #16A34A; color: #fff; }
.lcw__btn--call { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #16A34A; color: #fff; }
.lcw__btn--call svg { width: 18px; height: 18px; }
.lcw__panel { position: relative; }
.lcw__call { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; background: linear-gradient(160deg, var(--lcw-primary), color-mix(in srgb, var(--lcw-primary) 70%, #000)); color: var(--lcw-on-primary); animation: lcw-in .2s ease; }
.lcw__call-av { position: relative; width: 96px; height: 96px; border-radius: 50%; background: #fff; color: var(--lcw-ink-primary); display: grid; place-items: center; font-size: 38px; font-weight: 800; margin-bottom: 10px; }
.lcw__call-av img { width: 70%; height: 70%; object-fit: contain; border-radius: 12px; }
.lcw__call-av i { position: absolute; inset: -10px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--lcw-on-primary) 45%, transparent); opacity: 0; }
.lcw__call.is-ringing .lcw__call-av i { animation: lcw-ring 1.6s ease-out infinite; }
.lcw__call.is-live .lcw__call-av i { opacity: .6; border-color: #4ADE80; }
@keyframes lcw-ring { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
.lcw__call-name { margin: 0; font-size: 20px; font-weight: 700; }
.lcw__call-st { margin: 0 0 18px; opacity: .85; min-height: 1.4em; max-width: 280px; }
.lcw__call-btns { display: flex; gap: 22px; }
.lcw__cbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.lcw__cbtn svg { box-sizing: content-box; width: 24px; height: 24px; padding: 16px; border-radius: 50%; background: rgba(255,255,255,.18); }
.lcw__cbtn.is-on svg { background: #fff; color: #111827; }
.lcw__cbtn--end svg { background: #DC2626; color: #fff; transform: rotate(135deg); }
.lcw__call.is-over .lcw__call-btns .lcw__btn { min-width: 160px; }
@media (prefers-reduced-motion: reduce) { .lcw__call.is-ringing .lcw__call-av i { animation: none; opacity: .6; } }
