/* ============================================
   ACCESSIBILITY WIDGET + SCROLL TO TOP
   2026-09-24: πορτάρισμα από το θέμα "Tekton Domi" (του ίδιου πελάτη),
   assets/css/accessibility.css -- προσαρμοσμένο στο δικό μας design system
   (βλ. :root στο main.css): οι δικές του CSS variable ονομασίες (--card,
   --primary, --muted-fg, --font-sans, και το hardcoded hover-χρώμα #d26a2e)
   αντικαταστάθηκαν με τα MEANDROS custom properties (var(...) με hex
   fallback, ίδιο μοτίβο με το epilysystems-cookie-consent plugin) ώστε να
   μένουν πάντα σε συγχρονισμό με τη θεματολογία του site.
   ============================================ */

.a11y-root {
	position: fixed;
	bottom: 1.5rem;
	z-index: 999;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	pointer-events: none;
}

/* ── Κοινό στυλ κουμπιών ── */
.a11y-toggle,
.scroll-top {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--border, rgba(130, 172, 186, 0.2));
	background: var(--panel, #013450);
	color: var(--accent, #ff7900);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	pointer-events: all;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
	transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s, transform 0.2s;
	position: fixed;
	bottom: 1.5rem;
}

.a11y-toggle:hover,
.scroll-top:hover {
	background: var(--highlight, #ff9c42);
	color: var(--accent-foreground, #03192e);
	border-color: var(--highlight, #ff9c42);
}

/* Θέσεις */
.a11y-toggle { left: 1.5rem; }
.scroll-top  { right: 1.5rem; }

/* Και τα δύο κουμπιά κρυφά αρχικά -- εμφανίζονται μαζί κατά το scroll */
.a11y-toggle,
.scroll-top {
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
}
.a11y-toggle.visible,
.scroll-top.visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: all;
}

/* ── Πάνελ προσβασιμότητας ── */
.a11y-panel {
	position: fixed;
	bottom: 4.5rem;
	left: 1.5rem;
	width: 260px;
	background: var(--panel, #013450);
	border: 1px solid var(--border, rgba(130, 172, 186, 0.2));
	border-radius: 0;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
	z-index: 1000;
	pointer-events: all;
	animation: a11y-fade-in 0.18s ease;
}

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

@keyframes a11y-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.a11y-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.875rem 1rem;
	border-bottom: 1px solid var(--border, rgba(130, 172, 186, 0.2));
	font-family: var(--font-body, "Hind", sans-serif);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted-foreground, #7794a3);
}

.a11y-close {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--muted-foreground, #7794a3);
	display: flex;
	align-items: center;
	padding: 2px;
	border-radius: 3px;
	transition: color 0.15s;
}
.a11y-close:hover { color: var(--foreground, #e8f0f3); }

.a11y-panel-body { padding: 0.75rem 0; }

.a11y-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.625rem 1rem;
	gap: 1rem;
}

.a11y-label {
	font-family: var(--font-body, "Hind", sans-serif);
	font-size: 0.8125rem;
	color: var(--foreground, #e8f0f3);
	line-height: 1.3;
}

/* Κουμπιά μεγέθους κειμένου */
.a11y-controls {
	display: flex;
	gap: 4px;
}

.a11y-btn {
	width: 30px;
	height: 28px;
	border: 1px solid var(--border, rgba(130, 172, 186, 0.2));
	background: var(--background, #03192e);
	border-radius: 3px;
	font-family: var(--font-body, "Hind", sans-serif);
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--accent, #ff7900);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
}
.a11y-btn:hover {
	background: var(--accent, #ff7900);
	color: var(--accent-foreground, #03192e);
	border-color: var(--accent, #ff7900);
}

/* Toggle switch */
.a11y-toggle-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.a11y-toggle-track {
	display: block;
	width: 36px;
	height: 20px;
	background: var(--border, rgba(130, 172, 186, 0.2));
	border-radius: 10px;
	position: relative;
	transition: background 0.2s;
}

.a11y-toggle-thumb {
	display: block;
	width: 14px;
	height: 14px;
	background: #fff;
	border-radius: 50%;
	position: absolute;
	top: 3px;
	left: 3px;
	transition: transform 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.a11y-toggle-btn[aria-pressed="true"] .a11y-toggle-track {
	background: var(--accent, #ff7900);
}
.a11y-toggle-btn[aria-pressed="true"] .a11y-toggle-thumb {
	transform: translateX(16px);
}

/* ── Λειτουργίες προσβασιμότητας ── */

/* Υψηλή αντίθεση -- εφαρμόζεται στο html, το widget μένει καθαρό μέσω isolation */
.a11y-high-contrast {
	filter: contrast(1.6) brightness(0.92);
}

/* Το widget μένει πάντα καθαρό ανεξαρτήτως filters */
.a11y-root,
.a11y-root * {
	filter: none !important;
	-webkit-filter: none !important;
}

/* Γραμματοσειρά δυσλεξίας */
.a11y-dyslexia body,
.a11y-dyslexia * {
	font-family: 'OpenDyslexic', var(--font-body, "Hind", sans-serif) !important;
	letter-spacing: 0.05em !important;
	word-spacing: 0.1em !important;
	line-height: 1.8 !important;
}

/* Παύση animations */
.a11y-no-animations *,
.a11y-no-animations *::before,
.a11y-no-animations *::after {
	animation-duration: 0.001ms !important;
	transition-duration: 0.001ms !important;
}

/* ── Προσαρμογές mobile ── */
@media (max-width: 640px) {
	.a11y-toggle { left: 1rem; bottom: 1rem; }
	.scroll-top  { right: 1rem; bottom: 1rem; }
	.a11y-panel  { left: 1rem; width: calc(100vw - 2rem); bottom: 4rem; }
}
