/**
 * Modal do Termo de Responsabilidade — mobile-first.
 * Celular: tela cheia com rodapé fixo. A partir de 768px: card centralizado.
 */
html.wpem-termo-open,
body.wpem-termo-open {
	overflow: hidden;
}

/* Oculto por visibility (não display) para o iframe pré-carregar com dimensões reais. */
.wpem-termo-modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2147483000; /* acima do banner de cookies e de headers fixos */
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
}
.wpem-termo-modal.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}
.wpem-termo-overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.6);
}
.wpem-termo-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100vh;
	height: 100dvh; /* acompanha a barra de endereço dinâmica do celular */
	background: #fff;
	overscroll-behavior: contain;
}

.wpem-termo-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	padding-top: calc(10px + env(safe-area-inset-top));
	border-bottom: 1px solid #e5e5e5;
}
.wpem-termo-title {
	margin: 0;
	padding: 0;
	font-size: 17px;
	line-height: 1.3;
	font-weight: 700;
}
.wpem-termo-back {
	flex: 0 0 auto;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #333;
	font-size: 15px;
	cursor: pointer;
}

.wpem-termo-body {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}
.wpem-termo-iframe {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}
.wpem-termo-loading {
	position: absolute;
	top: 40%;
	left: 0;
	width: 100%;
	margin: 0;
	text-align: center;
	color: #666;
}
.wpem-termo-fallback {
	padding: 40px 20px;
	text-align: center;
}
.wpem-termo-fallback[hidden] {
	display: none;
}
.wpem-termo-fallback p {
	margin: 0 0 16px;
}

.wpem-termo-footer {
	flex: 0 0 auto;
	padding: 0 16px 12px;
	padding-bottom: calc(12px + env(safe-area-inset-bottom));
	border-top: 1px solid #e5e5e5;
	background: #fff;
}
.wpem-termo-progress {
	height: 4px;
	margin: 0 -16px;
	background: #eee;
}
.wpem-termo-progress-bar {
	display: block;
	width: 0;
	height: 100%;
	background: #2e9e4f;
	transition: width 0.2s;
}
.wpem-termo-hint {
	margin: 10px 0;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	color: #555;
}
.wpem-termo-modal .wpem-termo-accept {
	display: block;
	width: 100%;
	min-height: 52px;
	font-size: 17px;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
}
.wpem-termo-modal .wpem-termo-accept:disabled {
	background: #d5d5d5 !important;
	border-color: #d5d5d5 !important;
	color: #888 !important;
	cursor: not-allowed;
	opacity: 1;
}

@media (min-width: 768px) {
	.wpem-termo-modal {
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.wpem-termo-dialog {
		width: 90vw;
		max-width: 760px;
		height: 85vh;
		max-height: 900px;
		border-radius: 6px;
		overflow: hidden;
		box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
	}
}
