/* =============================================================================
   Limitless — free evaluation popup
   -----------------------------------------------------------------------------
   Same three colors as the rest of the brand: black, white, Honolulu Blue. Scoped
   under .ldp so nothing here touches the Salient theme and the theme cannot reach
   in and restyle a dialog it does not know about.

   Sized so the whole thing fits on a laptop without scrolling, and scrolls
   internally on a phone rather than growing past the viewport — a modal you have
   to scroll the page to escape is the version everyone hates.
   ========================================================================== */

.ldp {
	--p-ink: #0a0a0a;
	--p-grey: #56585f;
	--p-line: #d7d8dd;
	--p-brand: #0076b6;
	--p-brand-press: #005f93;

	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	/*
	 * An explicit minmax(0, 1fr) column, not an implicit auto one. With an auto column
	 * the box's `width: min(500px, 100%)` resolves against a max-content track rather
	 * than the viewport, so on a phone it sized itself to 500px and ran off the right
	 * edge — with the close button going with it.
	 */
	grid-template-columns: minmax(0, 1fr);
	place-items: center;
	padding: 1rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	opacity: 0;
	transition: opacity 0.18s ease;
}

.ldp.is-open { opacity: 1; }
.ldp[hidden] { display: none; }

.ldp__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 10, 14, 0.62);
	cursor: pointer;
}

.ldp__box {
	position: relative;
	width: min(500px, 100%);
	max-width: 100%;
	max-height: min(92vh, 780px);
	overflow-y: auto;
	background: #fff;
	color: var(--p-ink);
	border-radius: 12px;
	padding: 1.9rem 1.75rem 1.6rem;
	box-shadow: 0 32px 70px -28px rgba(0, 20, 40, 0.62);
	transform: translateY(10px) scale(0.985);
	transition: transform 0.2s ease;
	box-sizing: border-box;
}

.ldp.is-open .ldp__box { transform: none; }

.ldp__box *, .ldp__box *::before, .ldp__box *::after { box-sizing: border-box; }

/* Generous hit area — a close button people cannot hit is not a close button. */
.ldp__x {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--p-grey);
	cursor: pointer;
	border-radius: 50%;
}
.ldp__x:hover { background: #f2f4f7; color: var(--p-ink); }

.ldp__eyebrow {
	margin: 0 0 0.45rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--p-brand);
}

.ldp__title {
	margin: 0 0 0.6rem;
	font-size: clamp(1.35rem, 3.6vw, 1.7rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
	font-weight: 700;
	color: var(--p-ink);
}

.ldp__sub {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--p-grey);
}

.ldp__points {
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.35rem;
}

.ldp__points li {
	position: relative;
	padding-left: 1.35rem;
	font-size: 0.875rem;
	color: var(--p-ink);
}

/* Drawn check rather than an icon font or an image request. */
.ldp__points li::before {
	content: "";
	position: absolute;
	left: 1px;
	top: 0.42em;
	width: 9px;
	height: 5px;
	border-left: 2px solid var(--p-brand);
	border-bottom: 2px solid var(--p-brand);
	transform: rotate(-45deg);
}

.ldp__row { margin-bottom: 0.7rem; }

.ldp__row label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
	color: var(--p-ink);
}

.ldp__opt { font-weight: 400; color: var(--p-grey); }

.ldp__row input {
	width: 100%;
	padding: 0.7rem 0.8rem;
	font-size: 1rem; /* 16px — anything smaller makes iOS zoom on focus */
	font-family: inherit;
	color: var(--p-ink);
	background: #fff;
	border: 1px solid var(--p-line);
	border-radius: 6px;
}

.ldp__row input:focus-visible,
.ldp__consent input:focus-visible,
.ldp__box button:focus-visible {
	outline: 3px solid var(--p-brand);
	outline-offset: 2px;
}

.ldp__row input[aria-invalid="true"] { border-color: #b3261e; }

.ldp__err {
	margin: 0.2rem 0 0;
	font-size: 0.75rem;
	color: #b3261e;
	min-height: 0;
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.ldp__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ldp__consent {
	display: flex;
	gap: 0.55rem;
	align-items: flex-start;
	margin: 0.55rem 0;
	font-size: 0.6875rem;
	line-height: 1.45;
	color: var(--p-grey);
	cursor: pointer;
}

.ldp__consent input {
	flex: 0 0 auto;
	margin-top: 0.15rem;
	width: 16px;
	height: 16px;
	accent-color: var(--p-brand);
}

.ldp__fine {
	margin: 0.75rem 0 1rem;
	font-size: 0.75rem;
	color: var(--p-grey);
}
.ldp__fine a { color: var(--p-brand); }

.ldp__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.ldp__submit {
	flex: 1 1 auto;
	padding: 0.85rem 1.4rem;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;              /* white on #0076b6 — 4.87:1, passes AA */
	background: var(--p-brand);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}
.ldp__submit:hover { background: var(--p-brand-press); }
.ldp__submit:disabled { opacity: 0.65; cursor: default; }

/* A visible, plainly worded decline. Hiding it in grey 10px type is a dark pattern. */
.ldp__no {
	background: none;
	border: 0;
	padding: 0.5rem;
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--p-grey);
	text-decoration: underline;
	cursor: pointer;
}
.ldp__no:hover { color: var(--p-ink); }

.ldp__status {
	margin: 0.7rem 0 0;
	font-size: 0.8125rem;
	color: #b3261e;
	min-height: 1em;
}

.ldp__done { text-align: center; padding: 1.5rem 0.5rem 0.5rem; }
.ldp__done h2 { margin: 0 0 0.5rem; font-size: 1.4rem; }
.ldp__done p { margin: 0 0 1.25rem; color: var(--p-grey); font-size: 0.9375rem; }

@media (max-width: 480px) {
	.ldp { padding: 0.5rem; }
	.ldp__box { padding: 1.6rem 1.15rem 1.3rem; max-height: 94vh; }
	.ldp__actions { flex-direction: column-reverse; align-items: stretch; }
	.ldp__submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.ldp, .ldp__box { transition: none; }
}
