/* Website chat assistant */
.pc {
	position: fixed; z-index: 140; right: 20px; bottom: 20px; width: min(400px, calc(100vw - 40px));
	height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column;
	background: var(--card, #fff); color: var(--fg, #0E1A15); border: 1px solid var(--line, #dfe5e2);
	border-radius: 22px; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .45); overflow: hidden;
	opacity: 0; visibility: hidden; transform: translateY(16px) scale(.98);
	transition: opacity .25s, transform .4s var(--spring, ease), visibility 0s linear .4s;
}
.pc.on { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .4s var(--spring, ease), visibility 0s; }
[dir="rtl"] .pc { right: auto; left: 20px; }
body.chat-open .launcher { visibility: hidden; }

.pc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--ink, #0E1A15); color: #fff; }
html[data-skin="emerald"] .pc-head { background: linear-gradient(180deg, #0E1A15, #07100C); }
.pc-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--green, var(--orange)); color: var(--black, #fff); }
.pc-who { flex: 1; min-width: 0; line-height: 1.25; }
.pc-who strong { display: block; font-size: 1rem; }
.pc-sub { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: #B9CCC3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-sub i { width: 8px; height: 8px; border-radius: 50%; background: #8a958f; flex: none; }
.pc-sub i.on { background: #34D399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); }
.pc-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.pc-x:hover { background: rgba(255, 255, 255, .16); }

.pc-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; background: var(--bg, #F4F7F5); }
.pc-msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }
.pc-msg p { margin: 0 0 6px; } .pc-msg p:last-child { margin-bottom: 0; }
.pc-msg ul { margin: 4px 0 6px; padding-left: 18px; } .pc-msg li { margin: 2px 0; }
.pc-bot { align-self: flex-start; background: var(--card, #fff); border: 1px solid var(--line, #dfe5e2); border-bottom-left-radius: 6px; }
.pc-me { align-self: flex-end; background: var(--green-deep, var(--navy, #01437C)); color: #fff; border-bottom-right-radius: 6px; }
.pc-msg a { font-weight: 600; }
.pc-me a { color: #fff; }
.pc-cta {
	display: inline-flex; align-items: center; margin-top: 8px; min-height: 40px; padding: 8px 14px; border-radius: 999px;
	border: 2px solid var(--green-deep, var(--orange-btn)); background: none; color: var(--green-deep, var(--orange-ink)); font: 700 .88rem var(--f, inherit); text-decoration: none; cursor: pointer;
}
.pc-typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.pc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted, #6b7a73); animation: pcDot 1.2s infinite ease-in-out; }
.pc-typing span:nth-child(2) { animation-delay: .15s; } .pc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes pcDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.pc-chips { display: flex; gap: 8px; padding: 8px 14px; overflow-x: auto; scrollbar-width: none; background: var(--bg, #F4F7F5); }
.pc-chips::-webkit-scrollbar { display: none; }
.pc-chips[hidden] { display: none; }
.pc-chips button { flex: none; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line, #dfe5e2); background: var(--card, #fff); color: var(--fg, #0E1A15); font: 600 .86rem var(--f, inherit); cursor: pointer; }
.pc-sugg { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 6px; max-width: 92%; }
.pc-sugg button { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--green-deep, var(--orange-btn)); background: var(--card, #fff); color: var(--green-deep, var(--orange-ink)); font: 600 .84rem var(--f, inherit); cursor: pointer; text-align: start; }
.pc-sugg button:hover { background: var(--steel-2); }
.pc-chips button:hover { border-color: var(--green, var(--orange)); }

.pc-in { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line, #dfe5e2); background: var(--card, #fff); }
.pc-in textarea { flex: 1; min-width: 0; resize: none; max-height: 120px; padding: 11px 14px; border-radius: 18px; border: 2px solid var(--line, #dfe5e2); background: var(--bg, #F4F7F5); color: var(--fg, #0E1A15); font: 500 16px/1.35 var(--f, inherit); }
.pc-in textarea:focus { outline: none; border-color: var(--green, var(--orange)); }
.pc-send { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--green-deep, var(--orange-btn)); color: #fff; }
.pc-send:disabled { opacity: .5; }
.pc-foot { margin: 0; padding: 4px 14px 10px; font-size: .74rem; color: var(--muted, #6b7a73); background: var(--card, #fff); }
.pc-link { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }

.pc-person { align-self: stretch; display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--card, #fff); border: 2px solid var(--green, var(--orange)); }
.pc-person-h { margin: 0 0 2px; font-weight: 700; font-size: .92rem; }
.pc-person label { display: grid; gap: 4px; font-size: .84rem; font-weight: 600; }
.pc-person label span { font-weight: 400; color: var(--muted, #6b7a73); }
.pc-person input, .pc-person select, .pc-person textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line, #dfe5e2); background: var(--bg, #F4F7F5); color: var(--fg, #0E1A15); font: 500 16px var(--f, inherit); }
.pc-person .pc-consent { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; }
.pc-person .pc-consent input { width: 20px; height: 20px; margin-top: 1px; flex: none; }
.pc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.pc-send-lead { min-height: 48px; border: 0; border-radius: 999px; background: var(--green-deep, var(--orange-btn)); color: #fff; font: 700 1rem var(--f, inherit); cursor: pointer; }
.pc-person-msg { margin: 0; font-size: .86rem; color: #b32d2e; }

html[data-theme="dark"] .pc-log, html[data-theme="dark"] .pc-chips { background: var(--bg); }

/* Page awareness */
.pc-ctx { display: block; font-size: .78rem; color: #B9CCC3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-note { align-self: center; max-width: 92%; padding: 4px 12px; border-radius: 999px; background: var(--steel-2, #e8eeeb); color: var(--muted, #4f5d57); font-size: .8rem; font-weight: 600; text-align: center; }
.pc-nudge {
	position: fixed; z-index: 139; right: 20px; bottom: 92px; display: flex; align-items: center; gap: 4px; max-width: min(320px, calc(100vw - 40px));
	padding: 6px 6px 6px 4px; border-radius: 16px; background: var(--card, #fff); color: var(--fg, #0E1A15); border: 1px solid var(--line, #dfe5e2);
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .3s;
}
.pc-nudge.on { opacity: 1; transform: none; }
[dir="rtl"] .pc-nudge { right: auto; left: 20px; }
.pc-nudge-go { flex: 1; min-height: 44px; padding: 8px 10px; border: 0; background: none; color: inherit; font: 600 .9rem var(--f, inherit); text-align: start; cursor: pointer; }
.pc-nudge-x { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--steel-2, #eef2f0); color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
body.chat-open .pc-nudge { display: none; }
@keyframes pssFlash { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); } 100% { box-shadow: 0 0 0 14px rgba(52, 211, 153, 0); } }
.pss-flash { animation: pssFlash .9s ease-out 2; }

/* Phones: a full-screen sheet */
@media (max-width: 760px) {
	.pc-nudge { left: 16px; right: 16px; max-width: none; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
	.pc { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top, 0px); }
	.pc-in { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
	body.chat-open { overflow: hidden; }
	body.chat-open .actionbar, body.chat-open .feebar, body.chat-open .fab { visibility: hidden; }
	.actionbar .ab-chat { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border-radius: 14px; border: 0; background: none; color: #fff; font: 700 .76rem var(--f, inherit); min-height: 48px; justify-content: center; cursor: pointer; }
	.actionbar .ab-chat svg { color: #34D399; }
}
/* the desktop launcher's chat entry looks like its neighbours */
.launcher-menu .l-chat { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.launcher-menu .l-chat:hover { background: var(--steel-2); }
.launcher-menu .l-chat span { display: flex; flex-direction: column; font-weight: 700; }
.launcher-menu .l-chat small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.launcher-menu .l-chat svg { color: var(--green-deep, var(--orange-ink)); }
@media (prefers-reduced-motion: reduce) { .pc, .pc.on, .pc-nudge { transition: none; } .pss-flash { animation: none; } .pc-typing span { animation: none; } }
@media print { .pc, .pc-nudge { display: none !important; } }
