/* Download gate – front end. Inherits the theme's fonts; colours meet WCAG AA on white. */

.wnrcg-form {
	font: inherit;
	line-height: 1.5;
	color: #1e1e1e;
}

.wnrcg-form__title {
	margin: 0 0 0.75rem;
	font-size: 1.5rem;
	line-height: 1.25;
}

.wnrcg-form__intro {
	margin: 0 0 1.25rem;
	padding: 0.875rem 1rem;
	border-left: 4px solid #1e1e1e;
	background: #f6f6f4;
	font-size: 0.95rem;
}

.wnrcg-form__intro p {
	margin: 0 0 0.5rem;
}

.wnrcg-form__intro p:last-child {
	margin-bottom: 0;
}

.wnrcg-form__errors {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-left: 4px solid #b32d2e;
	background: #fcf0f1;
	color: #1e1e1e;
}

.wnrcg-form__errors ul {
	margin: 0;
	padding-left: 1.25rem;
}

.wnrcg-form__field {
	margin: 0 0 1rem;
}

.wnrcg-form__field > label {
	display: block;
	margin-bottom: 0.3rem;
	font-weight: 600;
}

.wnrcg-required {
	color: #b32d2e;
}

.wnrcg-input,
.wnrcg-textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid #757575;
	border-radius: 4px;
	background: #fff;
	color: #1e1e1e;
	font: inherit;
	box-sizing: border-box;
}

.wnrcg-input:focus,
.wnrcg-textarea:focus {
	outline: 2px solid #1e1e1e;
	outline-offset: 1px;
}

.wnrcg-input[aria-invalid="true"],
.wnrcg-textarea[aria-invalid="true"] {
	border-color: #b32d2e;
}

.wnrcg-textarea {
	resize: vertical;
	min-height: 5rem;
}

.wnrcg-form__help {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.875rem;
	color: #4a4a4a;
}

.wnrcg-form__field--checkbox {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25rem 0.6rem;
	align-items: start;
}

.wnrcg-form__field--checkbox label {
	font-weight: 400;
}

.wnrcg-form__field--checkbox input {
	width: 1.15rem;
	height: 1.15rem;
	margin: 0.2rem 0 0;
}

.wnrcg-form__field--checkbox .wnrcg-form__help {
	grid-column: 2;
}

.wnrcg-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wnrcg-turnstile {
	margin: 0 0 1rem;
}

.wnrcg-button {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	border: 2px solid #1e1e1e;
	border-radius: 4px;
	background: #1e1e1e;
	color: #fff;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.wnrcg-button:hover,
.wnrcg-button:focus-visible {
	background: #fff;
	color: #1e1e1e;
}

.wnrcg-button[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.wnrcg-form__status:empty {
	display: none;
}

/* Modal */
.wnrcg-modal[hidden] {
	display: none !important;
}

.wnrcg-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 1rem;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.wnrcg-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.wnrcg-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 34rem;
	margin: 2rem auto;
	padding: 1.75rem 1.5rem 1.25rem;
	border-radius: 8px;
	background: #fff;
	color: #1e1e1e;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	box-sizing: border-box;
}

.wnrcg-modal__dialog:focus {
	outline: none;
}

.wnrcg-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #1e1e1e;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.wnrcg-modal__close:hover,
.wnrcg-modal__close:focus-visible {
	background: #f0f0f0;
	outline: 2px solid #1e1e1e;
}

.wnrcg-modal .wnrcg-form__title {
	padding-right: 2.5rem;
}

body.wnrcg-modal-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.wnrcg-modal {
		padding: 0;
	}

	.wnrcg-modal__dialog {
		min-height: 100%;
		margin: 0;
		border-radius: 0;
		padding: 1.25rem 1rem 2rem;
	}

	.wnrcg-button {
		width: 100%;
		text-align: center;
	}
}

/* Placeholder for gated pages / sections */
.wnrcg-placeholder {
	margin: 1.5rem 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #fafafa;
}

/* Separate form page */
.wnrcg-standalone__main {
	max-width: 36rem;
	margin: 2rem auto;
	padding: 0 1rem;
}

.wnrcg-page-form {
	max-width: 36rem;
	margin: 1.5rem auto;
}

.wnrcg-standalone__site a {
	color: inherit;
}

.screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
	.wnrcg-modal__dialog {
		animation: wnrcg-in 0.15s ease-out;
	}

	@keyframes wnrcg-in {
		from { opacity: 0; transform: translateY(8px); }
		to { opacity: 1; transform: none; }
	}
}
