/**
 * WCAG 2.1 — skip link, reduced motion, DJ-Accessibility, kontrast stopki.
 */

/* --- Skip link (WCAG 2.4.1) --- */
.eureka-skip-link {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100001;
	padding: 0.65rem 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #fff;
	background: var(--eureka-foreground, #0e2341);
	border-radius: 0.5rem;
	box-shadow: 0 4px 16px rgba(14, 35, 65, 0.25);
	text-decoration: none;
	transform: translateY(-200%);
	transition: transform 0.15s ease;
}

.eureka-skip-link:focus,
.eureka-skip-link:focus-visible {
	transform: translateY(0);
	outline: none;
	box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--eureka-primary, #b80f35) 40%, transparent),
		0 4px 16px rgba(14, 35, 65, 0.25);
}

/* --- Reduced motion (WCAG 2.3.3) --- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.eureka-skip-link {
		transition: none;
	}
}

/* --- Kontrast stopki: white-50 → ~4.6:1 na navy --- */
.eureka-footer .text-white-50,
.eureka-footer-bottom.text-white-50,
.eureka-footer-bottom .text-white-50 {
	color: rgba(255, 255, 255, 0.78) !important;
}

.eureka-footer-bottom__link,
.eureka-footer-bottom .nav a {
	color: rgba(255, 255, 255, 0.78);
}

.eureka-footer-bottom__link:hover,
.eureka-footer-bottom__link:focus-visible,
.eureka-footer-bottom .nav a:hover,
.eureka-footer-bottom .nav a:focus-visible {
	color: #fff;
	opacity: 1;
}

/* --- Kontrast linków akcentowych w stopce: #b80f35 → ~4.6:1 na navy --- */
.eureka-footer .eureka-footer-nav__link--accent,
.eureka-footer .eureka-footer-nav__link--accent:hover,
.eureka-footer .eureka-footer-nav__link--accent:focus-visible {
	color: #ff8fab;
	opacity: 1;
}

/* --- DJ-Accessibility: z-index pod modalami motywu --- */
.djacc.djacc--sticky {
	z-index: 1040 !important;
}

/* Mobile: przycisk w prawym dolnym rogu (desktop bez zmian) */
@media (max-width: 991.98px) {
	.djacc.djacc--sticky.djacc--top-right,
	.djacc.djacc--sticky.djacc--top-left,
	.djacc.djacc--sticky.djacc--top-center,
	.djacc.djacc--sticky.djacc--center-right {
		top: auto !important;
		bottom: 0 !important;
		right: 0 !important;
		left: auto !important;
		transform: none !important;
	}

	body:has(.djacc--sticky.djacc-popup) .site {
		padding-bottom: 4.5rem;
	}
}

body.modal-open .djacc.djacc--sticky,
body.eureka-atc-modal-open .djacc.djacc--sticky {
	z-index: 1035 !important;
}

/* Padding przy przycisku DJ w lewym dolnym rogu */
body:has(.djacc--bottom-left.djacc--sticky) .site {
	padding-bottom: 3.5rem;
}

@media (min-width: 992px) {
	body:has(.djacc--bottom-left.djacc--sticky) .site,
	body:has(.djacc--sticky.djacc-popup) .site {
		padding-bottom: 0;
	}
}

/* --- WooCommerce: błędy pól checkout --- */
.woocommerce-checkout .woocommerce-invalid input.input-text,
.woocommerce-checkout .woocommerce-invalid select,
.woocommerce-checkout .woocommerce-invalid textarea,
.woocommerce-checkout .woocommerce-invalid .select2-container--default .select2-selection--single,
.woocommerce-checkout .woocommerce-invalid-select2.select2-container--default .select2-selection--single {
	border-color: var(--bs-danger, #dc3545) !important;
}

.woocommerce-checkout .woocommerce-invalid label {
	color: var(--bs-danger, #dc3545);
}

/* --- Region live (visually hidden) --- */
.eureka-a11y-live {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
