/* TR Lead Capture. Inherits the theme's fonts; colours via --trlc-accent. */
:root { --trlc-accent: #1f3a5f; --trlc-ink: #222; --trlc-muted: #666; --trlc-line: #d9d9d9; --trlc-bg: #fff; }

.trlc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trlc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
html.trlc-lock { overflow: hidden; }

/* fields: stacked by default (one per line), side by side only in .trlc-inline.
   Heights are fixed with !important because the theme/Elementor form styles override plain rules. */
.trlc-fields { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 100%; }
.trlc-inline .trlc-fields { flex-direction: row; flex-wrap: wrap; }
.trlc-fields input[type=text],
.trlc-fields input[type=email] {
	flex: 0 0 auto !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important;
	height: 48px !important; min-height: 0 !important; margin: 0 !important; padding: 0 14px !important;
	line-height: 46px !important; font: inherit; font-size: 16px !important; color: var(--trlc-ink) !important;
	background: #fff !important; border: 1px solid var(--trlc-line) !important; border-radius: 4px !important;
	box-sizing: border-box !important; box-shadow: none !important;
}
.trlc-inline .trlc-fields input[type=text],
.trlc-inline .trlc-fields input[type=email] { flex: 1 1 180px !important; width: auto !important; }
.trlc-fields .trlc-btn { flex: 0 0 auto; width: 100%; height: 48px; margin: 0; }
.trlc-signup, .trlc-resource, .trlc-res-body { min-width: 0; max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.trlc-fields input:focus { outline: 2px solid var(--trlc-accent); outline-offset: 1px; border-color: var(--trlc-accent); }
.trlc-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px;
	font: inherit; font-size: 15px; font-weight: 600; letter-spacing: .02em; text-decoration: none;
	color: #fff !important; background: var(--trlc-accent); border: 0; border-radius: 4px; cursor: pointer;
	transition: filter .15s ease;
}
.trlc-btn:hover { filter: brightness(1.12); }
.trlc-btn:focus-visible { outline: 2px solid var(--trlc-accent); outline-offset: 3px; }
.trlc-btn[disabled] { opacity: .65; cursor: wait; }
.trlc-msg { margin: 8px 0 0; font-size: 14px; min-height: 1em; }
.trlc-msg.is-error { color: #b42318; }
.trlc-done { margin: 0; padding: 12px 0; font-weight: 600; color: inherit !important; opacity: 1 !important; }
.trlc-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--trlc-accent); }
.trlc-small { font-size: 13px; color: var(--trlc-muted); }

/* modal */
.trlc-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.trlc-modal[hidden] { display: none; }
.trlc-backdrop { position: absolute; inset: 0; background: rgba(15, 18, 24, .55); opacity: 0; transition: opacity .2s ease; }
.trlc-card {
	position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto;
	padding: 34px 30px 28px; background: var(--trlc-bg); color: var(--trlc-ink); border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25); box-sizing: border-box;
	opacity: 0; transform: translateY(14px); transition: opacity .2s ease, transform .2s ease;
}
.trlc-modal.is-open .trlc-backdrop { opacity: 1; }
.trlc-modal.is-open .trlc-card { opacity: 1; transform: none; }
.trlc-card h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.2; }
.trlc-card .trlc-text { margin: 0 0 18px; color: var(--trlc-muted); line-height: 1.55; }
.trlc-card .trlc-fields { flex-direction: column; }
.trlc-card .trlc-fields input, .trlc-card .trlc-btn { width: 100%; flex: none; }
.trlc-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; font-size: 26px; line-height: 1; color: var(--trlc-muted); background: none; border: 0; cursor: pointer; }
.trlc-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; font-size: 22px; font-weight: 700; letter-spacing: .08em; border: 2px dashed var(--trlc-line); border-radius: 6px; }
.trlc-copy { font: inherit; font-size: 13px; letter-spacing: 0; padding: 8px 12px; background: #f2f2f2; border: 0; border-radius: 4px; cursor: pointer; }
.trlc-success .trlc-btn { margin-top: 10px; width: 100%; }

/* signup block */
.trlc-signup { max-width: 640px; }
.trlc-signup .trlc-title { margin: 0 0 6px; }
.trlc-signup .trlc-text { margin: 0 0 14px; }

/* free resource block */
.trlc-resource {
	display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; align-items: center;
	max-width: 1100px; margin: 0 auto; padding: 40px 0;
}
.trlc-res-media img { display: block; width: 100%; height: auto; max-width: 360px; margin: 0 auto; }
.trlc-resource h2 { margin: 0 0 12px; line-height: 1.2; }
.trlc-resource .trlc-text { margin: 0 0 20px; line-height: 1.6; }
.trlc-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.trlc-reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 767px) {
	.trlc-resource { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 16px; text-align: left; }
	.trlc-res-media img { max-width: 200px; }
	.trlc-resource h2 { font-size: 26px; }
	.trlc-card { padding: 30px 20px 22px; }
	.trlc-card h2 { font-size: 22px; }
	.trlc-inline .trlc-fields { flex-direction: column; }
	.trlc-inline .trlc-fields input[type=text],
	.trlc-inline .trlc-fields input[type=email] { width: 100% !important; flex: 0 0 auto !important; }
}
@media (prefers-reduced-motion: reduce) {
	.trlc-reveal, .trlc-card, .trlc-backdrop { transition: none; transform: none; opacity: 1; }
}

/* popup headline: the offer is the hook */
.trlc-card h2.trlc-offer { font-size: 34px; line-height: 1.12; font-weight: 700; margin: 4px 0 12px; }
@media (max-width: 767px) { .trlc-card h2.trlc-offer { font-size: 28px; } }

/* v1.0.4: keep the close button clear of the top line; never let the book image take over the block */
.trlc-card .trlc-kicker { padding-right: 36px; }
.trlc-res-media { display: flex; justify-content: center; }
.trlc-res-media img { width: auto !important; max-width: 100% !important; height: auto !important; max-height: 420px !important; object-fit: contain; }
.trlc-res-media.is-broken { display: none; }
@media (max-width: 767px) { .trlc-res-media img { max-height: 280px !important; } }
