/* Plew's HVAC Pro — Live Chat Bot */
.phv-chat { position: fixed; right: 22px; bottom: 22px; z-index: 9990; font-family: var(--phv-font-body); }
.phv-chat-launcher {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	background: var(--phv-warm);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--phv-primary) 85%, transparent);
	position: relative;
	transition: transform .35s var(--phv-ease), background .3s;
}
.phv-chat-launcher::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--phv-primary); animation: phvRing 2.4s infinite; }
.phv-chat-launcher:hover { transform: scale(1.07); }
.phv-chat-launcher-icon { position: absolute; display: flex; transition: transform .4s var(--phv-ease), opacity .3s; }
.phv-chat-icon-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.is-open .phv-chat-icon-open { opacity: 0; transform: rotate(90deg) scale(.6); }
.is-open .phv-chat-icon-close { opacity: 1; transform: none; }
.is-open .phv-chat-launcher { background: var(--phv-secondary); }
.is-open .phv-chat-launcher::before { display: none; }
.phv-chat-badge { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--phv-accent); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.phv-chat-teaser {
	position: absolute;
	right: 76px;
	bottom: 10px;
	width: 230px;
	background: #fff;
	color: var(--phv-secondary);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.45;
	padding: 13px 16px;
	border-radius: 16px 16px 4px 16px;
	box-shadow: 0 20px 50px -14px rgba(11, 31, 58, .35);
	cursor: pointer;
	opacity: 0;
	transform: translateX(10px) scale(.95);
	pointer-events: none;
	transition: opacity .4s, transform .45s var(--phv-ease);
}
.phv-chat-teaser.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.phv-chat-panel {
	position: absolute;
	right: 0;
	bottom: 80px;
	width: 370px;
	max-width: calc(100vw - 28px);
	height: 560px;
	max-height: calc(100vh - 130px);
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 40px 100px -20px rgba(6, 18, 31, .45);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(.97);
	transform-origin: bottom right;
	transition: opacity .3s, transform .4s var(--phv-ease);
}
.phv-chat-panel[hidden] { display: none; }
.is-open .phv-chat-panel { opacity: 1; transform: none; }
.phv-chat-head { display: flex; align-items: center; gap: 12px; padding: 18px; background: var(--phv-secondary); color: #fff; position: relative; overflow: hidden; }
.phv-chat-head::after { content: ""; position: absolute; width: 200px; height: 200px; right: -60px; top: -110px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--phv-primary) 70%, transparent), transparent 70%); }
.phv-chat-head > * { position: relative; z-index: 1; }
.phv-chat-avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--phv-warm); display: flex; align-items: center; justify-content: center; flex: none; }
.phv-chat-head-text { flex: 1; min-width: 0; }
.phv-chat-head-text strong { display: block; font-family: var(--phv-font-head); font-size: 16px; }
.phv-chat-head-text span { font-size: 12.5px; color: rgba(255, 255, 255, .75); display: inline-flex; align-items: center; gap: 6px; }
.phv-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ECC71; display: inline-block; animation: phvLive 1.8s infinite; }
.phv-chat-call, .phv-chat-close { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .12); color: #fff !important; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .25s; flex: none; }
.phv-chat-call:hover, .phv-chat-close:hover { background: var(--phv-primary); }
.phv-chat-close svg { width: 18px; height: 18px; }
.phv-chat-body { flex: 1; overflow-y: auto; padding: 18px 16px 8px; background: linear-gradient(180deg, var(--phv-light), #fff); display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.phv-msg { display: flex; animation: phvMsgIn .35s var(--phv-ease); }
@keyframes phvMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.phv-msg-user { justify-content: flex-end; }
.phv-bubble { max-width: 84%; padding: 11px 15px; border-radius: 18px; font-size: 14.5px; line-height: 1.55; word-wrap: break-word; }
.phv-msg-bot .phv-bubble { background: #fff; color: var(--phv-secondary); border: 1px solid rgba(11, 31, 58, .08); border-bottom-left-radius: 6px; box-shadow: 0 6px 18px -10px rgba(11, 31, 58, .25); }
.phv-msg-user .phv-bubble { background: var(--phv-primary); color: #fff; border-bottom-right-radius: 6px; }
.phv-bubble a { color: var(--phv-primary); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.phv-chat-tel { white-space: nowrap; }
.phv-typing .phv-bubble { display: inline-flex; gap: 4px; padding: 14px 16px; }
.phv-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--phv-text); opacity: .4; animation: phvDots 1.2s infinite; }
.phv-typing i:nth-child(2) { animation-delay: .15s; }
.phv-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes phvDots { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
.phv-chat-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 6px 14px 10px; max-height: 150px; overflow-y: auto; }
.phv-chat-quick:empty { display: none; }
.phv-chip { border: 1.5px solid color-mix(in srgb, var(--phv-primary) 40%, transparent); background: #fff; color: var(--phv-primary); font: inherit; font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.phv-chip:hover { background: var(--phv-primary); color: #fff; transform: translateY(-1px); }
.phv-chat-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(11, 31, 58, .08); background: #fff; }
.phv-chat-input input { flex: 1; min-width: 0; border: 2px solid var(--phv-light); background: var(--phv-light); border-radius: 999px; padding: 11px 16px; font: inherit; font-size: 14.5px; color: var(--phv-secondary); outline: none; transition: border-color .2s, background .2s; }
.phv-chat-input input:focus { border-color: var(--phv-primary); background: #fff; }
.phv-chat-input button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--phv-primary); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; transition: transform .25s; }
.phv-chat-input button:hover { transform: scale(1.08) rotate(-8deg); }
.phv-chat-foot { text-align: center; font-size: 11px; color: var(--phv-text); opacity: .7; padding: 0 0 10px; background: #fff; }

@media (max-width: 767px) {
	.phv-chat { right: 14px; bottom: 14px; }
	.phv-chat-launcher { width: 56px; height: 56px; }
	.phv-chat-panel { position: fixed; right: 10px; left: 10px; width: auto; max-width: none; bottom: 80px; height: auto; top: 80px; max-height: none; }
	.phv-chat-teaser { width: 190px; right: 66px; }
}
