/* —— Barra de accesibilidad —— */
.jursoc-a11y {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 100000;
	font-family: inherit;
}

.jursoc-a11y__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 1rem;
	border: 2px solid #003366;
	border-radius: 999px;
	background: #003366;
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 8px 28px rgba(0, 51, 102, 0.35);
	transition: transform 0.2s, background 0.2s;
}

.jursoc-a11y__toggle:hover,
.jursoc-a11y__toggle:focus-visible {
	background: #004080;
	transform: translateY( -2px );
}

.jursoc-a11y__toggle:focus-visible {
	outline: 3px solid #c9a227;
	outline-offset: 3px;
}

.jursoc-a11y__toggle-icon {
	flex-shrink: 0;
}

.jursoc-a11y__panel {
	position: absolute;
	right: 0;
	bottom: calc( 100% + 0.65rem );
	width: min( 340px, calc( 100vw - 2rem ) );
	max-height: min( 70vh, 520px );
	overflow-y: auto;
	padding: 1rem 1.1rem 1.15rem;
	background: #fff;
	border: 2px solid #003366;
	border-radius: 14px;
	box-shadow: 0 16px 48px rgba(0, 33, 71, 0.2);
	color: #0f172a;
}

.jursoc-a11y__panel[hidden] {
	display: none !important;
}

.jursoc-a11y__panel-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.65rem;
}

.jursoc-a11y__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	color: #003366;
	line-height: 1.3;
}

.jursoc-a11y__close {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 8px;
	background: #f1f5f9;
	color: #003366;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.jursoc-a11y__close:hover,
.jursoc-a11y__close:focus-visible {
	background: #e2e8f0;
}

.jursoc-a11y__help {
	margin: 0 0 1rem;
	font-size: 0.82rem;
	line-height: 1.5;
	color: #475569;
}

.jursoc-a11y__group {
	margin-bottom: 1rem;
}

.jursoc-a11y__group-title {
	margin: 0 0 0.5rem;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #64748b;
	font-weight: 600;
}

.jursoc-a11y__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.jursoc-a11y__btn {
	flex: 1 1 auto;
	min-width: calc( 50% - 0.25rem );
	padding: 0.5rem 0.65rem;
	border: 2px solid #003366;
	border-radius: 8px;
	background: #003366;
	color: #fff;
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.jursoc-a11y__btn:hover:not(:disabled),
.jursoc-a11y__btn:focus-visible:not(:disabled) {
	background: #004080;
}

.jursoc-a11y__btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.jursoc-a11y__btn--secondary {
	background: #fff;
	color: #003366;
}

.jursoc-a11y__btn--secondary[aria-pressed="true"] {
	background: #eef3f9;
	border-color: #c9a227;
}

.jursoc-a11y__btn:focus-visible,
.jursoc-a11y__close:focus-visible {
	outline: 3px solid #c9a227;
	outline-offset: 2px;
}

.jursoc-a11y__rate {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-top: 0.65rem;
	font-size: 0.8rem;
	font-weight: 500;
}

.jursoc-a11y__rate input {
	width: 100%;
	accent-color: #003366;
}

.jursoc-a11y__voice {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-top: 0.65rem;
	font-size: 0.8rem;
	font-weight: 500;
}

.jursoc-a11y__voice-select {
	width: 100%;
	padding: 0.45rem 0.5rem;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.8rem;
	color: #0f172a;
	background: #fff;
}

.jursoc-a11y__live {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* —— Preferencias globales —— */
html.jursoc-a11y-font-lg {
	font-size: 112.5%;
}

html.jursoc-a11y-font-xl {
	font-size: 125%;
}

html.jursoc-a11y-underline-links a {
	text-decoration: underline !important;
	text-underline-offset: 0.15em;
}

html.jursoc-a11y-high-contrast {
	--jursoc-a11y-bg: #000;
	--jursoc-a11y-fg: #fff;
	--jursoc-a11y-link: #ffeb3b;
}

html.jursoc-a11y-high-contrast body {
	background: var(--jursoc-a11y-bg) !important;
	color: var(--jursoc-a11y-fg) !important;
}

html.jursoc-a11y-high-contrast .site-header,
html.jursoc-a11y-high-contrast #masthead {
	background: #000 !important;
	border-bottom: 2px solid #fff !important;
}

html.jursoc-a11y-high-contrast a {
	color: var(--jursoc-a11y-link) !important;
}

html.jursoc-a11y-high-contrast .jursoc-hero,
html.jursoc-a11y-high-contrast .jursoc-hero__band {
	background: #000 !important;
	border: 2px solid #fff;
}

html.jursoc-a11y-high-contrast .jursoc-news-rotator__title,
html.jursoc-a11y-high-contrast .jursoc-news-rotator__body {
	color: #fff !important;
	background: #000 !important;
}

html.jursoc-a11y-high-contrast .jursoc-filter-pill,
html.jursoc-a11y-high-contrast .jursoc-noticia-card {
	border: 2px solid #fff !important;
	background: #111 !important;
	color: #fff !important;
}

html.jursoc-a11y-high-contrast .jursoc-a11y__panel {
	background: #000;
	color: #fff;
	border-color: #fff;
}

html.jursoc-a11y-high-contrast .jursoc-a11y__btn--secondary {
	background: #111;
	color: #fff;
	border-color: #fff;
}

/* Foco visible en todo el sitio */
.jursoc-a11y-enabled :focus-visible {
	outline: 3px solid #c9a227;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.jursoc-a11y {
		right: 0.75rem;
		bottom: 0.75rem;
	}

	.jursoc-a11y__toggle-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.jursoc-a11y__toggle {
		transition: none;
	}
}
