/* Lead Journey Analytics — consent banner, form consent boxes and lead popup.
   Inherits the site's font; colours come from Settings via CSS variables. */

.lja-banner,
.lja-pop {
	--lja-accent: #0a6e5c;
	--lja-bg: #ffffff;
	--lja-fg: #1d2327;
	--lja-muted: color-mix(in srgb, var(--lja-fg) 62%, transparent);
	--lja-line: color-mix(in srgb, var(--lja-fg) 14%, transparent);
	position: fixed;
	z-index: 99990;
	box-sizing: border-box;
	background: var(--lja-bg);
	color: var(--lja-fg);
	font: inherit;
	font-size: 14px;
	line-height: 1.5;
	border: 1px solid var(--lja-line);
	border-radius: 14px;
	box-shadow: 0 18px 50px -12px rgba(16, 24, 40, .22), 0 4px 12px -4px rgba(16, 24, 40, .08);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease;
}
.lja-banner *,
.lja-pop * { box-sizing: border-box; }
.lja-banner.is-open,
.lja-pop.is-open { opacity: 1; transform: none; }

/* ---------------- consent banner ---------------- */
.lja-banner {
	left: 20px;
	bottom: 20px;
	width: min(400px, calc(100vw - 32px));
	padding: 18px 18px 16px;
}
.lja-banner-title { margin: 0 0 6px; font-weight: 600; font-size: 15px; }
.lja-banner-text { margin: 0 0 14px; color: var(--lja-muted); font-size: 13px; }
.lja-banner-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lja-banner-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.lja-btn {
	appearance: none;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	min-height: 42px;
	padding: 9px 14px;
	border-radius: 9px;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.lja-btn-solid { background: var(--lja-accent); color: #fff; border: 1px solid var(--lja-accent); }
.lja-btn-solid:hover { background: color-mix(in srgb, var(--lja-accent) 86%, #000); }
.lja-btn-solid:disabled { opacity: .6; cursor: wait; }
.lja-btn-ghost { background: transparent; color: var(--lja-fg); border: 1px solid var(--lja-line); }
.lja-btn-ghost:hover { border-color: var(--lja-fg); }
.lja-btn:focus-visible,
.lja-pop-x:focus-visible,
.lja-pop-later:focus-visible,
.lja-pop input:focus-visible,
.lja-pop textarea:focus-visible { outline: 2px solid var(--lja-accent); outline-offset: 2px; }

/* ---------------- consent boxes inside contact forms ---------------- */
.lja-consent-box { display: grid; gap: 6px; margin: 4px 0 14px; width: 100%; }
.lja-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; cursor: pointer; font-weight: 400; }
.lja-check input { margin: 2px 0 0; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--lja-accent, #0a6e5c); }

/* ---------------- lead popup ---------------- */
.lja-pop {
	bottom: 20px;
	width: min(360px, calc(100vw - 32px));
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 18px 18px 14px;
}
.lja-pop-right { right: 20px; }
.lja-pop-left { left: 20px; }
.lja-pop-x {
	position: absolute; top: 8px; right: 8px;
	width: 32px; height: 32px; border: 0; border-radius: 8px;
	background: transparent; color: var(--lja-muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.lja-pop-x:hover { color: var(--lja-fg); background: var(--lja-line); }
.lja-pop-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 26px; margin-bottom: 12px; }
.lja-pop-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.lja-pop-title { margin: 0 0 3px; font-size: 16px; font-weight: 600; }
.lja-pop-text { margin: 0; color: var(--lja-muted); font-size: 13px; }
.lja-pop-form { display: grid; gap: 9px; margin: 0; }
.lja-pop-field { display: grid; gap: 3px; }
.lja-pop-field label { font-size: 12px; font-weight: 600; color: var(--lja-fg); }
.lja-pop-field input,
.lja-pop-field textarea {
	width: 100%; font: inherit; font-size: 15px; color: var(--lja-fg);
	background: var(--lja-bg); border: 1px solid var(--lja-line); border-radius: 8px;
	padding: 9px 11px; min-height: 42px;
}
.lja-pop-field textarea { min-height: 60px; resize: vertical; }
.lja-pop-checks { display: grid; gap: 6px; margin-top: 2px; }
.lja-pop-checks .lja-check { color: var(--lja-muted); font-size: 12px; }
.lja-pop-error { margin: 0; min-height: 0; color: #b42318; font-size: 12.5px; }
.lja-pop-error:empty { display: none; }
.lja-pop-submit { width: 100%; margin-top: 2px; }
.lja-pop-later { background: none; border: 0; color: var(--lja-muted); font: inherit; font-size: 12.5px; cursor: pointer; padding: 4px; justify-self: center; text-decoration: underline; text-underline-offset: 2px; }
.lja-pop-privacy { margin: 0; font-size: 11.5px; color: var(--lja-muted); text-align: center; }
.lja-pop-privacy a { color: inherit; }
.lja-pop-done { margin: 6px 0 4px; font-size: 14px; font-weight: 600; color: var(--lja-accent); }
.lja-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
	.lja-banner { left: 12px; right: 12px; bottom: 12px; width: auto; }
	.lja-pop {
		left: 0; right: 0; bottom: 0; width: 100%;
		border-radius: 16px 16px 0 0; border-bottom: 0;
		padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
		max-height: 85vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lja-banner, .lja-pop { transition: none; transform: none; }
}

@supports not (color: color-mix(in srgb, red 50%, blue)) {
	.lja-banner, .lja-pop { --lja-muted: #646970; --lja-line: #e2e4e7; }
}
