/**
 * Simple Math CAPTCHA - front-end styles.
 * Minimal, theme-inheriting, no external libraries.
 */

.smc-captcha {
	margin: 1em 0;
	font-size: inherit;
	line-height: 1.5;
}

.smc-captcha__label {
	display: block;
	margin-bottom: 0.4em;
	font-weight: 600;
}

.smc-captcha__question {
	display: inline-block;
	padding: 0.05em 0.4em;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.smc-captcha__equals {
	margin-left: 0.15em;
}

.smc-captcha__controls {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	flex-wrap: wrap;
}

.smc-captcha__input {
	width: 5.5em;
	max-width: 100%;
	padding: 0.45em 0.6em;
	font: inherit;
	line-height: 1.2;
	border: 1px solid currentColor;
	border-radius: 4px;
	background: transparent;
	color: inherit;
}

.smc-captcha__input:focus {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.smc-captcha__input.smc-is-invalid {
	border-color: #b32d2e;
	outline-color: #b32d2e;
}

.smc-captcha__refresh {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.2em;
	height: 2.2em;
	padding: 0;
	font: inherit;
	font-size: 1.1em;
	line-height: 1;
	cursor: pointer;
	border: 1px solid currentColor;
	border-radius: 4px;
	background: transparent;
	color: inherit;
}

.smc-captcha__refresh:hover,
.smc-captcha__refresh:focus {
	opacity: 0.75;
}

.smc-captcha__refresh:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.smc-captcha__refresh.smc-is-loading {
	cursor: progress;
	opacity: 0.5;
}

.smc-captcha__error {
	display: block;
	margin-top: 0.4em;
	min-height: 1em;
	color: #b32d2e;
	font-size: 0.9em;
}

/* Visually hidden honeypot - kept out of the accessibility tree and tab order. */
.smc-captcha__hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}
