/*
 * The student's area (templates/layout/site.view.php): what the app adds to the
 * engine's own stylesheet (assets/ensino/estilo.css) — the account at the top,
 * the modal notice and the "Entrar como…" bar. Uses the engine's tokens
 * (--fundo, --texto, --destaque…), so light and dark follow the site.
 */

/* ---- The account, at the right of the top bar ---- */
.conta-do-aluno { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.conta-do-aluno .troca-de-area { margin-left: 0; }
.conta-nome { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texto-suave); font-size: .875rem; font-weight: 600; }
.conta-sair { margin: 0; }
.conta-sair button { background: transparent; font-family: inherit; cursor: pointer; }
@media (max-width: 720px) {
    .conta-nome { display: none; }
    .conta-do-aluno .troca-de-area { padding: 6px 11px; }
    .conta-do-aluno .troca-de-area .icone { display: none; }
}
/* On a narrow phone, a logged-in header has no room for the name of the site beside the account: the mark stays. */
@media (max-width: 480px) {
    .topo-interno:has(.conta-sair) .marca-nome { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---- The login wall inside a public page ---- */
.aviso-de-entrada { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

/* ---- Flash messages: a modal <dialog> (js/core/site-dialog.js) ---- */
.aviso-modal {
    width: min(92vw, 460px); padding: 22px 24px 20px; border: 1px solid var(--borda); border-radius: var(--raio);
    background: var(--fundo); color: var(--texto); box-shadow: var(--sombra-alta);
}
.aviso-modal:not(:modal) { position: fixed; inset: auto 16px 96px auto; z-index: 120; margin: 0; }
.aviso-modal::backdrop { background: rgba(10, 14, 24, .55); }
.aviso-modal h2 { margin: 0 0 8px; font-size: 1.125rem; }
.aviso-modal p { margin: 0 0 12px; }
.aviso-modal form { margin: 14px 0 0; text-align: right; }

/* ---- "Entrar como…" bar (templates/partials/impersonation.view.php), without Bootstrap ---- */
.impersonation-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
    padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #f5c04a; color: #3d2a00; border-top: 2px solid #b98300;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .18); font-size: .9rem; line-height: 1.35;
}
.impersonation-who { flex: 1 1 220px; margin: 0; }
.impersonation-who small { display: block; font-size: .78rem; opacity: .9; }
.impersonation-bar form { margin: 0; }
.impersonation-back {
    min-height: 40px; padding: 0 18px; border: 1px solid #3d2a00; border-radius: 999px;
    background: #3d2a00; color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.impersonation-back:hover { background: #241800; }
.impersonation-back:focus-visible { outline: 3px solid #241800; outline-offset: 2px; }
body:has(.impersonation-bar) .rodape { padding-bottom: 96px; }
body.com-barra-app:has(.impersonation-bar) .barra-app { bottom: 62px; }
@media (max-width: 720px) {
    body.com-barra-app:has(.impersonation-bar) .rodape { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
}
