/* TPS Site Add-ons: call prompt + chat-style lead capture. Pixel units on purpose: the theme sets html font-size to 62.5%. */
#tps-addons {
	--tpsa-green: #1B3B24;
	--tpsa-green-deep: #14301F;
	--tpsa-gold: #FFD54F;
	--tpsa-ink: #14301F;
	--tpsa-muted: #5B6770;
	--tpsa-line: #E4E7E1;
	--tpsa-light: #F4F7F2;
	--tpsa-white: #FFFFFF;
	--tpsa-radius: 18px;
	--tpsa-shadow: 0 18px 50px rgba(20, 48, 31, .22), 0 2px 8px rgba(20, 48, 31, .10);
	--tpsa-bottom: 24px;
	--tpsa-side: 24px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.45;
	color: var(--tpsa-ink);
	-webkit-font-smoothing: antialiased;
}
#tps-addons *, #tps-addons *::before, #tps-addons *::after { box-sizing: border-box; }
#tps-addons button { font: inherit; cursor: pointer; }
#tps-addons img { display: block; }
@media (max-width: 767px) {
	/* keep clear of the sticky call bar on phones */
	#tps-addons { --tpsa-bottom: 84px; --tpsa-side: 16px; }
}

/* ---------- Call prompt ---------- */
.tps-pop {
	position: fixed;
	left: var(--tpsa-side);
	bottom: var(--tpsa-bottom);
	z-index: 940;
	display: flex;
	align-items: center;
	gap: 14px;
	width: min(400px, calc(100vw - 2 * var(--tpsa-side)));
	padding: 16px 44px 16px 16px;
	background: var(--tpsa-white);
	border: 1px solid var(--tpsa-line);
	border-radius: var(--tpsa-radius);
	box-shadow: var(--tpsa-shadow);
	opacity: 0;
	transform: translateY(16px) scale(.98);
	transition: opacity .25s ease, transform .25s ease;
}
.tps-pop.is-in { opacity: 1; transform: none; }
.tps-pop__close {
	position: absolute; top: 8px; right: 8px;
	width: 32px; height: 32px; display: grid; place-items: center;
	border: 0; border-radius: 50%; background: transparent; color: var(--tpsa-muted);
}
.tps-pop__close:hover, .tps-pop__close:focus-visible { background: var(--tpsa-light); color: var(--tpsa-ink); outline: none; }
.tps-pop__avatar { position: relative; flex: 0 0 auto; }
.tps-pop__img, .tps-chat__img {
	width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
	background: var(--tpsa-light); border: 2px solid var(--tpsa-white); box-shadow: 0 0 0 2px var(--tpsa-line);
}
.tps-av--letter { display: grid; place-items: center; font-weight: 700; font-size: 26px; color: var(--tpsa-green); }
.tps-pop__dot, .tps-chat__dot {
	position: absolute; right: 1px; bottom: 3px; width: 14px; height: 14px; border-radius: 50%;
	background: #2FB35A; border: 2px solid var(--tpsa-white); box-shadow: 0 0 0 0 rgba(47, 179, 90, .55);
	animation: tpsa-pulse 2s ease-out infinite;
}
@keyframes tpsa-pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 179, 90, .55); } 100% { box-shadow: 0 0 0 10px rgba(47, 179, 90, 0); } }
.tps-pop__body { min-width: 0; }
.tps-pop__title { margin: 0; font-weight: 700; font-size: 17px; line-height: 1.25; color: var(--tpsa-ink); }
.tps-pop__sub { margin: 2px 0 10px; font-size: 15px; color: var(--tpsa-muted); }
.tps-pop__btn {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 42px; padding: 0 16px; border-radius: 10px;
	background: var(--tpsa-gold); color: var(--tpsa-ink) !important; font-weight: 700; font-size: 15px; text-decoration: none !important;
	transition: transform .15s ease, box-shadow .15s ease;
}
.tps-pop__btn:hover, .tps-pop__btn:focus-visible { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20, 48, 31, .18); outline: none; }

/* ---------- Call prompt: centred window ---------- */
body.tps-pop-open { overflow: hidden; }
.tps-pop-overlay {
	position: fixed; inset: 0; z-index: 960;
	display: grid; place-items: center; padding: 16px;
	background: rgba(20, 48, 31, .58);
	-webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
	opacity: 0; transition: opacity .25s ease;
}
.tps-pop-overlay.is-in { opacity: 1; }
.tps-pop.tps-pop--center {
	position: relative; left: auto; bottom: auto;
	display: block; width: min(780px, 100%); max-height: calc(100vh - 32px); overflow: auto;
	padding: 0; background: var(--tpsa-green); color: var(--tpsa-white);
	border: 0; border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .40);
	opacity: 0; transform: translateY(14px) scale(.98);
	transition: opacity .28s ease, transform .28s ease;
}
.tps-pop-overlay.is-in .tps-pop--center { opacity: 1; transform: none; }
.tps-pop--center .tps-pop__close { top: 12px; right: 12px; z-index: 2; color: var(--tpsa-white); background: rgba(255, 255, 255, .14); }
.tps-pop--center .tps-pop__close:hover, .tps-pop--center .tps-pop__close:focus-visible { background: rgba(255, 255, 255, .28); color: var(--tpsa-white); }
.tps-pop__grid { display: grid; grid-template-columns: 1.3fr 1fr; align-items: stretch; min-height: 340px; }
.tps-pop__text { padding: 44px 40px 40px; display: flex; flex-direction: column; justify-content: center; }
.tps-pop__live {
	display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
	margin: 0 0 18px; padding: 6px 12px; border-radius: 999px;
	background: rgba(255, 255, 255, .10); color: #E6EDE8;
	font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.tps-pop__livedot { width: 9px; height: 9px; border-radius: 50%; background: #2FB35A; box-shadow: 0 0 0 0 rgba(47, 179, 90, .6); animation: tpsa-pulse 2s ease-out infinite; }
.tps-pop--center .tps-pop__title { font-family: Lexend, inherit; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.01em; color: var(--tpsa-white); margin: 0 0 10px; font-weight: 700; }
.tps-pop--center .tps-pop__sub { font-size: 21px; color: var(--tpsa-gold); margin: 0 0 26px; font-weight: 600; }
.tps-pop__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tps-pop--center .tps-pop__btn { min-height: 52px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.tps-pop__btn--ghost { background: transparent !important; color: var(--tpsa-white) !important; border: 2px solid rgba(255, 255, 255, .45); }
.tps-pop__btn--ghost:hover, .tps-pop__btn--ghost:focus-visible { border-color: var(--tpsa-white); box-shadow: none; }
.tps-pop__media { position: relative; min-height: 300px; background: var(--tpsa-light); }
.tps-pop__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* general team prompt */
.tps-pop__team { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.tps-pop__team img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 4px solid var(--tpsa-white); box-shadow: 0 10px 24px rgba(20, 48, 31, .18); margin-left: -26px; background: var(--tpsa-white); }
.tps-pop__team img:first-child { margin-left: 0; }
.tps-pop--nomedia .tps-pop__grid { grid-template-columns: 1fr; }
.tps-pop--nomedia .tps-pop__media { display: none; }
.tps-pop--team .tps-pop__grid { grid-template-columns: 1fr 1.15fr; }
.tps-pop--team .tps-pop__media { min-height: 360px; }
.tps-pop--team .tps-pop__photo { object-position: center 30%; }
/* after-hours variant */
.tps-pop__btn { border: 0; cursor: pointer; font-family: inherit; }
.tps-pop__livedot--off { background: var(--tpsa-gold); box-shadow: none; animation: none; }
.tps-pop--closed .tps-pop__live { color: var(--tpsa-gold); }
.tps-pop__note { margin: 18px 0 0; font-size: 14.5px; color: #E6EDE8; }
.tps-pop__note a { color: var(--tpsa-gold); font-weight: 700; text-decoration: none; }
.tps-pop__note a:hover { text-decoration: underline; }
.tps-pop--closed .tps-pop__title { font-size: clamp(26px, 3vw, 36px); }
@media (max-width: 767px) {
	.tps-pop-overlay { padding: 12px; align-items: end; }
	.tps-pop.tps-pop--center { max-height: calc(100vh - 24px); border-radius: 20px; }
	.tps-pop__grid { grid-template-columns: 1fr; min-height: 0; }
	.tps-pop__media { order: -1; min-height: 0; height: 190px; }
	.tps-pop__team img { width: 84px; height: 84px; margin-left: -20px; }
	.tps-pop--team .tps-pop__grid { grid-template-columns: 1fr; }
	.tps-pop--team .tps-pop__media { min-height: 0; height: 230px; }
	.tps-pop__text { padding: 24px 22px 24px; }
	.tps-pop--center .tps-pop__title { font-size: 26px; }
	.tps-pop--center .tps-pop__sub { font-size: 18px; margin-bottom: 18px; }
	.tps-pop--center .tps-pop__btn { width: 100%; justify-content: center; }
}

/* ---------- Chat bubble ---------- */
.tps-chat__bubble {
	position: fixed;
	right: var(--tpsa-side);
	bottom: var(--tpsa-bottom);
	z-index: 950;
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 56px; padding: 0 20px 0 16px;
	border: 0; border-radius: 999px;
	background: var(--tpsa-green); color: var(--tpsa-white);
	font-weight: 700; font-size: 15px; letter-spacing: .01em;
	box-shadow: 0 10px 30px rgba(20, 48, 31, .30);
	transition: transform .15s ease, background .15s ease;
}
.tps-chat__bubble:hover, .tps-chat__bubble:focus-visible { transform: translateY(-2px); background: var(--tpsa-green-deep); outline: none; }
.tps-chat__bubble:focus-visible { box-shadow: 0 0 0 3px var(--tpsa-white), 0 0 0 6px var(--tpsa-green); }
.tps-chat__bubble.is-open { padding: 0; width: 56px; justify-content: center; }
.tps-chat__bubble.is-open .tps-chat__bubble-label { display: none; }
@media (max-width: 767px) {
	.tps-chat__bubble { min-height: 52px; padding: 0 16px 0 14px; font-size: 14px; }
}

/* ---------- Chat panel ---------- */
.tps-chat {
	position: fixed;
	right: var(--tpsa-side);
	bottom: calc(var(--tpsa-bottom) + 68px);
	z-index: 950;
	display: flex; flex-direction: column;
	width: min(380px, calc(100vw - 2 * var(--tpsa-side)));
	max-height: min(600px, calc(100vh - var(--tpsa-bottom) - 90px));
	background: var(--tpsa-white);
	border: 1px solid var(--tpsa-line);
	border-radius: var(--tpsa-radius);
	box-shadow: var(--tpsa-shadow);
	overflow: hidden;
	opacity: 0; visibility: hidden; transform: translateY(12px) scale(.98);
	transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.tps-chat.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.tps-chat__head {
	display: flex; align-items: center; gap: 12px;
	padding: 14px 14px 14px 16px;
	background: var(--tpsa-green); color: var(--tpsa-white);
}
.tps-chat__avatar { position: relative; flex: 0 0 auto; }
.tps-chat__img { width: 46px; height: 46px; box-shadow: none; border-color: rgba(255, 255, 255, .5); }
.tps-chat__dot { right: -1px; bottom: 0; width: 12px; height: 12px; border-color: var(--tpsa-green); }
.tps-chat__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tps-chat__who strong { font-size: 15px; }
.tps-chat__who span { font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.tps-chat__close {
	margin-left: auto; width: 36px; height: 36px; display: grid; place-items: center;
	border: 0; border-radius: 50%; background: rgba(255, 255, 255, .10); color: var(--tpsa-white);
}
.tps-chat__close:hover, .tps-chat__close:focus-visible { background: rgba(255, 255, 255, .22); outline: none; }
.tps-chat__log {
	flex: 1 1 auto; min-height: 200px; overflow-y: auto; -webkit-overflow-scrolling: touch;
	padding: 16px 14px 6px; background: var(--tpsa-light);
	display: flex; flex-direction: column; gap: 8px;
}
.tps-chat__msg {
	max-width: 85%; padding: 10px 13px; border-radius: 16px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word;
}
.tps-chat__msg--bot { align-self: flex-start; background: var(--tpsa-white); color: var(--tpsa-ink); border: 1px solid var(--tpsa-line); border-bottom-left-radius: 6px; }
.tps-chat__msg--user { align-self: flex-end; background: var(--tpsa-green); color: var(--tpsa-white); border-bottom-right-radius: 6px; }
.tps-chat__msg.is-new { animation: tpsa-in .22s ease both; }
@keyframes tpsa-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tps-chat__typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.tps-chat__typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--tpsa-muted); opacity: .5; animation: tpsa-dots 1s infinite ease-in-out; }
.tps-chat__typing span:nth-child(2) { animation-delay: .15s; }
.tps-chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes tpsa-dots { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }
.tps-chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 14px 4px; background: var(--tpsa-light); }
.tps-chat__chip {
	padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
	border: 1px solid var(--tpsa-green); background: var(--tpsa-white); color: var(--tpsa-green);
}
.tps-chat__chip:hover, .tps-chat__chip:focus-visible { background: var(--tpsa-green); color: var(--tpsa-white); outline: none; }
.tps-chat__form {
	position: relative; display: flex; align-items: center; gap: 8px;
	padding: 10px 12px 10px 14px; background: var(--tpsa-white); border-top: 1px solid var(--tpsa-line);
}
.tps-chat__form[hidden] { display: none; }
.tps-chat__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.tps-chat__input {
	flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px;
	border: 1px solid var(--tpsa-line); border-radius: 12px; background: var(--tpsa-white);
	font: inherit; font-size: 16px; color: var(--tpsa-ink);
}
.tps-chat__input:focus { outline: none; border-color: var(--tpsa-green); box-shadow: 0 0 0 3px rgba(27, 59, 36, .15); }
.tps-chat__send {
	flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
	border: 0; border-radius: 12px; background: var(--tpsa-gold); color: var(--tpsa-ink);
}
.tps-chat__send:hover, .tps-chat__send:focus-visible { filter: brightness(.96); outline: none; }
.tps-chat__skip {
	flex: 0 0 auto; padding: 0 10px; min-height: 44px; border: 0; background: transparent;
	color: var(--tpsa-muted); font-size: 14px; font-weight: 600; text-decoration: underline;
}
.tps-chat__foot { padding: 8px 14px 10px; font-size: 13px; color: var(--tpsa-muted); background: var(--tpsa-white); text-align: center; }
.tps-chat__foot a { color: var(--tpsa-green); font-weight: 700; text-decoration: none; }
.tps-chat__foot a:hover { text-decoration: underline; }

@media (max-width: 767px) {
	.tps-chat {
		left: var(--tpsa-side);
		width: auto;
		bottom: calc(var(--tpsa-bottom) + 62px);
		max-height: calc(100vh - var(--tpsa-bottom) - 80px);
	}
	.tps-pop { padding-right: 40px; }
	.tps-pop__img { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
	#tps-addons * { animation: none !important; transition: none !important; }
}
