/**
 * Botão flutuante de emergência (só abaixo de 768px) e painel em <dialog>.
 */

.fc-sos {
	display: none;
}

@media (max-width: 767.98px) {

	/* Espaço no fim da página para o botão não cobrir o rodapé. */
	body {
		padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
	}

	.fc-sos {
		position: fixed;
		z-index: 90;
		left: 50%;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		transform: translateX(-50%);
		display: inline-flex;
		align-items: center;
		gap: 0.625rem;
		min-height: 52px;
		padding: 0.5rem 1.5rem 0.5rem 0.625rem;
		border: 2px solid var(--wp--preset--color--preto);
		border-radius: 999px;
		background: var(--wp--preset--color--amarelo);
		color: var(--wp--preset--color--preto);
		box-shadow: 0 6px 20px rgb(0 0 0 / 35%);
		font-family: var(--wp--preset--font-family--barlow-condensed);
		font-size: 1.125rem;
		font-weight: 800;
		letter-spacing: 0.02em;
		text-decoration: none;
		text-transform: uppercase;
		white-space: nowrap;
	}

	.fc-sos:focus-visible {
		outline: 3px solid var(--wp--preset--color--preto);
		outline-offset: 3px;
		box-shadow: 0 0 0 7px var(--wp--preset--color--amarelo);
	}
}

.fc-sos__sinal {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--wp--preset--color--preto);
	color: var(--wp--preset--color--amarelo);
	font-size: 1.25rem;
	line-height: 1;
}

/* ---------- Painel ---------- */

.fc-sos-painel {
	width: 100%;
	max-width: 560px;
	max-height: calc(100dvh - 24px);
	margin: auto auto 0;
	padding: 0;
	border: 0;
	border-top: 8px solid var(--wp--preset--color--preto);
	border-radius: 12px 12px 0 0;
	background: var(--wp--preset--color--amarelo);
	color: var(--wp--preset--color--preto);
	overflow: auto;
	overscroll-behavior: contain;
}

.fc-sos-painel::backdrop {
	background: rgb(21 21 21 / 75%);
}

.fc-sos-painel__conteudo {
	position: relative;
	padding: 1.5rem 20px calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.fc-sos-painel__fechar {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--preto);
	cursor: pointer;
}

.fc-sos-painel__titulo {
	margin: 0 3rem 1.25rem 0;
	font-size: 2rem;
	color: var(--wp--preset--color--preto);
}

.fc-sos-painel__telefones {
	display: grid;
	gap: 0.625rem;
}

.fc-sos-painel__telefone {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 0.5rem 1rem;
	border-radius: var(--wp--custom--raio);
	background: var(--wp--preset--color--preto);
	color: var(--wp--preset--color--amarelo);
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: 1.375rem;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}

.fc-sos-painel__subtitulo {
	margin: 1.5rem 0 0.5rem;
	font-size: 1.375rem;
	color: var(--wp--preset--color--preto);
}

.fc-sos-lista {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fc-sos-lista li {
	position: relative;
	margin-block: 0.5rem;
	padding-left: 2em;
	font-size: 1rem;
	line-height: 1.4;
}

.fc-sos-lista li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.05em;
	width: 1.4em;
	height: 1.4em;
	background: url(../icons/x-preto.svg) center / contain no-repeat;
}

.fc-sos-lista--faca li::before {
	background-image: url(../icons/check-preto.svg);
}

.fc-sos-painel__mais {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	margin-top: 1rem;
	color: var(--wp--preset--color--preto);
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: 1.125rem;
	font-weight: 700;
	text-transform: uppercase;
}

/* Foco visível dentro do painel amarelo: anel preto. */
.fc-sos-painel :focus-visible {
	outline: 3px solid var(--wp--preset--color--preto);
	outline-offset: 3px;
	box-shadow: 0 0 0 6px var(--wp--preset--color--amarelo);
}

@media (prefers-reduced-motion: no-preference) {

	.fc-sos-painel[open] {
		animation: fc-sos-sobe 0.2s ease-out;
	}

	@keyframes fc-sos-sobe {

		from {
			transform: translateY(24px);
			opacity: 0;
		}
	}
}
