/* ===========================================================================
   Preferencias de lectura de Chile Artesanía.

   Tres botones en la barra de navegación —A−, A+ y alto contraste— y lo que
   cada ajuste cambia en la página. El color de los botones es #9A352E, el
   rojo de la marca: 7,2:1 sobre blanco.
   =========================================================================== */

.preferencias-de-lectura {
	/* inline-flex, no flex: los demas elementos de esta barra son
	   inline-block dentro de un <ul> que no es flexible, asi que un flex a
	   secas ocupaba el ancho entero y tiraba los botones a una segunda fila. */
	display: inline-flex;
	vertical-align: middle;
	align-items: center;
	gap: 6px;
	margin-left: 12px;
	padding-left: 12px;
	border-left: 1px solid rgba(0, 0, 0, 0.2);
}

.preferencias-de-lectura .preferencia {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* 40x40: por encima del minimo de 24x24 que pide 2.5.8, y a la altura de
	   los demas controles de la barra. */
	width: 40px;
	height: 40px;
	padding: 0;
	border: 2px solid #9A352E;
	border-radius: 0;
	background-color: #ffffff;
	color: #9A352E;
	font-family: inherit;
	font-size: 15px;
	line-height: 1;
	font-weight: 700;
	cursor: pointer;
}

.preferencias-de-lectura .preferencia svg {
	display: block;
}

.preferencias-de-lectura .preferencia:hover,
.preferencias-de-lectura .preferencia[aria-pressed="true"] {
	background-color: #9A352E;
	color: #ffffff;
}

/* Extremo de la escala: no hay mas que agrandar o achicar. El gris da 4,8:1
   sobre blanco — un control no disponible tampoco esta exento de leerse. */
.preferencias-de-lectura .preferencia:disabled {
	border-color: #6b6b6b;
	color: #6b6b6b;
	background-color: #ffffff;
	cursor: default;
}

.preferencias-de-lectura .preferencia:focus-visible {
	outline: 3px solid #9A352E;
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #ffffff;
}

@media (max-width: 991.98px) {
	.preferencias-de-lectura {
		margin-left: 0;
		padding-left: 0;
		border-left: 0;
	}
}

/* ---------------- tamaño del texto ----------------
   La hoja del sitio mezcla unidades: 47 declaraciones en rem y 48 en em, que
   siguen a la raiz, y 38 en px, que no. Subir la raiz mueve las primeras; las
   de px se reescalan aparte, abajo, para que el conjunto crezca junto y no a
   trozos. */

html.texto-mayor {
	font-size: 112.5%;
}

html.texto-menor {
	font-size: 87.5%;
}

/* ---------------- alto contraste ----------------
   Negro de fondo, blanco de texto, enlaces en amarillo.

   Se aplica por barrido en vez de enumerando etiquetas. Enumerar fallaba de
   dos maneras, las dos medidas con axe: las descripciones de las tarjetas
   son <div> y se quedaron fuera de la lista, y el menu superior declara su
   color con mas especificidad que `html.alto-contraste a`, asi que seguia
   en #222 sobre negro —1,31:1—. Un barrido no depende de acertar la lista.

   El !important es inevitable: la hoja del sitio viene compilada y muchas de
   sus reglas lo llevan. */

html.alto-contraste,
html.alto-contraste body {
	background-color: #000000 !important;
	color: #ffffff !important;
}

/* Todo lo que haya dentro del cuerpo: texto en blanco y sin fondo propio.
   Las imagenes y los iconos quedan fuera, que no son texto ni relleno. */
html.alto-contraste body *:not(img):not(svg):not(path):not(circle):not(g) {
	color: #ffffff !important;
	background-color: transparent !important;
	background-image: none !important;
}

/* Los enlaces se distinguen del texto corrido por color ademas de por el
   subrayado. Especificidad por encima del barrido de arriba, que si no se
   los llevaria por delante. */
html.alto-contraste body a,
html.alto-contraste body a * {
	color: #ffff00 !important;
}

/* Los enlaces de la barra superior los pinta
   `.site-header_bottom .navigation_link.text-white { color:#222!important }`,
   que con (0,3,0) e !important le gana a `html.alto-contraste body a`.
   Quedaban en #222 sobre negro: 1,31:1. Se le pasa por encima nombrando las
   mismas clases. (La regla no aparecia recorriendo document.styleSheets; la
   dio el propio navegador por CDP, preguntandole que aplica a ese nodo.) */
html.alto-contraste body .site-header a,
html.alto-contraste body .site-header a *,
html.alto-contraste body .site-header_bottom .navigation_link,
html.alto-contraste body .site-header_bottom .navigation_link.text-white,
html.alto-contraste body .navigation_link.text-white,
html.alto-contraste body .navigation_link,
html.alto-contraste body .navigation_link *,
html.alto-contraste body footer a,
html.alto-contraste body footer a * {
	color: #ffff00 !important;
}

/* Su hover y su foco al mismo nivel de especificidad que la regla de arriba:
   sin esto el enlace de la cabecera quedaba amarillo sobre el fondo amarillo
   que pone la inversion, ilegible justo al usarlo. */
html.alto-contraste body .site-header_bottom .navigation_link:hover,
html.alto-contraste body .site-header_bottom .navigation_link:focus-visible,
html.alto-contraste body .navigation_link:hover,
html.alto-contraste body .navigation_link:focus-visible,
html.alto-contraste body .navigation_link:hover *,
html.alto-contraste body .navigation_link:focus-visible * {
	color: #000000 !important;
	background-color: #ffff00 !important;
}

/* Su hover, al mismo nivel: la regla de arriba gana a la generica y sin esta
   el enlace de la cabecera quedaba amarillo sobre amarillo al pasar. */
html.alto-contraste body .site-header a:hover,
html.alto-contraste body .site-header a:focus-visible,
html.alto-contraste body .site-header a:hover *,
html.alto-contraste body .site-header a:focus-visible * {
	color: #000000 !important;
	background-color: #ffff00 !important;
}

html.alto-contraste body a:hover,
html.alto-contraste body a:focus-visible,
html.alto-contraste body a:hover *,
html.alto-contraste body a:focus-visible * {
	/* La inversion pone fondo amarillo: el texto va en negro. Con blanco
	   quedaba amarillo sobre amarillo, ilegible justo al usarlo. */
	color: #000000 !important;
	background-color: #ffff00 !important;
}

html.alto-contraste body button,
html.alto-contraste body input,
html.alto-contraste body select,
html.alto-contraste body textarea {
	background-color: #000000 !important;
	color: #ffffff !important;
	border: 1px solid #ffffff !important;
}

html.alto-contraste body input::placeholder,
html.alto-contraste body textarea::placeholder {
	color: #d0d0d0 !important;
	opacity: 1;
}

html.alto-contraste .preferencias-de-lectura {
	border-left-color: rgba(255, 255, 255, 0.5) !important;
}

html.alto-contraste body .preferencias-de-lectura .preferencia {
	background-color: #000000 !important;
	border-color: #ffffff !important;
	color: #ffffff !important;
}

html.alto-contraste body .preferencias-de-lectura .preferencia:hover,
html.alto-contraste body .preferencias-de-lectura .preferencia[aria-pressed="true"] {
	background-color: #ffffff !important;
	color: #000000 !important;
}

html.alto-contraste body .preferencias-de-lectura .preferencia:disabled {
	background-color: #000000 !important;
	border-color: #9aa0a6 !important;
	color: #9aa0a6 !important;
}

html.alto-contraste body .preferencias-de-lectura .preferencia:focus-visible {
	outline-color: #ffffff;
	box-shadow: 0 0 0 3px #000000;
}

/* ---------------- tamaño del texto: lo que esta en px ----------------
   GENERADO. Las 47 declaraciones en rem y las 48 en em siguen a la raiz
   y crecen solas; estas estan en px y no se moverian. Se reescriben una
   a una, dentro de la misma @media en la que viven: varias valen
   distinto segun el ancho y un override plano romperia esa escala.
   Se dejan fuera fancybox, dropzone y slick —son de terceros— y los
   font-size:0, que ocultan texto en vez de dimensionarlo. */

html.texto-mayor .category-card p {
	font-size: 15.75px;
}

html.texto-mayor .section-stats-items .section-stats-item .section-stats-item-text {
	font-size: 31.5px;
}

html.texto-mayor .section-stats-items .section-stats-item .section-stats-item-label {
	font-size: 18px;
}

html.texto-mayor .region-stat .region-stat-box .region-stat-box-header {
	font-size: 18px;
}

html.texto-mayor .region-stat .region-stat-box .region-stat-box-body .region-stat-box-label {
	font-size: 18px;
}

html.texto-mayor .region-stat .region-stat-box .region-stat-box-body .region-stat-box-stat {
	font-size: 31.5px;
}

html.texto-mayor ul.disc.primary li::before {
	font-size: 20.25px;
}

html.texto-mayor .form-label {
	font-size: 18px;
}

html.texto-mayor .form-checkbox_title {
	font-size: 18px;
}

html.texto-mayor .form-checkbox_range {
	font-size: 18px;
}

html.texto-mayor .form-checkbox-group_title {
	font-size: 14.62px;
}

html.texto-mayor .form-radio_label {
	font-size: 15.75px;
}

html.texto-mayor .form-note {
	font-size: 15.75px;
}

html.texto-mayor .upload-work span {
	font-size: 20.25px;
}

html.texto-mayor .calendar_day {
	font-size: 31.5px;
}

html.texto-mayor .calendar_month {
	font-size: 31.5px;
}

html.texto-mayor .news-card_main-title {
	font-size: 27px;
}

html.texto-mayor .news-card_title {
	font-size: 20.25px;
}

html.texto-mayor .news-card_place {
	font-size: 15.75px;
}

html.texto-mayor .news-card_description {
	font-size: 15.75px;
}

html.texto-mayor .result-card_title {
	font-size: 20.25px;
}

html.texto-mayor .search-box-label {
	font-size: 20.25px;
}

html.texto-mayor .search-box-results_item {
	font-size: 18px;
}

html.texto-mayor .activity-details_item {
	font-size: 18px;
}

@media (min-width: 48em) {

	html.texto-mayor .single-news_title {
		font-size: 45px;
	}

	html.texto-mayor .search-box-results_item {
		font-size: 20.25px;
	}

	html.texto-mayor .news-hero_title {
		font-size: 36px;
	}
}

@media (min-width: 62em) {

	html.texto-mayor .calendar-large .calendar_day,
	html.texto-mayor .calendar-large .calendar_month {
		font-size: 36px;
	}

	html.texto-mayor .activity-details_item {
		font-size: 20.25px;
	}
}

@media (min-width: 75em) {

	html.texto-mayor .activity-details_item {
		font-size: 27px;
	}
}

html.texto-menor .category-card p {
	font-size: 12.25px;
}

html.texto-menor .section-stats-items .section-stats-item .section-stats-item-text {
	font-size: 24.5px;
}

html.texto-menor .section-stats-items .section-stats-item .section-stats-item-label {
	font-size: 14px;
}

html.texto-menor .region-stat .region-stat-box .region-stat-box-header {
	font-size: 14px;
}

html.texto-menor .region-stat .region-stat-box .region-stat-box-body .region-stat-box-label {
	font-size: 14px;
}

html.texto-menor .region-stat .region-stat-box .region-stat-box-body .region-stat-box-stat {
	font-size: 24.5px;
}

html.texto-menor ul.disc.primary li::before {
	font-size: 15.75px;
}

html.texto-menor .form-label {
	font-size: 14px;
}

html.texto-menor .form-checkbox_title {
	font-size: 14px;
}

html.texto-menor .form-checkbox_range {
	font-size: 14px;
}

html.texto-menor .form-checkbox-group_title {
	font-size: 11.38px;
}

html.texto-menor .form-radio_label {
	font-size: 12.25px;
}

html.texto-menor .form-note {
	font-size: 12.25px;
}

html.texto-menor .upload-work span {
	font-size: 15.75px;
}

html.texto-menor .calendar_day {
	font-size: 24.5px;
}

html.texto-menor .calendar_month {
	font-size: 24.5px;
}

html.texto-menor .news-card_main-title {
	font-size: 21px;
}

html.texto-menor .news-card_title {
	font-size: 15.75px;
}

html.texto-menor .news-card_place {
	font-size: 12.25px;
}

html.texto-menor .news-card_description {
	font-size: 12.25px;
}

html.texto-menor .result-card_title {
	font-size: 15.75px;
}

html.texto-menor .search-box-label {
	font-size: 15.75px;
}

html.texto-menor .search-box-results_item {
	font-size: 14px;
}

html.texto-menor .activity-details_item {
	font-size: 14px;
}

@media (min-width: 48em) {

	html.texto-menor .single-news_title {
		font-size: 35px;
	}

	html.texto-menor .search-box-results_item {
		font-size: 15.75px;
	}

	html.texto-menor .news-hero_title {
		font-size: 28px;
	}
}

@media (min-width: 62em) {

	html.texto-menor .calendar-large .calendar_day,
	html.texto-menor .calendar-large .calendar_month {
		font-size: 28px;
	}

	html.texto-menor .activity-details_item {
		font-size: 15.75px;
	}
}

@media (min-width: 75em) {

	html.texto-menor .activity-details_item {
		font-size: 21px;
	}
}

/* Element UI, la libreria del dialogo de postulacion, fija el tamano de su
   cabecera en px desde un estilo que inyecta por JavaScript: no aparece en
   ninguna hoja del sitio y el generador de arriba no podia verlo. Se anade
   a mano, con !important porque ese estilo inyectado se carga despues. */

html.texto-mayor .el-dialog__header {
	font-size: 27px !important;
}

html.texto-menor .el-dialog__header {
	font-size: 21px !important;
}

/* Los iconos de la cabecera son archivos SVG cargados como <img>: el barrido
   de color no los alcanza, porque su color vive dentro del archivo. Sobre
   negro, la lupa roja del buscador quedaba en 2,2:1 y es el unico contenido
   de su boton, asi que le aplica el minimo de 3:1 para graficos (1.4.11).
   brightness(0) los lleva a negro solido e invert(1) a blanco: funciona sea
   cual sea su color de origen. */

html.alto-contraste .button-search img,
html.alto-contraste .navigation_link img,
html.alto-contraste .menu-trigger img {
	filter: brightness(0) invert(1);
}

/* ---------------- saltar al contenido ----------------
   Mismo color que el boton de volver al principio de este sitio: las dos son
   ayudas de navegacion y se reconocen antes si comparten aspecto. Fondo
   solido y texto blanco; el anillo de foco va blanco pegado al borde y del
   color del sitio por fuera, que es el patron del resto de la interfaz. */

.salto-al-contenido {
	background-color: #9A352E !important;
	color: #ffffff !important;
	border-color: #9A352E !important;
}

/* Solo al pasar el puntero. En :focus NO se oscurece: este enlace esta
   oculto hasta recibir el foco, asi que el estado enfocado es el unico que
   alguien llega a ver, y oscurecerlo ahi cambiaba el color del sitio por su
   variante oscura. El foco ya se anuncia con el anillo. */
.salto-al-contenido:hover {
	background-color: #7c2a24 !important;
	color: #ffffff !important;
}

/* El color se reafirma aqui porque las hojas de estos sitios ya traian un
   `.salto-al-contenido:focus` que lo oscurecia, y `:focus` (0,2,0) le gana
   al selector a secas (0,1,0). */
.salto-al-contenido:focus,
.salto-al-contenido:focus-visible {
	background-color: #9A352E !important;
	color: #ffffff !important;
	outline: 2px solid #ffffff !important;
	outline-offset: 0 !important;
	box-shadow: 0 0 0 4px #9A352E !important;
}

/* Las vistas sin cabecera montan el conmutador suelto: sin la barra que lo
   contenga necesita su propio sitio, arriba a la derecha y fuera del flujo. */
.preferencias-de-lectura.preferencias-sueltas {
	position: absolute;
	top: 8px;
	right: 12px;
	z-index: 10;
}
