Get prepared for cardiac emergencies.
CALL PUSH SHOCK at School
@import url(‘https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap’);
:root{
–router-bg: #ffffff;
–router-accent: #0f6a73;
–router-text: #333;
–router-overlay: rgba(0,0,0,.45);
–router-radius: 16px;
–router-hover: rgba(1, 183, 174, 0.25); /* 25% of #01b7ae */
}
.router-overlay{
position: fixed; inset: 0; background: var(–router-overlay);
display: none; /* CLOSED by default */
align-items: center; justify-content: center;
z-index: 99999; padding: 24px;
font-family: ‘Nunito’, sans-serif;
opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.router-overlay.open{
display: flex; /* OPEN uses flex */
opacity: 1;
pointer-events: auto;
}
.router-modal{
width: min(560px, 92vw);
background: var(–router-bg); color: var(–router-text);
border-radius: var(–router-radius);
box-shadow: 0 10px 35px rgba(0,0,0,.25);
padding: 24px 24px 16px;
position: relative;
text-align: center;
}
.router-title-main{ color:#01b7ae; font-weight:400; font-size:1.5rem; margin:0 0 4px; }
.router-title-sub{ color:#ef6966; font-weight:700; font-size:1.5rem; margin:0 0 8px; }
.router-subtext{ font-size:1.1rem; font-weight:600; margin:0 0 10px; color:var(–router-text); }
.router-options{ display:grid; gap:6px; margin:6px 0 14px; text-align:left; }
.router-option{
display:flex; align-items:center; gap:8px; border-radius:12px;
padding:6px 8px; cursor:pointer; transition: background-color .15s ease;
}
.router-option:hover{ background: var(–router-hover); }
.router-option input{ accent-color: var(–router-accent); width:18px; height:18px; }
.router-option span{ font-size:1rem; line-height:1.2; }
.router-actions{ display:flex; justify-content:flex-end; }
.router-btn{
appearance:none; border:0; border-radius:999px; padding:10px 16px; cursor:pointer;
background: var(–router-accent); color:#fff; font-weight:600; font-family:’Nunito’, sans-serif;
}
(function(){
const ROUTE_MAP = {
‘Educator or School Staff’: ‘#educators’,
‘Medical Director’: ‘#medical-directors’,
‘Principal or other Campus Leadership’: ‘#principals’,
‘Superintendent or other LEA Leadership’: ‘#superintendents’
};
const overlay = document.getElementById(‘routerOverlay’);
const form = document.getElementById(‘routerForm’);
function stickyOffset(){
const sticky = document.querySelector(‘header.elementor-sticky–active, .elementor-sticky–active’);
return sticky ? sticky.getBoundingClientRect().height : 100;
}
function smoothScrollTo(sel){
const el = document.querySelector(sel);
if(!el) return;
const y = el.getBoundingClientRect().top + window.pageYOffset – stickyOffset();
window.scrollTo({top:y, behavior:’smooth’});
}
// OPEN/CLOSE with display toggling to prevent blocking
function openModal(){
overlay.style.display = ‘flex’;
// next paint: add class for fade-in
requestAnimationFrame(()=> {
overlay.classList.add(‘open’);
overlay.setAttribute(‘aria-hidden’,’false’);
const first = form.querySelector(‘input[type=”radio”]’);
if(first) first.focus();
});
}
function closeModal(){
overlay.classList.remove(‘open’);
overlay.setAttribute(‘aria-hidden’,’true’);
// after fade, hard-hide to remove any chance of blocking
setTimeout(()=> { overlay.style.display = ‘none’; }, 220);
}
// Close when clicking outside modal or pressing ESC
overlay.addEventListener(‘click’, (e)=>{
if(e.target === overlay) closeModal();
});
document.addEventListener(‘keydown’, (e)=>{
if(e.key === ‘Escape’ && overlay.classList.contains(‘open’)) closeModal();
});
// Auto-close on radio change
form.addEventListener(‘change’, (e)=>{
const input = e.target;
if(input && input.type === ‘radio’){
const target = ROUTE_MAP[input.value];
if(target){
closeModal();
// extra safety: ensure overlay hidden before scroll finishes
setTimeout(()=> { overlay.style.display = ‘none’; }, 0);
smoothScrollTo(target);
}
}
});
// Fallback: Go button
form.addEventListener(‘submit’, (e)=>{
e.preventDefault();
const picked = form.querySelector(‘input[type=”radio”]:checked’);
if(!picked) return;
const target = ROUTE_MAP[picked.value];
if(target){
closeModal();
setTimeout(()=> { overlay.style.display = ‘none’; }, 0);
smoothScrollTo(target);
}
});
// Safety: if anything triggers scroll, hide overlay anyway
window.addEventListener(‘scroll’, ()=> {
if(!overlay.classList.contains(‘open’)) {
overlay.style.display = ‘none’;
}
}, { passive: true });
// Auto-open after 1 second
window.addEventListener(‘load’, ()=> setTimeout(openModal, 1000));
})();