/* Cabeçalho compartilhado das páginas internas. A busca de candidatos mantém
   regras locais adicionais para o estado logado e para os controles de conta. */
#topo .menu {
    padding-right: 18px;
    padding-left: 18px;
    border-right: 0;
}

#topo .header-credits svg {
    color: inherit;
    stroke: currentColor;
    flex: 0 0 auto;
}

#topo .header-credits {
    position: relative;
    gap: 6px;
}

#topo .header-credits::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    z-index: 120;
    width: max-content;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: 7px;
    box-sizing: border-box;
    transform: translate(-50%, -3px);
    color: #fff;
    background: #1e293b;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

#topo .header-credits:hover::after,
#topo .header-credits:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

#topo .menu a {
    padding-right: 12px;
    padding-left: 12px;
    white-space: nowrap;
}

#topo .header-support {
    height: 36px;
    margin-left: 8px;
    padding: 0 14px;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    color: #475569;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#topo .header-support span,
#topo .header-support svg {
    color: inherit;
}

#topo .header-support svg,
#topo .header-support svg path {
    color: inherit;
    fill: currentColor !important;
    stroke: currentColor;
}

#topo .header-support:hover,
#topo .header-support:focus-visible {
    border-color: #4cb476;
    background: #4cb476;
    color: #fff;
    box-shadow: 0 3px 10px rgba(76, 180, 118, 0.18);
    outline: none;
}

#menuMobile1 a.destaque.mobile-header-support {
    width: auto;
    min-height: 42px;
    margin: 20px 0 4px;
    order: 10;
    padding: 10px 24px;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    color: #fff !important;
    background: #4cb476;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#menuMobile1 .mobile-header-support svg {
    color: #fff !important;
    fill: #fff !important;
    width: 18px;
    height: 18px;
    background-color: transparent !important;
    flex: 0 0 auto;
}

#menuMobile1 .mobile-header-support svg path {
    background-color: transparent !important;
    color: #fff !important;
    fill: #fff !important;
    stroke: #fff !important;
}

#menuMobile1 .mobile-header-support span {
    background-color: transparent !important;
    color: #fff !important;
}

#menuMobile1 .mobile-header-support:hover,
#menuMobile1 .mobile-header-support:focus-visible {
    border-color: #4cb476;
    background: #4cb476;
    color: #fff;
    box-shadow: 0 3px 10px rgba(76, 180, 118, 0.18);
    outline: none;
}

#topo .header-support:hover svg path,
#topo .header-support:focus-visible svg path {
    color: #fff !important;
    fill: #fff !important;
    stroke: #fff !important;
}

#topo .header-account {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid #e2e8f0;
}

@media (max-width: 1240px) {
    #topo .header-account {
        margin-left: 10px;
        padding-left: 10px;
    }

    #topo .menu {
        padding-right: 14px;
        padding-left: 14px;
    }

    #topo .menu a {
        padding-right: 10px;
        padding-left: 10px;
    }
}

@media (max-width: 1120px) {
    #topo .header-support {
        display: none;
    }

    #topo .sanduiche {
        display: block !important;
        flex: 0 0 25px;
        margin-left: 14px;
    }
}

@media (max-width: 900px) {
    #topo .header-account {
        margin-left: auto;
        margin-right: 12px;
        padding-left: 0;
        border-left: 0;
    }
}

/* O CSS legado fazia logo e área de ações ocuparem 100% da linha em telas
   pequenas. Mantemos o logo à esquerda e o menu sempre encostado à direita. */
@media (max-width: 600px) {
    #topo.header-busca-candidatos .cont {
        flex-wrap: nowrap;
        min-width: 0;
    }

    #topo.header-busca-candidatos .logo {
        width: 48px;
        min-width: 48px;
        flex: 0 0 48px;
    }

    #topo.header-busca-candidatos .logo a,
    #topo.header-busca-candidatos .logo picture {
        display: block;
        width: 48px !important;
        max-width: 48px;
        height: 42px;
        margin: 0;
        overflow: hidden;
    }

    #topo.header-busca-candidatos .logo img {
        display: block;
        width: 42px !important;
        max-width: 42px;
        height: 42px;
        margin: 0;
        object-fit: contain;
    }

    #topo.header-busca-candidatos .dir {
        width: auto;
        min-width: 0;
        margin-left: auto;
        justify-content: flex-end;
        flex: 0 0 auto;
    }

    #topo.header-busca-candidatos .header-account {
        gap: 8px;
        margin: 0 8px 0 0;
    }

    #topo.header-busca-candidatos .account-info.visitor .visitor-access-actions {
        gap: 8px;
    }

    #topo.header-busca-candidatos .account-info.visitor .btn-login,
    #topo.header-busca-candidatos .account-info.visitor .btn-register {
        gap: 4px;
        padding: 6px 8px;
        font-size: 12px;
    }

    #topo.header-busca-candidatos .sanduiche {
        width: 23px;
        height: 23px;
        flex: 0 0 23px;
        margin-left: 0;
    }

    /* Nos demais headers, mantém o logo completo e fixa o menu à direita. */
    #topo:not(.header-busca-candidatos) .cont {
        flex-wrap: nowrap;
        min-width: 0;
    }

    #topo:not(.header-busca-candidatos) .logo {
        width: 200px;
        min-width: 0;
        flex: 0 1 auto;
    }

    #topo:not(.header-busca-candidatos) .dir {
        width: auto;
        min-width: 0;
        margin-left: auto;
        justify-content: flex-end;
        flex: 0 0 auto;
    }
}
