/* Widget Styles: Accessibility Dock & Assistive Cards (FSD: widgets/accessibility-dock) */

/* Tokens de Customização do Dock de Acessibilidade */
:root {
	--fc-a11y-dock-size: 42px;
	--fc-a11y-dock-radius: 8px;
	--fc-a11y-dock-gap: 6px;
	--fc-a11y-dock-right: 10px;
	--fc-a11y-dock-bg: linear-gradient(135deg, #3690fa 0%, #2266d2 100%);
	--fc-a11y-dock-shadow: 0 4px 12px rgba(20, 102, 204, 0.35);
	--fc-a11y-dock-icon-size: 22px;
	--fc-a11y-dock-vlibras-size: 28px;
	--fc-a11y-drawer-width: 320px;
	--fc-a11y-drawer-right: 64px;
}

/* Container do Dock Flutuante Lateral */
.fc-a11y-dock {
	position: fixed;
	right: var(--fc-a11y-dock-right);
	top: 50%;
	transform: translateY(-50%);
	z-index: 99990;
	display: flex;
	flex-direction: column;
	gap: var(--fc-a11y-dock-gap);
	align-items: center;
	margin: 0;
	padding: 0;
}

/* Cards Individuais de Acessibilidade e Libras */
.fc-a11y-dock__card {
	width: var(--fc-a11y-dock-size);
	height: var(--fc-a11y-dock-size);
	background: var(--fc-a11y-dock-bg);
	color: #FFFFFF;
	border: none !important;
	border-radius: var(--fc-a11y-dock-radius);
	outline: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	margin: 0;
	box-shadow: var(--fc-a11y-dock-shadow);
	transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
	text-decoration: none;
}

.fc-a11y-dock__card svg {
	width: var(--fc-a11y-dock-icon-size, 22px);
	height: var(--fc-a11y-dock-icon-size, 22px);
	display: block;
	pointer-events: none;
}

#fc-a11y-vlibras-btn svg,
.fc-a11y-dock__card--vlibras svg {
	width: var(--fc-a11y-dock-vlibras-size, 28px);
	height: var(--fc-a11y-dock-vlibras-size, 28px);
}

.fc-a11y-dock__card:hover,
.fc-a11y-dock__card[aria-expanded="true"] {
	filter: brightness(1.12);
	transform: scale(1.06);
	box-shadow: 0 6px 16px rgba(20, 102, 204, 0.45);
}

.fc-a11y-dock__card:focus-visible {
	outline: 2px solid #FFFFFF !important;
	outline-offset: 2px;
}

/* Oculta o botão duplicado padrão gerado pelo script do VLibras */
#vlibras-access-wrapper {
	display: none !important;
}

div[vw].enabled {
	display: none !important;
}

/* Painel Lateral de Recursos de Acessibilidade (Drawer) */
.fc-a11y-drawer {
	position: fixed;
	right: var(--fc-a11y-drawer-right);
	top: 50%;
	transform: translateY(-50%);
	z-index: 99995;
	width: var(--fc-a11y-drawer-width);
	max-width: calc(100vw - 75px);
	background: var(--card, #121826);
	color: var(--foreground, #FFFFFF);
	border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
	border-radius: 16px;
	box-shadow: 0 20px 48px rgba(0, 15, 40, 0.4);
	overflow: hidden;
}

.fc-a11y-drawer[hidden],
.fc-reading-guide-bar[hidden] {
	display: none !important;
}

.fc-a11y-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	background: linear-gradient(135deg, #3690fa 0%, #2266d2 100%);
	color: #FFFFFF;
}

.fc-a11y-drawer__brand {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.92rem;
	font-weight: 600;
}

.fc-a11y-drawer__badge {
	font-size: 1.1rem;
}

.fc-a11y-drawer__close {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.18);
	color: #FFFFFF;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
}

.fc-a11y-drawer__close:hover {
	background: rgba(255, 255, 255, 0.32);
}

.fc-a11y-drawer__body {
	padding: 16px 18px;
}

.fc-a11y-section-label {
	font-size: 0.7rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted-foreground, #94A3B8);
	margin-bottom: 8px;
}

.fc-a11y-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}

.fc-a11y-card-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 10px 8px;
	border-radius: 10px;
	border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
	background: var(--background, #0B0F17);
	color: var(--foreground, #FFFFFF);
	cursor: pointer;
	transition: all 0.2s ease;
}

.fc-a11y-card-btn:hover,
.fc-a11y-card-btn[aria-pressed="true"] {
	background: #2563EB;
	border-color: #2563EB;
	color: #FFFFFF;
}

.fc-a11y-card-btn__icon {
	font-size: 1.05rem;
	font-weight: 800;
}

.fc-a11y-card-btn__label {
	font-size: 0.74rem;
	font-weight: 600;
}

.fc-a11y-reset-btn {
	width: 100%;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
	background: var(--secondary, #1E293B);
	color: var(--foreground, #FFFFFF);
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.fc-a11y-reset-btn:hover {
	background: var(--border, rgba(255, 255, 255, 0.2));
}

/* Régua Guia de Leitura */
.fc-reading-guide-bar {
	position: fixed;
	left: 0;
	right: 0;
	height: 36px;
	background: rgba(212, 160, 62, 0.22);
	border-top: 2px solid #003A8C;
	border-bottom: 2px solid #D4A03E;
	pointer-events: none;
	z-index: 99980;
}

/* Modos de Acessibilidade Assistiva */

/* 1. Alto Contraste WCAG 2.1 AA */
body.is-high-contrast {
	--background: #000000 !important;
	--foreground: #FFFFFF !important;
	--card: #0D0D0D !important;
	--card-foreground: #FFFFFF !important;
	--primary: #FFD700 !important;
	--primary-foreground: #000000 !important;
	--secondary: #141414 !important;
	--muted-foreground: #E2E8F0 !important;
	--border: #FFD700 !important;
}

/* 2. Espaçamento Amplo */
body.is-wide-spacing,
body.is-wide-spacing p,
body.is-wide-spacing li,
body.is-wide-spacing h1,
body.is-wide-spacing h2,
body.is-wide-spacing h3 {
	letter-spacing: 0.06em !important;
	line-height: 1.9 !important;
}

/* 3. Fonte Legível / Dislexia */
body.is-dyslexic-font {
	font-family: Arial, Helvetica, sans-serif !important;
	letter-spacing: 0.03em !important;
	font-weight: 500 !important;
}

/* 4. Destaque de Links */
body.is-highlight-links a {
	outline: 2px solid #D4A03E !important;
	outline-offset: 2px !important;
	text-decoration: underline !important;
}
