/* ==========================================================================
   XROAD Enhancements — accessibility & UX layer
   Loaded via mu-plugin (xroad-enhancements.php). Safe, additive, removable.
   Scope is intentionally conservative to avoid clashing with the Hongo theme.
   ========================================================================== */

/* 1. Visible keyboard focus (WCAG 2.4.7) — only for keyboard users, not mouse */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible,
.wpcf7-form-control:focus-visible {
	outline: 3px solid #ffb300;
	outline-offset: 2px;
	border-radius: 2px;
}

/* 2. Smooth, subtle hover feedback on buttons & primary links (no layout shift) */
.btn,
button,
input[type="submit"],
.wpcf7-submit,
.single_add_to_cart_button,
.button.add_to_cart_button,
.elementor-button {
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
	will-change: transform;
}
.btn:hover,
button:hover,
input[type="submit"]:hover,
.wpcf7-submit:hover,
.single_add_to_cart_button:hover,
.button.add_to_cart_button:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

/* 3. Skip-to-content link (paired with wp_body_open hook) */
.xroad-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: #111;
	color: #fff;
	padding: 12px 20px;
	border-radius: 0 0 6px 0;
	font-weight: 600;
	text-decoration: none;
}
.xroad-skip-link:focus {
	left: 0;
}

/* 4. Respect reduced-motion preference (a11y + CLS safety) */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}

/* 5. Prevent oversized media from causing horizontal scroll on small screens */
img,
video,
iframe {
	max-width: 100%;
}

/* 6. Slightly larger tap targets for footer/nav links on touch screens */
@media (max-width: 768px) {
	.footer a,
	.menu a,
	nav a {
		padding-top: 2px;
		padding-bottom: 2px;
	}
}
