/**
 * Gated Resource Download modal
 */

.gated-resource-modal {
	align-items: stretch;
	bottom: 0;
	display: flex;
	justify-content: center;
	left: 0;
	padding: 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 1000;
}

.gated-resource-modal[hidden] {
	display: none;
}

.gated-resource-modal__backdrop {
	background: var(--color-primary-80);
	bottom: 0;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.gated-resource-modal__dialog {
	background: var(--color-surface-white);
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-height: 100%;
	overflow: auto;
	padding: 28px 22px 32px;
	position: relative;
	width: 100%;
}

.gated-resource-modal__close {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--color-heading);
	cursor: pointer;
	display: inline-flex;
	font-size: 18px;
	height: 44px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 8px;
	top: 8px;
	width: 44px;
}

.gated-resource-modal__close:hover {
	color: var(--color-primary);
}

.gated-resource-modal__close:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

.gated-resource-modal__intro {
	padding-right: 36px;
}

.gated-resource-modal__heading {
	color: var(--color-heading);
	font-family: var(--font-heading);
	font-size: 24px;
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-heading);
	margin: 0 0 12px;
}

.gated-resource-modal__text {
	color: var(--color-paragraph);
	font-size: 16px;
	line-height: var(--line-height-body);
}

.gated-resource-modal__text p {
	margin: 0 0 12px;
}

.gated-resource-modal__text p:last-child {
	margin-bottom: 0;
}

.gated-resource-modal__resource {
	color: var(--color-heading);
	font-size: 16px;
	font-weight: var(--font-weight-semibold);
	margin: 16px 0 0;
}

.gated-resource-modal__resource[hidden] {
	display: none;
}

.gated-resource-modal__form .gform_wrapper,
.gated-resource-modal__form .gform_wrapper.gform_wrapper {
	margin: 0;
}

.gated-resource-modal__form .gform_heading,
.gated-resource-modal__form .gform_required_legend {
	display: none;
}

.gated-resource-modal__form .gform_fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.gated-resource-modal__form .gfield {
	margin: 0;
	padding: 0;
}

.gated-resource-modal__form .gfield_label {
	color: var(--color-heading);
	font-size: 14px;
	font-weight: var(--font-weight-semibold);
	margin-bottom: 8px;
}

.gated-resource-modal__form .gform_footer,
.gated-resource-modal__form .gform_page_footer {
	margin: 8px 0 0;
	padding: 0;
}

.gated-resource-modal__form .gform_button {
	width: 100%;
}

.gated-resource-modal__form .gform_confirmation_message {
	color: var(--color-paragraph);
	font-size: 16px;
	line-height: var(--line-height-body);
	margin: 0;
}

html.has-gated-resource-modal,
html.has-gated-resource-modal body {
	overflow: hidden;
}

@media (min-width: 768px) {
	.gated-resource-modal {
		align-items: center;
		padding: 40px 24px;
	}

	.gated-resource-modal__dialog {
		border-radius: var(--radius-sm);
		max-height: calc(100vh - 80px);
		max-width: 560px;
		padding: 40px 36px;
		width: 100%;
	}

	.gated-resource-modal__heading {
		font-size: 28px;
	}

	.gated-resource-modal__form .gform_button {
		width: auto;
	}
}

@media (min-width: 1200px) {
	.gated-resource-modal__dialog {
		max-width: 600px;
		padding: 48px 40px;
	}

	.gated-resource-modal__heading {
		font-size: 30px;
	}
}
