/* Atomicamente Tablet 14 — base responsiva para equipamentos com toque.
   Aplicado apenas a html.atomic-tablet, por detecção local; sem alterar desktop. */
html.atomic-tablet { --at-purple:#7c3aed; --at-purple-pale:#f4efff; --at-rail-width:80px; --at-tap:44px; }
html.atomic-tablet, html.atomic-tablet body { max-width:100%; }
html.atomic-tablet body { overflow-x:clip; -webkit-tap-highlight-color:transparent; }
html.atomic-tablet :is(button,a,input,select,textarea,[role="button"]):focus-visible { outline:3px solid #a78bfa;outline-offset:2px; }
html.atomic-tablet :is(button,[role="button"],summary) { touch-action:manipulation; }
html.atomic-tablet :is(img,svg,video,canvas) { max-width:100%; }
html.atomic-tablet :is(input,select,textarea) { min-width:0; }
html.atomic-tablet :is(.modal-box,.lab-modal,.card,.card-admin,.section-card,.questao-card) { max-width:100%; box-sizing:border-box; }
html.atomic-tablet :is(.modal-overlay,.lab-modal-backdrop) { padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) !important; }
html.atomic-tablet :is(.btn-fechar-janela,.panel-close,.modal-fechar,.modal-heading button) { min-width:44px; min-height:44px; }
/* A área ocupada pelo título é controlada pela janela, não pela barra de URL do navegador. */
html.atomic-tablet header.header-site .nav-container { min-height:59px;gap:10px;padding-inline:clamp(12px,2vw,22px); }
html.atomic-tablet header.header-site .nav-actions { gap:7px;min-width:0; }
html.atomic-tablet header.header-site .nav-actions :is(a,button) { min-height:40px; }
html.atomic-tablet header.header-site .marca { min-width:0; }
html.atomic-tablet header.header-site .marca img { max-height:35px; }
/* Navegação lateral do estudante, apenas em tablet e quando autenticado. */
.atomic-tablet-rail { display:none; }
html.atomic-tablet body.atomic-tablet-rail-enabled .atomic-tablet-rail {
  position:fixed;z-index:920;display:flex;flex-direction:column;gap:5px;
  left:max(8px,env(safe-area-inset-left));top:50%;transform:translateY(-50%);
  width:var(--at-rail-width);padding:9px 7px;
  background:var(--bg-card,#fff);color:var(--texto-principal,#18243a);
  border:1px solid var(--borda,#e2e8f0);border-radius:21px;
  box-shadow:0 16px 40px rgba(38,22,75,.14);max-height:calc(100dvh - 95px);
  overflow-y:auto;overscroll-behavior:contain;
}
html.atomic-tablet .atomic-tablet-rail a {text-decoration:none;min-height:61px;display:flex;align-items:center;justify-content:center;gap:3px;flex-direction:column;padding:6px 2px;border-radius:13px;color:var(--texto-secundario,#64748b);font-weight:750;font-size:10px;transition:background .18s,color .18s;}
html.atomic-tablet .atomic-tablet-rail a svg {width:21px;height:21px;flex-shrink:0;}
html.atomic-tablet .atomic-tablet-rail a.is-active {background:rgba(124,58,237,.10);color:var(--roxo-base,#7c3aed);}
html.atomic-tablet .atomic-tablet-rail a:focus-visible {outline:3px solid #a78bfa;}
html.atomic-tablet body.atomic-tablet-rail-enabled > :is(.container,main.container,.hub-layout-grid,.perfil-container,.layout-prova,.container-simulado,.container-resultado,.admin-container) {
  box-sizing:border-box;max-width:none;width:auto;margin-left:calc(var(--at-rail-width) + 22px)!important;margin-right:clamp(16px,2vw,32px)!important;
}
html.atomic-tablet body.atomic-tablet-rail-enabled > main:not(.container):not(.layout-imersivo) { max-width:calc(100% - var(--at-rail-width) - 30px);margin-left:calc(var(--at-rail-width) + 22px); }
html.atomic-tablet body.atomic-tablet-rail-enabled .atomic-bottom-nav { display:none!important; }
html.atomic-tablet.atomic-tablet-narrow .atomic-tablet-rail {display:none!important;}
/* Em dispositivos de 7" o menu do app pode ficar no rodapé; fontes e botões são confortáveis. */
html.atomic-tablet.atomic-tablet-narrow .atomic-bottom-nav {z-index:980;}
html.atomic-tablet body.atomic-tablet-tool-open .atomic-tablet-rail {opacity:0;pointer-events:none;}
html.atomic-tablet .atomic-tablet-rail svg {max-width:none;}
@media(max-width:900px){
  html.atomic-tablet header.header-site .nav-actions {gap:5px;}
  html.atomic-tablet header.header-site :is(.btn-gerenciar,.btn-meu-perfil) {padding-inline:10px;}
}
@media(max-width:700px){
  html.atomic-tablet header.header-site .marca {min-width:0;}
  html.atomic-tablet body > :is(.container,main.container,.hub-layout-grid,.perfil-container,.layout-prova,.container-simulado,.container-resultado) {margin-left:0!important;margin-right:0!important;}
}
@media(prefers-reduced-motion:reduce){html.atomic-tablet .atomic-tablet-rail a {transition:none;}}

/* Faixa transitória de largura 641–699 px em tablet compacto. */
html.atomic-tablet .atomic-tablet-bottom-bridge {position:fixed;z-index:980;left:0;right:0;bottom:0;display:flex;justify-content:space-around;gap:3px;padding:7px 8px calc(7px + env(safe-area-inset-bottom));background:var(--bg-card,#fff);border-top:1px solid var(--borda,#e2e8f0);box-shadow:0 -9px 25px #24134a1c;}
html.atomic-tablet .atomic-tablet-bottom-bridge a {text-decoration:none;flex:1;min-width:0;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--texto-secundario,#64748b);font-size:10px;font-weight:750;border-radius:10px;}
html.atomic-tablet .atomic-tablet-bottom-bridge a svg {width:21px;height:21px;flex-shrink:0;}
html.atomic-tablet .atomic-tablet-bottom-bridge a.is-active {color:var(--roxo-base,#7c3aed);background:rgba(124,58,237,.09);}
html.atomic-tablet body.atomic-tablet-bridge-enabled {padding-bottom:calc(68px + env(safe-area-inset-bottom));}
html.atomic-tablet body.atomic-tablet-tool-open .atomic-tablet-bottom-bridge {display:none!important;}
