/* Font size: real zoom scale, since Elementor hard-codes font-size in
   px per widget (not derived from html { font-size }), so a root-font
   change would not visibly scale it. See design doc for why zoom was
   chosen over selector-override. */
html.farhang-a11y-font-115 {
	zoom: 115%;
}

html.farhang-a11y-font-130 {
	zoom: 130%;
}

/* Contrast: filter invert, for the same reason (no reusable color
   variables exist in Elementor's compiled per-post CSS to override).
   Media gets inverted a second time so it displays normally instead
   of as a negative image. */
html.farhang-a11y-contrast {
	filter: invert(1) hue-rotate(180deg);
}

html.farhang-a11y-contrast img,
html.farhang-a11y-contrast video,
html.farhang-a11y-contrast iframe {
	filter: invert(1) hue-rotate(180deg);
}

/* Reduced motion: disable all animation/transition, instant scrolling. */
html.farhang-a11y-reduced-motion,
html.farhang-a11y-reduced-motion * {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

/* Floating trigger button */
.farhang-a11y-button {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: none;
	background: #171f5b;
	color: #fff;
	font-size: 20px;
	line-height: 48px;
	text-align: center;
	cursor: pointer;
	padding: 0;
}

.farhang-a11y-button:focus-visible {
	outline: 3px solid #171f5b;
	outline-offset: 2px;
}

/* Popover panel */
.farhang-a11y-panel {
	position: fixed;
	right: 20px;
	bottom: 78px;
	z-index: 99999;
	width: 260px;
	background: #fff;
	color: #171f5b;
	border: 1px solid #ccc;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	padding: 16px;
}

.farhang-a11y-panel[hidden] {
	display: none;
}

.farhang-a11y-panel button:focus-visible {
	outline: 2px solid #171f5b;
	outline-offset: 2px;
}

.farhang-a11y-panel h2 {
	font-size: 16px;
	margin: 0 0 12px;
}

.farhang-a11y-panel fieldset {
	border: none;
	padding: 0;
	margin: 0 0 12px;
}

.farhang-a11y-panel legend {
	font-size: 13px;
	font-weight: bold;
	padding: 0 0 6px;
}

.farhang-a11y-font-group {
	display: flex;
	gap: 6px;
}

.farhang-a11y-font-group button {
	flex: 1;
	padding: 6px 0;
	border: 1px solid #171f5b;
	background: #fff;
	color: #171f5b;
	cursor: pointer;
}

.farhang-a11y-font-group button[aria-pressed="true"] {
	background: #171f5b;
	color: #fff;
}

.farhang-a11y-switch-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.farhang-a11y-switch-row button[role="switch"] {
	width: 40px;
	height: 22px;
	border-radius: 11px;
	border: 1px solid #171f5b;
	background: #fff;
	cursor: pointer;
	position: relative;
}

.farhang-a11y-switch-row button[role="switch"][aria-checked="true"] {
	background: #171f5b;
}

.farhang-a11y-reset {
	width: 100%;
	padding: 8px 0;
	border: 1px solid #171f5b;
	background: #fff;
	color: #171f5b;
	cursor: pointer;
}

.farhang-a11y-close {
	position: absolute;
	top: 8px;
	right: 8px;
	border: none;
	background: none;
	font-size: 16px;
	cursor: pointer;
	color: #171f5b;
}
