.rbf-cf7-upload-gate {
	--rbf-upload-accent: var(--accent, #008CA5);
	--rbf-upload-text: var(--text, #3C4146);
	--rbf-upload-muted: #68707a;
	--rbf-upload-border: var(--rbf-upload-accent);
	--rbf-upload-border-soft: rgba(0, 140, 165, 0.28);
	--rbf-upload-bg: #ffffff;
	--rbf-upload-bg-soft: #f7fafb;

	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 1.5rem 0;
}

.rbf-cf7-upload-gate__intro,
.rbf-cf7-upload-gate__challenge {
	display: flex;
	flex-direction: column;
	gap: .75rem;
}

.rbf-cf7-upload-gate__title,
.rbf-cf7-upload-gate__question {
	margin: 0;
	color: var(--rbf-upload-text);
}

.rbf-cf7-upload-gate__text,
.rbf-cf7-upload-gate__status {
	margin: 0;
	color: var(--rbf-upload-muted);
	line-height: 1.5;
}

.rbf-cf7-upload-gate__images {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
}

.rbf-cf7-upload-gate__image {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	margin: 0;
	padding: .5rem;
	border: 1px solid var(--rbf-upload-border-soft);
	border-radius: 8px;
	background: var(--rbf-upload-bg-soft);
}

.rbf-cf7-upload-gate__image img {
	display: block;
	width: 100px;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.rbf-cf7-upload-gate__image figcaption {
	color: var(--rbf-upload-muted);
	font-size: .85rem;
	line-height: 1.3;
}

.rbf-cf7-upload-gate__input {
	width: 100%;
	max-width: 220px;
	min-height: 46px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--rbf-upload-border);
	border-radius: 5px;
	background-color: var(--rbf-upload-bg);
	color: var(--rbf-upload-text);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: .12em;
	text-transform: uppercase;
	box-shadow: none;
	outline: none;
	transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.rbf-cf7-upload-gate__input:focus {
	border-color: var(--rbf-upload-accent);
	box-shadow: 0 0 0 3px var(--rbf-upload-border-soft);
}

.rbf-cf7-upload-gate__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-height: 42px;
	padding: 9px 16px;
	border: 1px solid var(--rbf-upload-accent);
	border-radius: 5px;
	background: var(--rbf-upload-accent);
	color: #ffffff;
	font: inherit;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: opacity 180ms ease, transform 180ms ease;
}

.rbf-cf7-upload-gate__submit:hover,
.rbf-cf7-upload-gate__submit:focus {
	transform: translateY(-1px);
}

.rbf-cf7-upload-gate__submit:disabled,
.rbf-cf7-upload-gate.is-rbf-gate-loading .rbf-cf7-upload-gate__submit {
	cursor: wait;
	opacity: .65;
	transform: none;
}

.rbf-cf7-upload-gate.is-rbf-gate-passed .rbf-cf7-upload-gate__challenge {
	display: none;
}

.rbf-cf7-upload-gate__open {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-height: 42px;
	padding: 9px 16px;
	border: 1px solid var(--rbf-upload-accent);
	border-radius: 5px;
	background: var(--rbf-upload-accent);
	color: #ffffff;
	font: inherit;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: opacity 180ms ease, transform 180ms ease;
}

.rbf-cf7-upload-gate__open:hover,
.rbf-cf7-upload-gate__open:focus {
	transform: translateY(-1px);
}

.rbf-cf7-upload-gate__challenge {
	display: none;
}

.rbf-cf7-upload-gate.is-rbf-gate-modal-open .rbf-cf7-upload-gate__challenge {
	position: fixed;
	z-index: 99999;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: .85rem;
	width: 100%;
	min-height: 100vh;
	padding: clamp(1rem, 4vw, 3rem);
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(8px);
	overflow: auto;
}

.rbf-cf7-upload-gate.is-rbf-gate-modal-open .rbf-cf7-upload-gate__challenge > * {
	width: min(100%, 620px);
	margin-inline: auto;
}

.rbf-cf7-upload-gate.is-rbf-gate-passed .rbf-cf7-upload-gate__intro,
.rbf-cf7-upload-gate.is-rbf-gate-passed .rbf-cf7-upload-gate__challenge {
	display: none;
}


.rbf-cf7-upload-gate__cancel {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-height: 42px;
	padding: 9px 16px;
	border: 1px solid var(--rbf-upload-border);
	border-radius: 5px;
	background: var(--rbf-upload-bg);
	color: var(--rbf-upload-text);
	font: inherit;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.rbf-cf7-upload-gate__cancel:hover,
.rbf-cf7-upload-gate__cancel:focus {
	border-color: var(--rbf-upload-accent);
	box-shadow: 0 0 0 3px var(--rbf-upload-border-soft);
	transform: translateY(-1px);
}