/**
 * VoiceOver-safe WebMCP form focus.
 * Never suppress the outline or hide the active tool form from AT.
 * :tool-form-active is its own rule so unknown-pseudo drop does not kill :focus-within.
 */

form[toolname]:focus-within {
	outline: 3px solid #005fcc;
	outline-offset: 3px;
}

form[toolname]:tool-form-active {
	outline: 3px solid #005fcc;
	outline-offset: 3px;
}

@media (prefers-contrast: more) {
	form[toolname]:focus-within,
	form[toolname]:tool-form-active {
		outline: 4px solid ButtonText;
		outline-offset: 3px;
	}
}

/* Archive request form is hidden until a client marks it active. Then it must be on-screen. */
.md-webmcp-request[hidden]:has(form:focus-within),
.md-webmcp-request[hidden]:has(form:tool-form-active) {
	display: block;
	position: static;
}
