/**
 * Eureka WCAG — panel użytkownika (ikona + panel).
 */

.eureka-wcag-toolbar {
	--ewc-bg: var(--eureka-foreground, #0e2341);
	--ewc-bg-panel: #111f38;
	--ewc-primary: var(--eureka-primary, #dd0a54);
	--ewc-text: #fff;
	--ewc-muted: rgba(255, 255, 255, 0.72);
	--ewc-radius: 0.75rem;
	--ewc-toggle-size: 3rem;
	--ewc-edge: 1rem;
	--ewc-gap: 0.75rem;
	box-sizing: border-box;
	position: fixed;
	z-index: 1000020;
	right: var(--ewc-edge);
	bottom: var(--ewc-edge);
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.12s ease, visibility 0.12s ease;
}

.eureka-wcag-toolbar.is-ready {
	opacity: 1;
	visibility: visible;
}

.eureka-wcag-toolbar *,
.eureka-wcag-toolbar *::before,
.eureka-wcag-toolbar *::after {
	box-sizing: border-box;
}

@media (min-width: 992px) {
	.eureka-wcag-toolbar {
		--ewc-edge: 9px;
		top: auto;
	}
}

.eureka-wcag-toolbar__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ewc-primary);
	color: #fff;
	box-shadow: 0 4px 18px rgba(184, 15, 53, 0.35);
	cursor: pointer;
	line-height: 0;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.eureka-wcag-toolbar__toggle svg {
	display: block;
	flex-shrink: 0;
	width: 2.375rem;
	height: 2.375rem;
	margin: 0;
}

.eureka-wcag-toolbar__toggle:hover,
.eureka-wcag-toolbar__toggle:focus-visible {
	transform: scale(1.05);
	box-shadow: 0 6px 22px rgba(184, 15, 53, 0.45);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.eureka-wcag-toolbar.is-open .eureka-wcag-toolbar__toggle {
	background: var(--ewc-bg);
}

.eureka-wcag-toolbar__panel {
	position: fixed;
	right: var(--ewc-edge);
	bottom: calc(var(--ewc-edge) + var(--ewc-toggle-size) + var(--ewc-gap));
	top: auto;
	left: auto;
	z-index: 1000021;
	width: min(18rem, calc(100vw - (2 * var(--ewc-edge))));
	max-height: min(
		32rem,
		calc(100dvh - var(--ewc-edge) - var(--ewc-toggle-size) - var(--ewc-gap) - 1rem)
	);
	overflow: auto;
	background: var(--ewc-bg-panel);
	color: var(--ewc-text);
	border-radius: var(--ewc-radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.eureka-wcag-toolbar.is-open .eureka-wcag-toolbar__panel {
	visibility: visible;
}

.eureka-wcag-toolbar__panel[hidden] {
	display: none !important;
}

.eureka-wcag-toolbar__header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	position: sticky;
	top: 0;
	background: var(--ewc-bg-panel);
	z-index: 1;
}

.eureka-wcag-toolbar__title {
	flex: 1;
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
}

.eureka-wcag-toolbar__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 0.375rem;
	background: transparent;
	color: var(--ewc-text);
	cursor: pointer;
}

.eureka-wcag-toolbar__icon-btn:hover,
.eureka-wcag-toolbar__icon-btn:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	outline: none;
}

.eureka-wcag-toolbar__list {
	list-style: none;
	margin: 0;
	padding: 0.5rem;
}

.eureka-wcag-toolbar__item {
	margin: 0;
}

.eureka-wcag-toolbar__btn {
	display: block;
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 0;
	border-radius: 0.5rem;
	background: transparent;
	color: var(--ewc-text);
	text-align: left;
	font-size: 0.875rem;
	cursor: pointer;
	transition: background 0.12s ease;
}

.eureka-wcag-toolbar__btn:hover,
.eureka-wcag-toolbar__btn:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	outline: none;
}

.eureka-wcag-toolbar__btn.is-active {
	background: var(--ewc-primary);
	font-weight: 600;
}

.eureka-wcag-toolbar__btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.eureka-wcag-toolbar__item--slider {
	padding: 0.35rem 0.75rem;
}

.eureka-wcag-toolbar__slider {
	display: grid;
	grid-template-columns: 1fr auto auto;
	grid-template-rows: auto auto;
	gap: 0.35rem 0.5rem;
	align-items: center;
	font-size: 0.8125rem;
}

.eureka-wcag-toolbar__slider-label {
	grid-column: 1 / -1;
	color: var(--ewc-muted);
}

.eureka-wcag-toolbar__slider-value {
	font-weight: 700;
	min-width: 3rem;
	text-align: right;
}

.eureka-wcag-toolbar__step {
	width: 2rem;
	height: 2rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 0.375rem;
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
}

.eureka-wcag-toolbar__step:hover,
.eureka-wcag-toolbar__step:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	outline: none;
}

body.modal-open .eureka-wcag-toolbar,
body.eureka-atc-modal-open .eureka-wcag-toolbar {
	z-index: 1035;
}

@media (max-width: 991.98px) {
	body:has(.eureka-wcag-toolbar.is-open) .site {
		padding-bottom: 4.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eureka-wcag-toolbar,
	.eureka-wcag-toolbar__toggle {
		transition: none;
	}
}

/* --- Efekty na stronie --- */

html.eureka-wcag-highlight-links a.ewc-link {
	outline: 2px solid #ff7216 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 1px rgba(255, 114, 22, 0.45) !important;
}

html.eureka-wcag-highlight-titles :is(h1, h2, h3, h4, h5, h6).ewc-title {
	outline: 2px solid #639af9 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 1px rgba(99, 154, 249, 0.45) !important;
}

html.eureka-wcag-dark-contrast .ewc-contrast,
html.eureka-wcag-light-contrast .ewc-contrast {
	background-color: transparent !important;
	box-shadow: none !important;
	text-shadow: none !important;
}

html.eureka-wcag-dark-contrast .ewc-contrast {
	background-color: #000 !important;
	border-color: #fff !important;
	color: #fff !important;
}

html.eureka-wcag-dark-contrast .ewc-contrast:empty {
	background-color: transparent !important;
	border-color: transparent !important;
}

html.eureka-wcag-dark-contrast :is(h1, h2, h3, h4, h5, h6).ewc-contrast {
	color: #50d0a0 !important;
}

html.eureka-wcag-dark-contrast a.ewc-contrast {
	color: #fcff3c !important;
	text-decoration: underline !important;
}

html.eureka-wcag-dark-contrast a.ewc-contrast:hover,
html.eureka-wcag-dark-contrast a.ewc-contrast:focus-visible {
	text-decoration: none !important;
}

html.eureka-wcag-dark-contrast :is(button, input[type='button'], input[type='submit'], .btn).ewc-contrast {
	background-color: #fff !important;
	border-color: #fff !important;
	color: #000 !important;
}

html.eureka-wcag-dark-contrast :is(button, input[type='button'], input[type='submit'], .btn).ewc-contrast:hover,
html.eureka-wcag-dark-contrast :is(button, input[type='button'], input[type='submit'], .btn).ewc-contrast:focus-visible {
	background-color: #000 !important;
	border-color: #fff !important;
	color: #fff !important;
}

html.eureka-wcag-dark-contrast :is(input, select, textarea).ewc-contrast {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}

html.eureka-wcag-dark-contrast .ewc-contrast svg {
	fill: currentColor !important;
	stroke: currentColor !important;
}

html.eureka-wcag-light-contrast .ewc-contrast {
	background-color: #fff !important;
	border-color: #000 !important;
	color: #000 !important;
}

html.eureka-wcag-light-contrast .ewc-contrast:empty {
	background-color: transparent !important;
	border-color: transparent !important;
}

html.eureka-wcag-light-contrast :is(h1, h2, h3, h4, h5, h6).ewc-contrast {
	color: #0000d3 !important;
}

html.eureka-wcag-light-contrast a.ewc-contrast {
	color: #0000d3 !important;
	text-decoration: underline !important;
}

html.eureka-wcag-light-contrast a.ewc-contrast:hover,
html.eureka-wcag-light-contrast a.ewc-contrast:focus-visible {
	text-decoration: none !important;
}

html.eureka-wcag-light-contrast :is(button, input[type='button'], input[type='submit'], .btn).ewc-contrast {
	background-color: #000 !important;
	border-color: #000 !important;
	color: #fff !important;
}

html.eureka-wcag-light-contrast :is(button, input[type='button'], input[type='submit'], .btn).ewc-contrast:hover,
html.eureka-wcag-light-contrast :is(button, input[type='button'], input[type='submit'], .btn).ewc-contrast:focus-visible {
	background-color: #fff !important;
	border-color: #000 !important;
	color: #000 !important;
}

html.eureka-wcag-light-contrast :is(input, select, textarea).ewc-contrast {
	background-color: #fff !important;
	color: #000 !important;
	border-color: #000 !important;
}

/* Statystyki — jedna karta, bez podwójnych ramek w trybach kontrastu */
html.eureka-wcag-dark-contrast .eureka-directions-stat-chip.ewc-contrast,
html.eureka-wcag-dark-contrast .eureka-hero-stats__item.ewc-contrast {
	background-color: #000 !important;
	border: 1px solid #fff !important;
	color: #fff !important;
}

html.eureka-wcag-light-contrast .eureka-directions-stat-chip.ewc-contrast,
html.eureka-wcag-light-contrast .eureka-hero-stats__item.ewc-contrast {
	background-color: #fff !important;
	border: 1px solid #000 !important;
	color: #000 !important;
}

html.eureka-wcag-dark-contrast :is(.eureka-directions-stat-chip, .eureka-hero-stats__item).ewc-contrast :is(p, span, i),
html.eureka-wcag-light-contrast :is(.eureka-directions-stat-chip, .eureka-hero-stats__item).ewc-contrast :is(p, span, i) {
	background: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	color: inherit !important;
}

html.eureka-wcag-read-mode :is(
	.site-header,
	.eureka-site-header,
	.eureka-topbar,
	.eureka-footer,
	.eureka-footer-bottom,
	nav.navbar,
	.eureka-mobile-nav,
	aside,
	footer
) {
	display: none !important;
}

html.eureka-wcag-read-mode main#main {
	max-width: 42rem;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 2rem 1.25rem !important;
	font-family: Georgia, 'Times New Roman', serif !important;
	line-height: 1.7 !important;
}

html.eureka-wcag-font-size {
	font-size: calc(100% * var(--eureka-wcag-font-scale, 1)) !important;
}

html.eureka-wcag-line-height body {
	line-height: calc(1.5 * var(--eureka-wcag-line-scale, 1)) !important;
}

html.eureka-wcag-letter-spacing body {
	letter-spacing: calc(0.02em * var(--eureka-wcag-letter-scale, 1)) !important;
}

.eureka-wcag-reader-highlight {
	outline: 3px solid #fdf901 !important;
	outline-offset: 3px !important;
}

/* Nie stosuj efektów do panelu */
html[class*='eureka-wcag-'] .eureka-wcag-toolbar,
html[class*='eureka-wcag-'] .eureka-wcag-toolbar * {
	filter: none !important;
}
