/* Tentest Lead Bar — square corners, desktop single-line / mobile stacked */

.tlb-lead-bar {
	--tlb-red: #cf203b;
	--tlb-red-hover: #b01b33;
	--tlb-border: #cfcfcf;
	--tlb-text: #1f1f1e;
	--tlb-muted: #666;

	position: fixed;
	left: 50%;
	bottom: 24px; /* JS raises this above sticky CTA / cookie bars when present */
	transform: translateX(-50%) translateY(12px);
	width: calc(100% - 48px);
	max-width: 1100px;
	z-index: 99990; /* above site content, below typical cookie banners */
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: #fff;
	border: none;
	border-radius: 0;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.35;
	color: var(--tlb-text);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s, bottom 0.35s ease;
}

.tlb-lead-bar.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.tlb-lead-bar[hidden] {
	display: none !important;
}

.tlb-lead-bar__form {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	flex-wrap: wrap;
	min-width: 0;
	gap: 12px;
	margin: 0;
}

.tlb-lead-bar__text {
	flex: 0 0 auto;
	margin: 0;
	white-space: nowrap;
	font-size: 14px;
	color: var(--tlb-text);
}

.tlb-lead-bar__text strong {
	font-weight: 700;
}

.tlb-lead-bar__fields {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	gap: 10px;
}

.tlb-lead-bar__input {
	box-sizing: border-box;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--tlb-border);
	border-radius: 0;
	background: #fff;
	font: inherit;
	color: var(--tlb-text);
	outline: none;
	appearance: none;
	-webkit-appearance: none;
}

textarea.tlb-lead-bar__input--message {
	height: auto;
	min-height: 40px;
	max-height: 120px;
	padding: 10px 12px;
	line-height: 1.35;
	resize: none;
	overflow-y: auto;
	field-sizing: content;
}

.tlb-lead-bar__input:focus {
	border-color: #999;
}

.tlb-lead-bar__input--email {
	flex: 0 0 150px;
	width: 150px;
	max-width: 150px;
}

.tlb-lead-bar__input--message {
	flex: 1 1 auto;
	min-width: 120px;
	width: auto;
}

.tlb-lead-bar__submit {
	flex: 0 0 auto;
	height: 40px;
	padding: 0 18px;
	border: none;
	border-radius: 0;
	background: var(--tlb-red);
	color: #fff;
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.tlb-lead-bar__submit:hover,
.tlb-lead-bar__submit:focus-visible {
	background: var(--tlb-red-hover);
}

.tlb-lead-bar__submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

.tlb-lead-bar__close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	color: #888;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.tlb-lead-bar__close:hover,
.tlb-lead-bar__close:focus-visible {
	color: #333;
}

.tlb-lead-bar__error {
	display: none;
	flex: 0 0 100%;
	margin: 0;
	font-size: 12px;
	color: var(--tlb-red);
}

.tlb-lead-bar__error:not([hidden]) {
	display: block;
}

.tlb-lead-bar__success {
	display: none;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--tlb-text);
}

.tlb-lead-bar__success:not([hidden]) {
	display: block;
}

.tlb-lead-bar.is-success .tlb-lead-bar__text,
.tlb-lead-bar.is-success .tlb-lead-bar__fields,
.tlb-lead-bar.is-success .tlb-lead-bar__error {
	display: none;
}

/* Honeypot — visually + AT hidden */
.tlb-lead-bar__hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* WP screen-reader-text fallback if theme lacks it */
.tlb-lead-bar .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (max-width: 767px) {
	.tlb-lead-bar {
		left: 10px;
		right: 10px;
		bottom: 10px;
		transform: translateX(0) translateY(12px);
		width: auto;
		max-width: none;
		display: block;
		padding: 16px 16px 14px;
		position: fixed;
	}

	.tlb-lead-bar.is-visible {
		transform: translateX(0) translateY(0);
	}

	.tlb-lead-bar__form {
		display: block;
	}

	.tlb-lead-bar__text {
		white-space: normal;
		padding-right: 28px;
		margin-bottom: 12px;
		font-size: 14px;
		line-height: 1.4;
	}

	.tlb-lead-bar__fields {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.tlb-lead-bar__input--email,
	.tlb-lead-bar__input--message {
		flex: none;
		width: 100%;
		max-width: none;
	}

	.tlb-lead-bar__submit {
		width: 100%;
	}

	.tlb-lead-bar__close {
		position: absolute;
		top: 8px;
		right: 8px;
	}

	.tlb-lead-bar.is-success .tlb-lead-bar__success {
		padding-right: 28px;
	}
}
