/* BSG - Accessibility Widget - Frontend Styles */

#bsg11y-widget {
	direction: rtl;
	text-align: right;
	font-family: inherit;
	--bsg11y-btn-size: 56px;
	--bsg11y-btn-color: #1e8e5a;
	--bsg11y-icon-color: #ffffff;
	--bsg11y-bottom: 24px;
	--bsg11y-side: 24px;
	--bsg11y-panel-width: 380px;
	--bsg11y-radius: 2px;
	--bsg11y-option-radius: 2px;
	--bsg11y-accent: #1e8e5a;
	--bsg11y-panel-bg: #ffffff;
	--bsg11y-panel-text: #1a1a1a;
	--bsg11y-border-color: #e5e5e5;
}

#bsg11y-widget,
#bsg11y-widget * {
	box-sizing: border-box;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	letter-spacing: normal;
	word-spacing: normal;
}

#bsg11y-widget .bsg11y-toggle-btn {
	position: fixed;
	bottom: var(--bsg11y-bottom, 24px);
	width: var(--bsg11y-btn-size, 56px);
	height: var(--bsg11y-btn-size, 56px);
	border-radius: 50% !important;
	background-color: var(--bsg11y-btn-color, #1e8e5a) !important;
	background-image: none !important;
	border: none !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
	z-index: 999999;
	padding: 0;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#bsg11y-widget[data-position="left"] .bsg11y-toggle-btn {
	left: var(--bsg11y-side, 24px);
	right: auto;
}

#bsg11y-widget[data-position="right"] .bsg11y-toggle-btn {
	right: var(--bsg11y-side, 24px);
	left: auto;
}

#bsg11y-widget .bsg11y-toggle-btn svg circle,
#bsg11y-widget .bsg11y-toggle-btn svg path {
	fill: var(--bsg11y-icon-color, #ffffff) !important;
	stroke: none !important;
}

#bsg11y-widget .bsg11y-toggle-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

#bsg11y-widget .bsg11y-toggle-btn:focus-visible {
	outline: 3px solid var(--bsg11y-accent, #1e8e5a);
	outline-offset: 3px;
}

#bsg11y-widget .bsg11y-panel {
	position: fixed;
	bottom: calc(var(--bsg11y-bottom, 24px) + var(--bsg11y-btn-size, 56px) + 6px);
	width: var(--bsg11y-panel-width, 380px);
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 76px);
	background: var(--bsg11y-panel-bg, #ffffff);
	color: var(--bsg11y-panel-text, #1a1a1a);
	border-radius: var(--bsg11y-radius, 18px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
	z-index: 999999;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

#bsg11y-widget .bsg11y-panel::-webkit-scrollbar {
	width: 0 !important;
	height: 0 !important;
	display: none !important;
}

#bsg11y-widget[data-position="left"] .bsg11y-panel {
	left: var(--bsg11y-side, 24px);
	right: auto;
}

#bsg11y-widget[data-position="right"] .bsg11y-panel {
	right: var(--bsg11y-side, 24px);
	left: auto;
}

#bsg11y-widget .bsg11y-panel[hidden] {
	display: none;
}

#bsg11y-widget .bsg11y-panel-header {
	position: sticky;
	top: 0;
	background: var(--bsg11y-panel-bg, #ffffff);
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 14px 18px 10px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	z-index: 1;
}

#bsg11y-widget .bsg11y-panel-heading h2 {
	margin: 0 0 3px;
	font-size: 17px;
	font-weight: 700;
	color: var(--bsg11y-panel-text, #1a1a1a);
}

#bsg11y-widget .bsg11y-panel-desc {
	margin: 0;
	font-size: 12.5px;
	color: var(--bsg11y-panel-text, #1a1a1a);
	opacity: 0.7;
}

#bsg11y-widget .bsg11y-close-btn {
	background: rgba(0, 0, 0, 0.06) !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 50% !important;
	width: 32px;
	height: 32px;
	min-width: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--bsg11y-panel-text, #333333) !important;
	text-transform: none !important;
}

#bsg11y-widget .bsg11y-close-btn:hover {
	background: rgba(0, 0, 0, 0.1) !important;
}

#bsg11y-widget .bsg11y-close-btn svg {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	min-height: 18px !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	overflow: visible !important;
}

#bsg11y-widget .bsg11y-close-btn svg path {
	fill: var(--bsg11y-panel-text, #333333) !important;
	stroke: none !important;
	visibility: visible !important;
	opacity: 1 !important;
}

#bsg11y-widget .bsg11y-close-btn:focus-visible,
#bsg11y-widget .bsg11y-option:focus-visible,
#bsg11y-widget .bsg11y-font-btn:focus-visible,
#bsg11y-widget .bsg11y-reset-btn:focus-visible {
	outline: 3px solid var(--bsg11y-accent, #1e8e5a);
	outline-offset: 2px;
}

#bsg11y-widget .bsg11y-panel-body {
	padding: 12px 18px 16px;
}

#bsg11y-widget .bsg11y-section {
	margin-bottom: 10px;
}

#bsg11y-widget .bsg11y-section-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--bsg11y-panel-text, #1a1a1a);
	margin: 0 0 7px;
}

#bsg11y-widget .bsg11y-grid {
	display: grid;
	gap: 7px;
}

#bsg11y-widget .bsg11y-grid-2 {
	grid-template-columns: 1fr 1fr;
}

#bsg11y-widget .bsg11y-option {
	background: rgba(0, 0, 0, 0.04) !important;
	border: 1.5px solid var(--bsg11y-border-color, #e5e5e5) !important;
	border-radius: var(--bsg11y-option-radius, 14px) !important;
	box-shadow: none !important;
	padding: 8px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--bsg11y-panel-text, #262626) !important;
	cursor: pointer;
	text-align: center;
	text-transform: none !important;
	letter-spacing: normal !important;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#bsg11y-widget .bsg11y-option:hover {
	background: rgba(0, 0, 0, 0.07) !important;
}

#bsg11y-widget .bsg11y-option[aria-pressed="true"] {
	background: var(--bsg11y-accent, #1e8e5a) !important;
	border-color: var(--bsg11y-accent, #1e8e5a) !important;
	color: #ffffff !important;
}

#bsg11y-widget .bsg11y-fontsize-control {
	display: flex;
	align-items: center;
	gap: 10px;
}

#bsg11y-widget .bsg11y-font-btn {
	width: 40px;
	height: 40px;
	min-width: 40px;
	border-radius: var(--bsg11y-option-radius, 14px) !important;
	border: 1.5px solid var(--bsg11y-border-color, #e5e5e5) !important;
	background: rgba(0, 0, 0, 0.04) !important;
	box-shadow: none !important;
	font-size: 20px;
	font-weight: 700;
	cursor: pointer;
	color: var(--bsg11y-panel-text, #262626) !important;
	text-transform: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 1 !important;
	padding: 0 !important;
}

#bsg11y-widget .bsg11y-font-btn:hover {
	background: rgba(0, 0, 0, 0.07) !important;
}

#bsg11y-widget .bsg11y-font-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

#bsg11y-widget .bsg11y-font-value {
	flex: 1;
	text-align: center;
	background: rgba(0, 0, 0, 0.04);
	border-radius: var(--bsg11y-option-radius, 14px);
	padding: 9px 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--bsg11y-panel-text, #1a1a1a);
}

#bsg11y-widget .bsg11y-reset-btn {
	width: 100%;
	margin-top: 2px;
	background: #fdecec !important;
	color: #c0392b !important;
	border: 1.5px solid #f6cccc !important;
	box-shadow: none !important;
	border-radius: var(--bsg11y-option-radius, 14px) !important;
	padding: 10px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	text-transform: none !important;
}

#bsg11y-widget .bsg11y-reset-btn:hover {
	background: #fbdada !important;
}

#bsg11y-reading-guide {
	position: fixed;
	left: 0;
	top: 50%;
	width: 100%;
	height: 32px;
	background: rgba(30, 142, 90, 0.18);
	border-top: 2px solid var(--bsg11y-accent, #1e8e5a);
	border-bottom: 2px solid var(--bsg11y-accent, #1e8e5a);
	pointer-events: none;
	z-index: 999998;
}

#bsg11y-reading-guide[hidden] {
	display: none;
}

@media (max-width: 480px) {
	#bsg11y-widget .bsg11y-toggle-btn {
		bottom: 16px;
		width: 50px;
		height: 50px;
	}

	#bsg11y-widget[data-position="left"] .bsg11y-toggle-btn { left: 16px; }
	#bsg11y-widget[data-position="right"] .bsg11y-toggle-btn { right: 16px; }

	#bsg11y-widget .bsg11y-panel {
		bottom: 78px;
		width: auto;
		max-width: calc(100vw - 16px);
		max-height: calc(100vh - 100px);
	}

	#bsg11y-widget[data-position="left"] .bsg11y-panel { left: 8px; }
	#bsg11y-widget[data-position="right"] .bsg11y-panel { right: 8px; }
}

@media (max-height: 720px) {
	#bsg11y-widget .bsg11y-panel {
		top: 10px;
		bottom: 10px;
		max-height: none;
	}
}

/* Site effects */
html.bsg11y-high-contrast body {
	background: #000000 !important;
	color: #ffffff !important;
}

html.bsg11y-high-contrast body :where(p, span, li, td, th, label, h1, h2, h3, h4, h5, h6, dt, dd) {
	color: #ffffff !important;
}

html.bsg11y-high-contrast body a {
	color: #ffd60a !important;
	text-decoration: underline !important;
}

html.bsg11y-high-contrast body :where(input, select, textarea) {
	background-color: #000000 !important;
	color: #ffffff !important;
	border: 2px solid #ffffff !important;
}

html.bsg11y-dark-mode body {
	background: #121212 !important;
	color: #f0f0f0 !important;
}

html.bsg11y-dark-mode body :where(p, span, li, td, th, label, h1, h2, h3, h4, h5, h6, dt, dd) {
	color: #f0f0f0 !important;
}

html.bsg11y-dark-mode body a { color: #7fd3ff !important; }

html.bsg11y-dark-mode body :where(input, select, textarea) {
	background-color: #1e1e1e !important;
	color: #f0f0f0 !important;
	border-color: #3a3a3a !important;
}

/* Keep the widget visually isolated from site-wide contrast modes. */
html.bsg11y-high-contrast #bsg11y-widget .bsg11y-toggle-btn,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-toggle-btn {
	background-color: var(--bsg11y-btn-color, #1e8e5a) !important;
	color: var(--bsg11y-icon-color, #ffffff) !important;
	border: none !important;
}

html.bsg11y-high-contrast #bsg11y-widget .bsg11y-panel,
html.bsg11y-high-contrast #bsg11y-widget .bsg11y-panel-header,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-panel,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-panel-header {
	background-color: var(--bsg11y-panel-bg, #ffffff) !important;
	color: var(--bsg11y-panel-text, #1a1a1a) !important;
}

html.bsg11y-high-contrast #bsg11y-widget :where(h2, h3, p, span),
html.bsg11y-dark-mode #bsg11y-widget :where(h2, h3, p, span) {
	color: var(--bsg11y-panel-text, #1a1a1a) !important;
}

html.bsg11y-high-contrast #bsg11y-widget .bsg11y-option,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-option {
	background-color: rgba(0, 0, 0, 0.04) !important;
	color: var(--bsg11y-panel-text, #262626) !important;
	border: 1.5px solid var(--bsg11y-border-color, #e5e5e5) !important;
}

html.bsg11y-high-contrast #bsg11y-widget .bsg11y-option[aria-pressed="true"],
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-option[aria-pressed="true"] {
	background-color: var(--bsg11y-accent, #1e8e5a) !important;
	color: #ffffff !important;
	border-color: var(--bsg11y-accent, #1e8e5a) !important;
}

html.bsg11y-high-contrast #bsg11y-widget .bsg11y-font-btn,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-font-btn {
	background: rgba(0, 0, 0, 0.04) !important;
	color: var(--bsg11y-panel-text, #262626) !important;
	border: 1.5px solid var(--bsg11y-border-color, #e5e5e5) !important;
}

html.bsg11y-grayscale body > *:not(#bsg11y-widget):not(#bsg11y-reading-guide) {
	filter: grayscale(100%) !important;
}

html.bsg11y-readable-font body {
	font-family: Arial, Tahoma, "Segoe UI", sans-serif !important;
}

html.bsg11y-readable-font #bsg11y-widget,
html.bsg11y-readable-font #bsg11y-widget * {
	font-family: var(--bsg11y-site-font, sans-serif) !important;
}

html.bsg11y-text-spacing body {
	letter-spacing: 0.06em !important;
	word-spacing: 0.15em !important;
	line-height: 1.7 !important;
}

html.bsg11y-highlight-links a {
	text-decoration: underline !important;
	outline: 2px solid currentColor !important;
	outline-offset: 2px !important;
	font-weight: 700 !important;
}

html.bsg11y-focus-highlight *:focus {
	outline: 3px solid #ff6a00 !important;
	outline-offset: 2px !important;
}

html.bsg11y-reduce-motion *,
html.bsg11y-reduce-motion *::before,
html.bsg11y-reduce-motion *::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

html.bsg11y-hide-images img,
html.bsg11y-hide-images picture,
html.bsg11y-hide-images video {
	visibility: hidden !important;
}

html.bsg11y-hide-images #bsg11y-widget svg {
	visibility: visible !important;
}

html.bsg11y-big-cursor body {
	cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24"><path d="M4 2l14 8-6 2-2 6z" fill="black" stroke="white" stroke-width="1.5"/></svg>') 4 4, auto !important;
}

html.bsg11y-highlight-headings :where(h1, h2, h3, h4, h5, h6) {
	background: #fff3cd !important;
	color: #1a1a1a !important;
	outline: 2px dashed #e0a800 !important;
	outline-offset: 2px !important;
}

html.bsg11y-highlight-headings #bsg11y-widget h2,
html.bsg11y-highlight-headings #bsg11y-widget h3 {
	background: transparent !important;
	color: var(--bsg11y-panel-text, #1a1a1a) !important;
	outline: none !important;
}


/* v1.3.4: keep the accessibility UI visually stable while page-wide display
   modes affect only the underlying site content. */
html.bsg11y-high-contrast #bsg11y-widget,
html.bsg11y-high-contrast #bsg11y-widget *,
html.bsg11y-dark-mode #bsg11y-widget,
html.bsg11y-dark-mode #bsg11y-widget * {
	color: revert;
}

html.bsg11y-high-contrast #bsg11y-widget .bsg11y-panel-desc,
html.bsg11y-high-contrast #bsg11y-widget .bsg11y-font-value,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-panel-desc,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-font-value {
	color: var(--bsg11y-panel-text, #1a1a1a) !important;
}

html.bsg11y-high-contrast #bsg11y-widget .bsg11y-font-btn,
html.bsg11y-high-contrast #bsg11y-widget .bsg11y-reset-btn,
html.bsg11y-high-contrast #bsg11y-widget .bsg11y-close-btn,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-font-btn,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-reset-btn,
html.bsg11y-dark-mode #bsg11y-widget .bsg11y-close-btn {
	border-width: initial;
}


/* v1.3.6: sharper site-aligned geometry */
#bsg11y-widget .bsg11y-panel {
	border-radius: var(--bsg11y-radius, 2px) !important;
}

#bsg11y-widget .bsg11y-option,
#bsg11y-widget .bsg11y-font-btn,
#bsg11y-widget .bsg11y-font-value,
#bsg11y-widget .bsg11y-reset-btn {
	border-radius: var(--bsg11y-option-radius, 2px) !important;
}
