/* =========================================================================
   Panel dostępności – wygląd widżetu
   ====================================================================== */

#pd-root {
	--pd-accent: #7A5F54;
	position: fixed;
	bottom: 20px;
	z-index: 2147483000;
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: 16px !important;
	line-height: 1.4 !important;
	color: #1a1a1a;
	letter-spacing: normal !important;
	word-spacing: normal !important;
}
#pd-root.pd-pos-left  { left: 20px; }
#pd-root.pd-pos-right { right: 20px; }

#pd-root *,
#pd-root *::before,
#pd-root *::after { box-sizing: border-box; }

#pd-root button {
	font-family: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	margin: 0;
	cursor: pointer;
}

#pd-root :focus-visible {
	outline: 3px solid #ff9800 !important;
	outline-offset: 2px !important;
}

/* Przycisk otwierający */
#pd-root #pd-toggle {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: var(--pd-accent) !important;
	color: #fff !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	transition: transform .15s ease;
}
#pd-root #pd-toggle:hover { transform: scale(1.07); }

/* Panel */
#pd-root #pd-panel {
	position: absolute;
	bottom: 68px;
	width: 320px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 110px);
	overflow-y: auto;
	background: #fff !important;
	color: #1a1a1a !important;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	padding: 0 0 14px;
}
#pd-root.pd-pos-left  #pd-panel { left: 0; }
#pd-root.pd-pos-right #pd-panel { right: 0; }
#pd-root #pd-panel[hidden] { display: none !important; }

#pd-root .pd-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--pd-accent) !important;
	color: #fff !important;
	padding: 12px 14px 12px 18px;
	border-radius: 14px 14px 0 0;
}
#pd-root #pd-title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	color: #fff !important;
	font-family: inherit !important;
	line-height: 1.3 !important;
}
#pd-root .pd-close {
	background: transparent !important;
	border: 0 !important;
	color: #fff !important;
	font-size: 28px !important;
	line-height: 1 !important;
	width: 36px;
	height: 36px;
	padding: 0 !important;
	border-radius: 8px;
}
#pd-root .pd-close:hover { background: rgba(255, 255, 255, .18) !important; }

/* Rozmiar tekstu */
#pd-root .pd-size {
	margin: 14px 14px 10px;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 10px;
}
#pd-root .pd-size-label {
	display: block;
	font-weight: 700;
	font-size: 15px !important;
	margin-bottom: 8px;
	color: #1a1a1a !important;
}
#pd-root .pd-size-ctrl {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
#pd-root .pd-size-btn {
	flex: 0 0 64px;
	height: 44px;
	border-radius: 8px;
	border: 2px solid var(--pd-accent) !important;
	background: #fff !important;
	color: var(--pd-accent) !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	padding: 0 !important;
}
#pd-root .pd-size-btn:hover:not(:disabled) { background: var(--pd-accent) !important; color: #fff !important; }
#pd-root .pd-size-btn:disabled { opacity: .4; cursor: not-allowed; }
#pd-root .pd-size-val { font-size: 18px !important; font-weight: 700; color: #1a1a1a !important; }

/* Kafelki opcji */
#pd-root .pd-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 0 14px;
}
#pd-root .pd-opt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 78px;
	padding: 8px 6px !important;
	border-radius: 10px;
	border: 2px solid #ddd !important;
	background: #f7f5f4 !important;
	color: #1a1a1a !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	text-align: center;
	line-height: 1.25 !important;
}
#pd-root .pd-opt:hover { border-color: var(--pd-accent) !important; }
#pd-root .pd-opt[aria-pressed="true"] {
	background: var(--pd-accent) !important;
	border-color: var(--pd-accent) !important;
	color: #fff !important;
}
#pd-root .pd-opt-icon { font-size: 20px !important; line-height: 1 !important; font-weight: 700; }

#pd-root .pd-reset {
	display: block;
	width: calc(100% - 28px);
	margin: 12px 14px 0;
	padding: 11px !important;
	border-radius: 8px;
	border: 2px solid #1a1a1a !important;
	background: #fff !important;
	color: #1a1a1a !important;
	font-size: 15px !important;
	font-weight: 700 !important;
}
#pd-root .pd-reset:hover { background: #1a1a1a !important; color: #fff !important; }

#pd-root .pd-statement {
	display: block;
	margin: 12px 14px 0;
	text-align: center;
	color: #1a1a1a !important;
	text-decoration: underline !important;
	font-size: 14px !important;
}
#pd-root .pd-statement[hidden] { display: none !important; }

@media (max-width: 480px) {
	#pd-root { bottom: 12px; }
	#pd-root.pd-pos-left  { left: 12px; }
	#pd-root.pd-pos-right { right: 12px; }
	#pd-root #pd-toggle { width: 50px; height: 50px; }
	#pd-root #pd-panel { bottom: 60px; width: calc(100vw - 24px); }
}

/* =========================================================================
   Tryby dostępności – działają na całą stronę poza widżetem
   ====================================================================== */

/* Wysoki kontrast */
html.pd-contrast body,
html.pd-contrast body *:not(#pd-root):not(#pd-root *) {
	background-color: #000 !important;
	background-image: none !important;
	color: #fff !important;
	border-color: #fff !important;
	box-shadow: none !important;
	text-shadow: none !important;
}
html.pd-contrast body a:not(#pd-root):not(#pd-root *),
html.pd-contrast body a:not(#pd-root):not(#pd-root *) *,
html.pd-contrast body button:not(#pd-root):not(#pd-root *) {
	color: #ff0 !important;
}
html.pd-contrast body .elementor-background-overlay { display: none !important; }
html.pd-contrast body svg:not(#pd-root svg) { fill: currentColor; }

/* Skala szarości */
html.pd-grayscale { filter: grayscale(100%); }

/* Podkreślone linki */
html.pd-links body a:not(#pd-root a) {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 3px !important;
}

/* Czytelna czcionka (bez psucia ikon) */
html.pd-font body *:not(#pd-root):not(#pd-root *):not(i):not([class*="icon"]):not([class*="fa-"]):not([class^="fa"]):not([class*=" fa"]):not(svg):not(svg *) {
	font-family: Verdana, Arial, Helvetica, sans-serif !important;
}

/* Większe odstępy (WCAG 1.4.12) */
html.pd-spacing body *:not(#pd-root):not(#pd-root *) {
	letter-spacing: .12em !important;
	word-spacing: .16em !important;
}
html.pd-spacing body :is(p, li, dd, dt, td, th, blockquote, figcaption, label, h1, h2, h3, h4, h5, h6):not(#pd-root *) {
	line-height: 1.6 !important;
}
html.pd-spacing body p:not(#pd-root *) { margin-bottom: 2em !important; }

/* Zatrzymane animacje */
html.pd-motion *,
html.pd-motion *::before,
html.pd-motion *::after {
	animation-duration: 0s !important;
	animation-iteration-count: 1 !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

/* Duży kursor */
html.pd-cursor,
html.pd-cursor * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3 L6 39 L15 30 L21 44 L28 41 L22 27 L35 27 Z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}
html.pd-cursor a,
html.pd-cursor a *,
html.pd-cursor button,
html.pd-cursor button *,
html.pd-cursor [role="button"],
html.pd-cursor label,
html.pd-cursor select {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3 L6 39 L15 30 L21 44 L28 41 L22 27 L35 27 Z' fill='%23ff9800' stroke='%23000' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, pointer !important;
}

/* Wyraźny fokus */
html.pd-focus body *:focus {
	outline: 4px solid #ff9800 !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 7px #000 !important;
}
