
/* WP Accessibility Plugin Styles */
#wp-acc-container {
	position: fixed;
	top: 25%;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* POSICIONAMIENTO DERECHA (Por defecto) */
#wp-acc-container.acc-pos-right {
	right: 0;
}

#wp-acc-container.acc-pos-right #wp-acc-trigger {
	border-radius: 8px 0 0 8px;
	box-shadow: -3px 3px 10px rgba(0, 0, 0, .15);
}

#wp-acc-container.acc-pos-right #wp-acc-menu {
	right: -320px;
	border-left: 3px solid #2b5bce;
	border-radius: 8px 0 0 8px;
	box-shadow: -5px 0 20px rgba(0, 0, 0, .1);
}

#wp-acc-container.acc-pos-right #wp-acc-menu.acc-open {
	right: 65px;
}

/* POSICIONAMIENTO IZQUIERDA */
#wp-acc-container.acc-pos-left {
	left: 0;
}

#wp-acc-container.acc-pos-left #wp-acc-trigger {
	border-radius: 0 8px 8px 0;
	box-shadow: 3px 3px 10px rgba(0, 0, 0, .15);
}

#wp-acc-container.acc-pos-left #wp-acc-menu {
	left: -320px;
	border-right: 3px solid #2b5bce;
	border-radius: 0 8px 8px 0;
	box-shadow: 5px 0 20px rgba(0, 0, 0, .1);
}

#wp-acc-container.acc-pos-left #wp-acc-menu.acc-open {
	left: 65px;
}

/* Botón disparador */
#wp-acc-trigger {
	background-color: #2b5bce;
	color: white;
	border: none;
	padding: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 55px;
	height: 55px;
	transition: background-color .3s ease, transform .2s ease;
}

#wp-acc-trigger:hover {
	background-color: #1e4299;
	transform: scale(1.05);
}

#wp-acc-trigger svg {
	width: 32px;
	height: 32px;
}

/* Menú lateral */
#wp-acc-menu {
	position: absolute;
	top: 0;
	width: 300px;
	background: #fff;
	transition: all .4s cubic-bezier(.175, .885, .32, 1.275);
	display: flex;
	flex-direction: column;
	max-height: 80vh;
	overflow-y: auto;
}

/* Scrollbar para el menú */
#wp-acc-menu::-webkit-scrollbar {
	width: 6px;
}

#wp-acc-menu::-webkit-scrollbar-thumb {
	background-color: #ccc;
	border-radius: 3px;
}

.wp-acc-header {
	padding: 18px 20px;
	border-bottom: 1px solid #f0f0f0;
}

.wp-acc-header h3 {
	margin: 0;
	font-size: 18px;
	color: #333;
	font-weight: bold;
}

.wp-acc-options {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wp-acc-options li {
	border-bottom: 1px solid #f9f9f9;
}

.wp-acc-btn {
	width: 100%;
	background: transparent;
	border: none;
	padding: 14px 20px;
	text-align: left;
	cursor: pointer;
	display: flex;
	align-items: center;
	font-size: 15px;
	color: #555;
	transition: all .2s ease;
}

.wp-acc-btn:hover {
	background-color: #f5f8ff;
	color: #2b5bce;
}

.wp-acc-btn.active {
	background-color: #e8efff;
	color: #2b5bce;
	border-left: 4px solid #2b5bce;
	padding-left: 16px;
	font-weight: 600;
}

/* Fix border-left jump for active state on left position */
#wp-acc-container.acc-pos-left .wp-acc-btn.active {
	border-left: none;
	border-right: 4px solid #2b5bce;
	padding-left: 20px;
	padding-right: 16px;
}

.wp-acc-icon {
	margin-right: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wp-acc-icon svg {
	width: 20px;
	height: 20px;
}

.wp-acc-footer {
	padding: 15px 20px;
	border-top: 1px solid #e0e0e0;
	background-color: #fcfcfc;
}

.wp-acc-sitemap {
	display: flex;
	align-items: center;
	text-decoration: none !important;
	color: #555;
	font-size: 15px;
	font-weight: 500;
	transition: color .2s ease;
}

.wp-acc-sitemap:hover {
	color: #2b5bce;
}

/* --- CAPA OVERLAY PARA FILTROS VISUALES (Evita el bug de scroll) --- */

/* En lugar de aplicar filter al body (lo que rompe position:fixed y causa saltos), usamos un overlay invisible */
#wp-acc-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	pointer-events: none;
	/* Deja que los clics pasen a través del overlay */
	z-index: 999998;
	/* Justo debajo del botón de accesibilidad */
	display: none;
}

body.acc-grayscale #wp-acc-overlay {
	display: block;
	backdrop-filter: grayscale(100%);
	-webkit-backdrop-filter: grayscale(100%);
}

body.acc-negative-contrast #wp-acc-overlay {
	display: block;
	backdrop-filter: invert(100%) hue-rotate(180deg);
	-webkit-backdrop-filter: invert(100%) hue-rotate(180deg);
}

/* Fallback para navegadores antiguos que no soportan backdrop-filter */
@supports not (backdrop-filter: none) {
	body.acc-grayscale {
		filter: grayscale(100%) !important;
	}
	
	body.acc-negative-contrast {
		filter: invert(100%) hue-rotate(180deg) !important;
		background-color: #000 !important;
	}
}

/* --- CLASES MODIFICADORAS TRADICIONALES --- */

/* Alto contraste (Modifica colores) */
body.acc-high-contrast {
	background-color: #000 !important;
	color: #fff !important;
}

body.acc-high-contrast * {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}

/* Fondo claro */
body.acc-light-bg {
	background-color: #fff !important;
	color: #000 !important;
}

body.acc-light-bg * {
	background-color: #fff !important;
	color: #000 !important;
}

/* Subrayar enlaces */
body.acc-underline-links a {
	text-decoration: underline !important;
}

/* Fuente legible */
body.acc-readable-font, body.acc-readable-font * {
	font-family: Arial, Helvetica, sans-serif !important;
}

/* Mantener menú visible en modos extremos */
body.acc-high-contrast #wp-acc-menu *, body.acc-light-bg #wp-acc-menu * {
	color: inherit !important;
	background-color: inherit !important;
	border-color: inherit !important;
}

body.acc-high-contrast #wp-acc-trigger svg, body.acc-light-bg #wp-acc-trigger svg {
	color: white !important;
}
