/* ==========================================================================
   LGI Resource Library — Gated Content template (eBook / download)
   Scope: .lgi-resource-library--gated  (requires lgi-resource-library-common.css)
   The theme styles every <form>, <label>, <p> inside forms and text inputs
   globally with !important (lgi/public/css/app.css). Overrides that must beat
   those rules are marked with the comment "beats theme form rule".
   ========================================================================== */

.lgi-resource-library--gated .lgi-resource-library-gated-hero {
	padding: 40px 0 80px;
	background: linear-gradient(180deg, rgb(216 222 232 / 0.3) 0%, rgb(255 255 255 / 0.3) 100%);
}

.lgi-resource-library--gated .lgi-resource-library-gated-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 667fr) minmax(0, 423fr);
	align-items: start;
	gap: 60px;
}

.lgi-resource-library--gated .lgi-resource-library-gated-main {
	display: flex;
	flex-direction: column;
	gap: 40px;
	min-width: 0;
}

.lgi-resource-library--gated .lgi-resource-library-gated-main__intro {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.lgi-resource-library--gated .lgi-resource-library-gated-main__heading {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

.lgi-resource-library--gated .lgi-resource-library-gated-main__body {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.lgi-resource-library--gated .lgi-resource-library-gated-details {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.lgi-resource-library--gated .lgi-resource-library-cover {
	display: grid;
	place-items: center;
	overflow: hidden;
	border-radius: var(--lgi-rl-radius-card);
	background: #eff2f5;
}

.lgi-resource-library--gated .lgi-resource-library-cover__image {
	width: 100%;
	aspect-ratio: 667 / 402;
	object-fit: cover;
}

.lgi-resource-library--gated .lgi-resource-library-gated-summary {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lgi-resource-library--gated .lgi-resource-library-gated-summary__text {
	font-size: var(--lgi-rl-fs-body);
	line-height: 1.6667;
	color: var(--lgi-rl-ink);
}

.lgi-resource-library--gated .lgi-resource-library-benefits {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lgi-resource-library--gated .lgi-resource-library-benefits__item {
	position: relative;
	padding: 10px 0 10px 30px;
	border-bottom: 1px solid var(--lgi-rl-line);
	font-size: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
	line-height: 1.55;
	color: var(--lgi-rl-ink-strong);
}

.lgi-resource-library--gated .lgi-resource-library-benefits__item::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--lgi-rl-blue);
	transform: translateY(-50%);
}

/* --------------------------------------------------------------------------
   Download form card
   -------------------------------------------------------------------------- */
.lgi-resource-library--gated .lgi-resource-library-form-card {
	overflow: hidden;
	border: 1px solid var(--lgi-rl-line-strong);
	border-top-width: 5px;
	border-radius: 24px;
	background: var(--lgi-rl-white);
	box-shadow: 0 14px 40px rgb(1 42 86 / 0.1);
}

.lgi-resource-library--gated .lgi-resource-library-form-card__head {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 28px 28px 20px;
	border-bottom: 1px solid var(--lgi-rl-line-strong);
	background: linear-gradient(180deg, #f3f5f8 0%, #fff 100%);
}

.lgi-resource-library--gated .lgi-resource-library-form-card__title {
	font-size: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
	font-weight: 600;
	line-height: 1.15;
	color: var(--lgi-rl-blue);
}

.lgi-resource-library--gated .lgi-resource-library-form-card__subtitle {
	font-size: 16px;
	line-height: 22.5px;
	color: var(--lgi-rl-ink);
}

.lgi-resource-library--gated .lgi-resource-library-form-card__body {
	padding: 16px 28px 30px;
}

.lgi-resource-library--gated .lgi-resource-library-form {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 16px;
	width: 100%;
	margin: 0;
}

.lgi-resource-library--gated .lgi-resource-library-form[data-state="submitted"] {
	display: none;
}

.lgi-resource-library--gated .lgi-resource-library-form__field {
	padding-top: 15px;
}

.lgi-resource-library--gated .lgi-resource-library-form__input {
	display: block;
	width: 100%;
	height: 52px;
	min-height: 52px !important;                        /* beats theme form rule */
	padding: 12px 14px !important;                      /* beats theme form rule */
	border: 1px solid var(--lgi-rl-field-line) !important; /* beats theme form rule */
	border-radius: 10px;
	background: var(--lgi-rl-white) !important;         /* beats theme form rule */
	color: var(--lgi-rl-ink) !important;                /* beats theme form rule */
	font-family: var(--lgi-rl-font);
	font-size: 16px !important;                         /* beats theme form rule */
	line-height: 1.25;
	transition: border-color var(--lgi-rl-dur-ui) ease, box-shadow var(--lgi-rl-dur-ui) ease;
}

.lgi-resource-library--gated .lgi-resource-library-form__input::placeholder {
	color: #757575;
	opacity: 1;
}

.lgi-resource-library--gated .lgi-resource-library-form__input:focus {
	outline: none;
	border-color: var(--lgi-rl-blue) !important;       /* beats theme form rule */
	box-shadow: 0 0 0 3px rgb(3 110 255 / 0.15);
}

.lgi-resource-library--gated .lgi-resource-library-form__input[aria-invalid="true"] {
	border-color: #c4320a !important;                   /* beats theme form rule */
}

.lgi-resource-library--gated .lgi-resource-library-form__error {
	display: block !important;          /* beats theme form rule */
	margin: 6px 0 0 !important;         /* beats theme form rule */
	font-size: 14px !important;         /* beats theme form rule */
	line-height: 1.3;
	color: #c4320a;
}

.lgi-resource-library--gated .lgi-resource-library-form__error:empty {
	display: none !important;
}

.lgi-resource-library--gated .lgi-resource-library-form__consent {
	display: flex !important;           /* beats theme form rule (form label) */
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	margin: 0 !important;               /* beats theme form rule */
	color: var(--lgi-rl-body-muted);
	font-size: 15px !important;         /* beats theme form rule */
	line-height: 21.75px !important;
	cursor: pointer;
}

.lgi-resource-library--gated .lgi-resource-library-form__checkbox {
	flex: none;
	width: 13px;
	height: 13px;
	margin: 4px 0 0;
	accent-color: var(--lgi-rl-blue);
	cursor: pointer;
}

.lgi-resource-library--gated .lgi-resource-library-form__legal {
	display: block !important;          /* beats theme form rule (form p) */
	margin: 0 !important;               /* beats theme form rule */
	padding-top: 8px;
	color: var(--lgi-rl-body-muted);
	font-size: 13.5px !important;       /* beats theme form rule */
	line-height: 17px !important;
}

.lgi-resource-library--gated .lgi-resource-library-form__legal a {
	color: var(--lgi-rl-blue);
	text-decoration: none;
}

.lgi-resource-library--gated .lgi-resource-library-form__legal a:hover {
	text-decoration: underline;
}

.lgi-resource-library--gated .lgi-resource-library-form__status {
	display: block !important;          /* beats theme form rule (form p) */
	margin: 0 !important;               /* beats theme form rule */
	font-size: 14px !important;         /* beats theme form rule */
	line-height: 1.4;
	color: #c4320a;
}

.lgi-resource-library--gated .lgi-resource-library-form__status:empty {
	display: none !important;
}

.lgi-resource-library--gated .lgi-resource-library-form-success {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-top: 16px;
}

.lgi-resource-library--gated .lgi-resource-library-form-success[hidden] {
	display: none;
}

.lgi-resource-library--gated .lgi-resource-library-form-success:focus {
	outline: none;
}

.lgi-resource-library--gated .lgi-resource-library-form-success__title {
	font-size: 20px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--lgi-rl-ink);
}

.lgi-resource-library--gated .lgi-resource-library-form-success__text {
	font-size: 16px;
	line-height: 1.5;
	color: var(--lgi-rl-ink);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
	.lgi-resource-library--gated .lgi-resource-library-gated-hero__inner {
		gap: 40px;
	}
}

@media (max-width: 1024px) {
	.lgi-resource-library--gated .lgi-resource-library-gated-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	/* Form follows the cover + summary: heading → cover → form → details. */
	.lgi-resource-library--gated .lgi-resource-library-gated-hero__inner {
		grid-template-areas: "intro" "form" "details";
	}

	.lgi-resource-library--gated .lgi-resource-library-gated-main {
		display: contents;
	}

	.lgi-resource-library--gated .lgi-resource-library-gated-main__intro {
		grid-area: intro;
	}

	.lgi-resource-library--gated .lgi-resource-library-gated-details {
		grid-area: details;
		display: flex;
		flex-direction: column;
		gap: 40px;
	}

	.lgi-resource-library--gated .lgi-resource-library-gated-aside {
		grid-area: form;
		width: 100%;
	}

	.lgi-resource-library--gated .lgi-resource-library-gated-hero {
		padding-bottom: 64px;
	}
}

@media (max-width: 768px) {
	.lgi-resource-library--gated .lgi-resource-library-gated-hero {
		padding: 32px 0 56px;
	}

	.lgi-resource-library--gated .lgi-resource-library-gated-hero__inner {
		gap: 40px;
	}

	.lgi-resource-library--gated .lgi-resource-library-gated-aside {
		max-width: none;
	}
}

@media (max-width: 480px) {
	.lgi-resource-library--gated .lgi-resource-library-form-card__head {
		padding: 24px 20px 18px;
	}

	.lgi-resource-library--gated .lgi-resource-library-form-card__body {
		padding: 12px 20px 24px;
	}

	.lgi-resource-library--gated .lgi-resource-library-form-card {
		border-radius: 20px;
	}
}

/* ==========================================================================
   WordPress integration — HubSpot download form (page-level rules)
   The form itself is styled by lgi-resource-library-hubspot.css, which is
   enqueued here (raw-HTML HubSpot forms) and injected into HubSpot's form
   iframe (default v2 embed) by lgi-resource-library-gated.js.
   ========================================================================== */
.lgi-resource-library--gated .lgi-resource-library-form-wrap[hidden] {
	display: none;
}

.lgi-resource-library--gated .lgi-resource-library-gated-content {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}

.lgi-resource-library--gated .lgi-resource-library-hubspot__placeholder {
	margin: 0;
	padding: 24px 0;
	color: var(--lgi-rl-body-muted);
	font-size: 15px;
	text-align: center;
}

.lgi-resource-library--gated .lgi-resource-library-hubspot__placeholder[hidden] {
	display: none;
}

.lgi-resource-library--gated .lgi-resource-library-hubspot iframe {
	display: block;
	width: 100% !important;
	border: 0;
}
