/* Custom CSS for the background image */

:root {
	--altura-aba-acessibilidade: 200px;
}


/* Nova acessibilidade */


#acessibilidade {
	position: fixed;
	top: 50%;
	left: 0;

	transform: translateY(-50%);

	display: flex;

	height: 200px;
	width: 100%;
	max-width: 32px;
	box-sizing: border-box;

	border-top-right-radius: 10px;
	border-bottom-right-radius: 10px;

	background: #000000d0;
	backdrop-filter: blur(40px);
	overflow: hidden;
	cursor: pointer;
	z-index: 999;
	transition: height var(--delay-default), max-width var(--delay-default);

	&:hover,
	&.acessibilidade-expandida {
		height: var(--altura-aba-acessibilidade);
		max-width: 250px;
	}

	.aba-acessibilidade {
		display: flex;
		justify-content: center;
		align-items: center;

		width: 32px;
		height: 100%;

		background: #0092DD;
		color: white;

		z-index: 2;
	}

	ul.opcoes-acessibilidade {
		display: flex;
		align-items: center;
		flex-direction: column;
		justify-content: center;

		position: absolute;

		width: 0px;
		height: min-content;
		box-sizing: border-box;

		margin: 0;
		padding-left: 32px;

		list-style: none;
		overflow: hidden;

		li.opcao-acessibilidade {
			width: 100%;
			height: min-content;

			.link-acessibilidade {
				display: flex;
				align-items: center;
				gap: 20px;

				width: 100%;
				min-height: 40px;

				border: none;
				padding-left: 15px;
				padding-block: 5px;
				outline: none;

				color: white;
				text-decoration: none;
				text-wrap-mode: nowrap;
				text-align: start;

				background-color: transparent;
				transition: var(--delay-default);

				.titulo-acessibilidade {
					font-size: 0.8rem;
					margin: 0;
					color: inherit;
				}

				.tecla-atalho {
					font-size: 0.7rem;
					color: inherit;
				}

				&:hover,
				&:focus {
					background: white;
					color: black;
				}

				&:active {
					scale: unset;
				}
			}
		}
	}

	&:hover .opcoes-acessibilidade,
	&.acessibilidade-expandida .opcoes-acessibilidade {
		width: 100%;
	}
}

/* ---- Modal (sem Bootstrap): controlada pela classe .aberta via JS) ---- */

.modal-customizada {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1050;

	align-items: center;
	justify-content: center;

	padding: 20px;
	box-sizing: border-box;

	background: rgba(0, 0, 0, 0.55);
	overflow-y: auto;
}

.modal-customizada.aberta {
	display: flex;
}

.modal-customizada .modal-dialog {
	width: 100%;
	max-width: 800px;
	margin: auto;
}

.modal-customizada .modal-content {
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

.modal-customizada .modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;

	padding: 16px 24px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-customizada .modal-header h4 {
	margin: 0;
}

.modal-customizada .botao-fechar-modal {
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 1.5rem;
	line-height: 1;
	color: inherit;
}

.modal-customizada .modal-body {
	padding: 24px;
	max-height: 70vh;
	overflow-y: auto;
}

body.modal-aberta-no-scroll {
	overflow: hidden;
}

#modalAcessibilidade {

	p, .item-lista {
		color: var(--cor-fonte-secundaria, #444);
	}

	ul.list-text {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	code {
		background-color: var(--cor-fundo-contraste, #eee);
		border-radius: 5px;
		padding: 0 .35rem;
	}
}

/* ---- Alto contraste (acionado por body.contraste) ---- */

body.contraste {
	background: #000 !important;
	color: #fff !important;
}

body.contraste a,
body.contraste a * {
	color: #ff0 !important;
}

body.contraste h1,
body.contraste h2,
body.contraste h3,
body.contraste h4,
body.contraste h5,
body.contraste h6,
body.contraste p,
body.contraste span,
body.contraste li,
body.contraste strong,
body.contraste em {
	color: #fff !important;
}

body.contraste img {
	filter: grayscale(1) contrast(1.2);
}

/* A modal continua legível no modo contraste */
body.contraste .modal-customizada .modal-content {
	background: #000 !important;
	border: 1px solid #fff;
}

body.contraste .modal-customizada .modal-content,
body.contraste .modal-customizada .modal-content * {
	color: #fff !important;
}

#acessbilidadeVlibras {
	transition: var(--delay-default);
}

.esconder-vlibras {
	opacity: 0;
	pointer-events: none;
}

@media (max-width: 1344px) {
	.img-header {
		background-size: cover !important;
	}

}

@media (max-width: 1230px) {
	#acessibilidade {
		opacity: 0.2;

		&:hover,
		&:focus,
		&.acessibilidade-expandida {
			opacity: 1;
		}
	}
}

@media (max-width: 700px) {
	#acessibilidade {
		top: unset;
		left: 50%;
		bottom: 0;
		transform: translateX(-50%);

		flex-direction: column-reverse;

		width: 100%;
		max-width: 230px;
		height: 40px;

		border-radius: 15px 15px 0 0;

		&:hover,
		&.acessibilidade-expandida {
			height: calc(var(--altura-aba-acessibilidade));
			max-width: 250px;
		}

		.aba-acessibilidade {
			width: 100%;
			height: 40px;
		}

		ul.opcoes-acessibilidade {
			padding-left: 0px;
			padding-bottom: 40px;
		}
	}
}