/*
 * Gated Content Forms - front end.
 * Layout only. Fonts, colours, input and button styling come from the active theme.
 */

.gcf-gate-page {
	padding-block: clamp(2rem, 6vw, 5rem);
}

.gcf-gate-container {
	width: min(100% - 2.5rem, 42rem);
	margin-inline: auto;
}

.gcf-gate {
	max-width: 42rem;
	margin-inline: auto;
}

.gcf-heading {
	margin-top: 0;
}

.gcf-intro {
	margin-bottom: 1.5em;
}

.gcf-intro > :last-child {
	margin-bottom: 0;
}

.gcf-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.1em 1.25em;
}

.gcf-field {
	grid-column: 1 / -1;
	min-width: 0;
}

.gcf-field--half {
	grid-column: span 1;
}

@media (max-width: 600px) {
	.gcf-field--half {
		grid-column: 1 / -1;
	}
}

.gcf-field > label,
.gcf-field legend {
	display: block;
	margin-bottom: 0.35em;
	font-weight: 600;
}

.gcf-field input:not([type="checkbox"]):not([type="radio"]),
.gcf-field select,
.gcf-field textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.gcf-field fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.gcf-choice {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	margin: 0.3em 0;
	font-weight: normal;
	cursor: pointer;
}

.gcf-choice input {
	flex: none;
	margin: 0.3em 0 0;
	width: auto;
}

.gcf-required {
	color: #b32d2e;
	margin-left: 0.15em;
}

.gcf-help {
	margin: 0.35em 0 0;
	font-size: 0.875em;
	opacity: 0.8;
}

.gcf-error-text {
	margin: 0.35em 0 0;
	font-size: 0.875em;
	color: #b32d2e;
}

.gcf-field--has-error input:not([type="checkbox"]):not([type="radio"]),
.gcf-field--has-error select,
.gcf-field--has-error textarea {
	border-color: #b32d2e;
	box-shadow: 0 0 0 1px #b32d2e;
}

.gcf-notice {
	margin: 0 0 1.25em;
	padding: 0.75em 1em;
	border-left: 4px solid currentColor;
}

.gcf-notice--error {
	color: #b32d2e;
	background: rgba(179, 45, 46, 0.07);
}

.gcf-actions {
	margin: 1.5em 0 0;
}

.gcf-returning {
	margin-top: 2em;
	padding-top: 1.25em;
	border-top: 1px solid rgba(127, 127, 127, 0.3);
}

.gcf-returning summary {
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	width: fit-content;
}

.gcf-returning[open] summary {
	margin-bottom: 1em;
}

.gcf-form--returning .gcf-field {
	max-width: 26rem;
}

.gcf-form--returning .gcf-actions {
	margin-top: 1em;
}

/* Honeypot: hidden from people, visible to bots. */
.gcf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* "You now have access" message after unlocking. */
.gcf-toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	z-index: 99999;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 1rem;
	max-width: calc(100% - 2rem);
	padding: 0.85rem 0.85rem 0.85rem 1.25rem;
	background: #1e1e1e;
	color: #fff;
	border-radius: 6px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
	font-size: 0.95rem;
	line-height: 1.4;
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.gcf-toast--hide {
	opacity: 0;
	transform: translate(-50%, 0.75rem);
}

.gcf-toast__close {
	all: unset;
	cursor: pointer;
	font-size: 1.4rem;
	line-height: 1;
	padding: 0 0.35rem;
	color: inherit;
	opacity: 0.75;
}

.gcf-toast__close:hover,
.gcf-toast__close:focus-visible {
	opacity: 1;
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.gcf-toast {
		transition: none;
	}
}
