/* EPRIN — Registo de Pedidos e Transmissões de Dados Pessoais */

:root {
    --eprin-azul: #1b3550;
    --eprin-verde: #2a8a80;
    --eprin-fundo: #f5f6f8;
}

body {
    background-color: var(--eprin-fundo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1 0 auto; }

.bg-eprin { background-color: var(--eprin-azul); }

.card-eprin {
    max-width: 560px;
    margin: 2rem auto;
}

.tabela-estado { font-size: 0.9rem; }

/* ---------------------------------------------------------------- Ajuda */

.btn-ajuda {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.3rem;
    border-radius: 50%;
    background-color: #ffc107;
    color: #212529;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    vertical-align: text-top;
    cursor: pointer;
    user-select: none;
}

.btn-ajuda:hover,
.btn-ajuda:focus {
    background-color: #e0a800;
    color: #212529;
    outline: 2px solid var(--eprin-azul);
    outline-offset: 1px;
}

.popover-ajuda { --bs-popover-max-width: 380px; }
.popover-ajuda .popover-body p:last-child { margin-bottom: 0; }

/* Visita guiada: o elemento em destaque escurece o resto da página com uma sombra larga. */
.visita-destaque {
    position: relative;
    z-index: 1061;
    border-radius: 0.5rem;
    box-shadow: 0 0 0 4px #ffc107, 0 0 0 100vmax rgba(15, 25, 40, 0.55);
    background-color: #fff;
}

.visita-caixa {
    position: absolute;
    z-index: 1070;
    width: min(360px, calc(100vw - 16px));
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    border-top: 4px solid #ffc107;
}

.dica-primeira-visita {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1060;
    max-width: 320px;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    border-left: 4px solid #ffc107;
}

.proximo-passo {
    border-left: 5px solid var(--eprin-verde);
    background-color: #e8f4f2;
}

/* ------------------------------------------------- Formulário público */

.indice-formulario {
    position: sticky;
    top: 1rem;
}

.indice-formulario .list-group-item.completa { color: #198754; }
.indice-formulario .estado-secao { display: inline-block; width: 1.2rem; font-weight: 700; }

fieldset[data-secao] {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.25rem;
    scroll-margin-top: 1rem;
}

fieldset[data-secao] > legend {
    float: none;
    width: auto;
    padding: 0 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.cartao-categoria {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    height: 100%;
    background: #fafbfc;
}

.cartao-categoria.selecionada {
    border-color: var(--eprin-verde);
    background: #f0f8f7;
}

.declaracao-texto {
    background: #f8f9fa;
    border-left: 4px solid var(--eprin-azul);
}

/* ------------------------------------------------------- Área reservada */

.contador-estado {
    text-decoration: none;
    color: inherit;
}

.contador-estado .card { transition: transform 0.1s; }
.contador-estado:hover .card { transform: translateY(-2px); }
.contador-estado.ativo .card { outline: 3px solid var(--eprin-azul); }

.linha-tempo { list-style: none; padding-left: 0; margin: 0; }
.linha-tempo li {
    position: relative;
    padding: 0.5rem 0.75rem 0.5rem 1.5rem;
    border-left: 2px solid #dee2e6;
    margin-left: 0.5rem;
}
.linha-tempo li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 0.85rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--eprin-verde);
}

.fases-processo { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.fases-processo .fase {
    flex: 1 1 0;
    min-width: 90px;
    padding: 0.35rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    background: #e9ecef;
    color: #6c757d;
}
.fases-processo .fase.feita { background: #d1e7dd; color: #0f5132; }
.fases-processo .fase.atual { background: var(--eprin-azul); color: #fff; font-weight: 600; }

@media print {
    nav, footer, .no-print, .offcanvas, .btn-ajuda { display: none !important; }
}
