/**
 * Teamunity Akadálymentesítő — visible focus indicator, screen-reader-text
 * utility and skip link styles (SPEC 4.3, focus_style fix).
 *
 * The focus color can be overridden via the --tmu-focus-color custom
 * property (set inline from the plugin settings with wp_add_inline_style).
 */

/* Fallback for browsers without :focus-visible support.
   In supporting browsers the :focus:not(:focus-visible) rule below
   removes the outline for non-keyboard focus. */
:focus {
	outline: 3px solid var(--tmu-focus-color, #1d4ed8);
	outline-offset: 2px;
}

/* Supporting browsers: hide the outline when focus is not "visible"
   (e.g. mouse click); unknown-selector browsers skip this whole rule,
   keeping the :focus fallback above. */
:focus:not(:focus-visible) {
	outline: none;
}

/* Keyboard (and other modality-determined) focus. */
:focus-visible {
	outline: 3px solid var(--tmu-focus-color, #1d4ed8);
	outline-offset: 2px;
}

/* Standard WordPress screen-reader-text utility. */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Reveal screen-reader-text elements when they receive focus
   (standard WP pattern, used e.g. by skip links). */
.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Skip link: visually hidden until focused (it also carries the
   .screen-reader-text class); on focus it is pinned to the top-left
   corner with a high-contrast background. */
.tmu-skip-link:focus {
	background-color: #111827;
	clip: auto !important;
	clip-path: none;
	color: #ffffff;
	display: block;
	font-size: 1rem;
	font-weight: 700;
	height: auto;
	left: 8px;
	line-height: normal;
	outline: 3px solid var(--tmu-focus-color, #1d4ed8);
	outline-offset: 2px;
	padding: 12px 20px;
	position: fixed !important;
	text-decoration: underline;
	top: 8px;
	width: auto;
	z-index: 100000;
}
