<div id="travaProfessor" style="display:none; position: fixed; z-index: 999999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); overflow: hidden;">
<div style="background-color: white; margin: 5% auto; padding: 0; border-radius: 10px; width: 90%; max-width: 700px; box-shadow: 0 5px 30px rgba(0,0,0,0.5); font-family: Arial, sans-serif;">
<div style="background: #1a5a96; color: white; padding: 20px; border-top-left-radius: 10px; border-top-right-radius: 10px; text-align: center;">
<h2 style="margin: 0; font-size: 24px;">COMUNICADO DOCENTE IMPORTANTE</h2>
</div>
<div style="padding: 30px; color: #333; line-height: 1.6; max-height: 60vh; overflow-y: auto;">
<p>Prezado(a) Professor(a),</p>
<p>Este é um aviso obrigatório para todos os docentes referente ao semestre letivo <strong>2026.1</strong>.</p>
<ul style="text-align: left; background: #f9f9f9; padding: 15px 40px; border-left: 5px solid #1a5a96;">
<li>Prazo para entrega dos planos de ensino: 15/02.</li>
<li>Lançamento de frequências deve ser semanal.</li>
<li>Capacitação obrigatória disponível no painel.</li>
</ul>
<p style="color: #d9534f; font-weight: bold;">⚠️ O acesso ao painel de cursos requer a confirmação abaixo.</p>
</div>
<div style="padding: 20px; border-top: 1px solid #eee; text-align: center;">
<label style="display: block; margin-bottom: 15px; cursor: pointer;">
<input type="checkbox" id="checkCienciaProf" style="transform: scale(1.3); margin-right: 10px;">
<strong>ESTOU CIENTE DAS ORIENTAÇÕES ACIMA</strong>
</label>
<button id="btnConfirmarProf" disabled onclick="liberarAcessoProf()" style="background-color: #ccc; color: white; border: none; padding: 15px 40px; border-radius: 5px; cursor: not-allowed; font-weight: bold; font-size: 16px; transition: 0.3s;">
CONFIRMAR E ACESSAR O SISTEMA
</button>
</div>
</div>
</div>
<script>
// Inicia o bloqueio
document.addEventListener("DOMContentLoaded", function() {
var modal = document.getElementById('travaProfessor');
modal.style.display = 'block';
document.body.style.overflow = 'hidden'; // Trava o scroll da página
// Habilita/Desabilita o botão baseado no checkbox
var checkbox = document.getElementById('checkCienciaProf');
var btn = document.getElementById('btnConfirmarProf');
checkbox.addEventListener('change', function() {
if(this.checked) {
btn.disabled = false;
btn.style.backgroundColor = '#1a5a96';
btn.style.cursor = 'pointer';
} else {
btn.disabled = true;
btn.style.backgroundColor = '#ccc';
btn.style.cursor = 'not-allowed';
}
});
});
// Função para fechar e liberar o site
function liberarAcessoProf() {
document.getElementById('travaProfessor').style.display = 'none';
document.body.style.overflow = 'auto'; // Devolve o scroll ao usuário
}
</script>