/**
 * LeaseLeads Eligibility — frontend styles.
 *
 * Layout, spacing, and panel colors from the settings page are defined here.
 * The theme controls font families and type sizes through the BEM classes. Icons
 * use `currentColor` masks and therefore inherit the surrounding text color.
 */

.lle {
	width: min(1440px, 100% - 80px);
	margin-inline: auto;
	padding-block: clamp(48px, 6.25vw, 120px) 40px;
}

@media (max-width: 960px) {
	.lle {
		width: calc(100% - 32px);
	}
}

.lle-form {
	display: flex;
	flex-direction: column;
	gap: 40px;
	padding: clamp(24px, 5.56vw, 80px);
	background: var(--lle-background);
	color: var(--lle-text);
}

.lle-form__heading,
.lle-form__help,
.lle-form__error {
	margin: 0;
}

.lle-form__heading,
.lle-form__label,
.lle-form__help,
.lle-form__disclaimer {
	color: inherit;
}

.lle-form__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
}

.lle-form__fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
	align-items: start;
	gap: 24px;
	width: 100%;
}

.lle-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.lle-form__select-wrap {
	position: relative;
	display: block;
}

.lle-form__select-wrap::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("../images/chevron-down.svg") center / contain no-repeat;
	mask: url("../images/chevron-down.svg") center / contain no-repeat;
	transform: translateY(-50%);
	pointer-events: none;
}

/* These insets plus a 1px border create the design's 12px and 16px spacing. */
.lle-form__select,
.lle-form__input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 11px 15px;
	border: 1px solid var(--lle-text);
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
}

.lle-form__select {
	padding-right: 39px;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.lle-form__input::placeholder {
	color: inherit;
	opacity: 0.5;
}

.lle-form__select:invalid {
	color: color-mix(in srgb, var(--lle-text) 50%, transparent);
}

.lle-form__select option {
	background: var(--lle-background);
	color: var(--lle-text);
}

.lle-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: 48px;
	padding: 11px 21px;
	border: 1px solid var(--lle-button);
	border-radius: 999px;
	background: var(--lle-button);
	color: #fff;
	cursor: pointer;
}

/*
 * Browsers that do not support `contrast-color()` retain white text, which suits
 * the default button color. This requires `@supports` because a declaration
 * containing `var()` always parses and therefore cannot fall back through the
 * cascade.
 */
@supports (color: contrast-color(red)) {
	.lle-form__submit {
		color: contrast-color(var(--lle-button));
	}
}

.lle-form__submit::after {
	content: "";
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	background: currentColor;
	-webkit-mask: url("../images/arrow-right.svg") center / contain no-repeat;
	mask: url("../images/arrow-right.svg") center / contain no-repeat;
}

/*
 * Collapsed rather than display: none, so every card is laid out on load and
 * the LeaseLeads carousels measure a real width when they initialize.
 */
.lle-results {
	width: 100%;
	height: 0;
	overflow-y: clip;
}

.lle-results.is-visible {
	margin-top: 40px;
	height: auto;
	overflow-y: visible;
}

.lle-results__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--ll-card-width, min(450px, 100%)), 1fr));
	gap: 1.5rem;
}

.lle-results__item .leaseleads-shortcode {
	height: 100%;
}

.lle [hidden] {
	display: none;
}
