:root {
    --largura-maxima: 1040px;
}

main {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-principal {
    width: 100%;
}

.banner-principal img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 2px solid var(--cor-secundaria);
}

@media screen and (min-width: 599px) {
    .banner-principal img {
        height: 240px;
    }
}

@media screen and (min-width: 899px) {
    .banner-principal img {
        height: 400px;
    }
}

#dialog-confirma-xml {
    border: none;
    padding: 1rem;
    background: #fff;
    width: 37rem;
    max-width: calc(100vw - 2rem);
    margin: 1rem;
    height: fit-content;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999999;
}

#dialog-confirma-xml .dialog-container {
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

/* Só o corpo rola quando a janela é baixa demais; título e botões ficam sempre visíveis. */
#dialog-confirma-xml .dialog-main {
    min-height: 0;
    overflow-y: auto;
}

@media screen and (max-height: 700px) {
    #dialog-confirma-xml .dialog-container {
        gap: 0.75rem;
        padding: 1.25rem;
    }
}

.conteudo-container {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    gap: 1.5rem;
    width: 100%;
    max-width: var(--largura-maxima);
    position: relative;
    padding: 1rem;
}

.titulo-inicio {
    padding: var(--espaco-m);
    border-radius: var(--raio-borda);
    width: 100%;
    max-width: 500px;
    align-items: flex-start;
    position: absolute;
    top: -8rem;
    left: 0;
    margin: 0 1rem;
}

@media screen and (max-width: 599px) {
    .titulo-inicio {
        position: relative;
        top: -2rem;
        margin: 0;
    }

    .titulo-inicio .display-p {
        font-size: 1.802rem;
        line-height: 32px;
    }

    .alerta-pendencia {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
    }
}

.alert-info-bagagem {
    background-color: #e3f2fd;
    border: 1px solid #1976d2;
    border-radius: 4px;
    margin: 0;
}

.alert-info-bagagem p {
    margin: 0;
    color: #0d47a1;
    text-align: justify;
}

.titulo-inicio p {
    margin: 0;
}

/* COMO ENVIAR */
.passos-tela-inicial {
    display: flex;
    gap: 1rem;
    text-align: center;
}

.passos-tela-inicial p,
.passos-tela-inicial hr {
    margin: 0;
}

.passos-tela-inicial .passo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.passos-tela-inicial .passo:first-child hr {
    border-color: var(--cor-primaria);
}

@media screen and (max-width: 599px) {
    .passos-tela-inicial {
        flex-direction: column;
        gap: 0.5rem;
        text-align: left;
    }

    .passos-tela-inicial hr {
        display: none;
    }

    .passos-tela-inicial .passo {
        flex-direction: row;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--cor-linha);
        gap: 1rem;
    }

    .passos-tela-inicial .passo:last-child {
        border-bottom: none;
    }
}

.nota-fiscal-container {
    padding: 1rem;
    border-radius: var(--raio-borda);
}

.nota-fiscal-container .campo-txt {
    margin: 0;
}

.chave-de-acesso {
    padding: 1rem;
    border-radius: var(--raio-borda);
}

.chave-de-acesso h6 {
    flex: 1 0 100%;
}

.chave-de-acesso .legenda {
    flex: 1 0 100%;
    padding-top: 0.5rem;
    border-top: 1px solid var(--cor-linha);
}

@media screen and (max-width: 599px) {
    .radio-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.cartao-postagem-container {
    padding: 0.75rem 1rem;
    border-radius: var(--raio-borda);
    margin-top: 0.5rem;
    margin-bottom: var(--espaco-s, 0.75rem);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.definicoes-acoes-gerar {
    display: flex;
    justify-content: center;
    margin-top: var(--espaco-m, 1rem);
    gap: 1rem;
}

.cartao-postagem-container .toggle-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.cartao-postagem-container .toggle {
    align-items: center;
    width: 100%;
}

.cartao-postagem-container #div-cartao {
    margin-top: var(--espaco-m);
}

.aviso-tributos-eua {
    padding: 1rem;
    border-radius: var(--raio-borda);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#form-definicoes {
    width: 100%;
}

#form-definicoes .legenda.mensagem,
#form-definicoes .legenda.mensagem .avisocampo {
    align-self: stretch;
    display: block;
    font-style: normal;
    text-align: left;
    width: 100%;
}

#form-definicoes .cartao-postagem-container,
#form-definicoes .cartao-postagem-container #div-cartao,
#form-definicoes .selecionar-pais,
#form-definicoes .aviso-tributos-eua {
    align-items: stretch;
    width: 100%;
}

#form-definicoes h2 {
    text-align: center;
}

.selecionar-pais {
    padding: 1rem;
    border-radius: var(--raio-borda);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.postagem-em-andamento {
    padding: var(--espaco-g) var(--espaco-m);
    margin: var(--espaco-m) 0;
    border-radius: var(--raio-borda);
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: var(--espaco-m);
    align-items: flex-end;
    justify-content: center;
}

.postagem-em-andamento h2 {
    flex: 1 0 100%;
    text-align: center;
}

.postagem-em-andamento p,
.info-postagem-andamento {
    padding: var(--espaco-p);
    background-color: var(--cor-superficie-var);
    border-radius: var(--raio-borda);
    margin: 0;
    flex: 1 0 100%;
    text-align: left;
    word-break: break-word;
}

.msg-captcha {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    color: red;
}

#dialog-sistema-teste {
    border: none;
    padding: 0;
    background: #fff;
    width: 37rem;
    margin: 0;
    height: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999999;
    max-width: max-content;
}

.location {
    cursor: pointer;
}

.localization-fa-color {
    color: #016399;
}

.address {
    display: none;
    padding: 5px 15px;
    border-left: 2px solid #016399;
    margin-bottom: 10px;
}

.dialog-aviso {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.location-container {
    text-align: left;
    border: 1px solid #ddd;
    border-radius: 1rem;
    padding: 1rem;
}

.campo-consulta-nfe {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

#dialog-mudanca-nfe {
    border: none;
    padding: 0;
    background: #fff;
    width: auto;
    height: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999999;
    margin: 0;
}

.bagagem-des-sub {
    border-radius: var(--raio-borda);
    padding: var(--espaco-m);
}

body.alto-contraste .bagagem-des-sub {
    outline: 1px solid var(--cor-ac-branco);
}

.overlay {
    position: fixed; /* Cobre toda a tela */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fundo semi-transparente */
    z-index: 1100; /* Fica abaixo do modal, mas acima de outros elementos */
    display: none; /* Inicialmente escondido */
}

body.overlay-active {
    overflow: hidden; /* Desabilita o scroll */
}

#dialog-redirecionamento-nfe {
    border: none;
    padding: 0;
    background: #fff;
    width: 37rem;
    margin: 0;
    height: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999999;
    max-width: max-content;
}

#dialog-ator-interesado-nfe {
    position: fixed; /* Fixado na tela */
    top: 50%; /* Centralizado verticalmente */
    left: 50%; /* Centralizado horizontalmente */
    transform: translate(-50%, -50%); /* Ajusta para o centro exato */
    margin: 0; /* Remove margens padrão */
    padding: var(--espaco-m); /* Usa o padding já definido */
    max-width: var(--largura-maxima); /* Mantém o controle de largura */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra para profundidade */

    border-radius: var(--raio-borda); /* Bordas arredondadas */
    z-index: 1150; /* Garantir que fique acima de outros elementos */
}

/* Mantém o estilo já existente */
.max-width-dialog {
    max-width: var(--largura-maxima);
}

#dialog-ator-interesado-nfe .dialog-main form h3,
#dialog-ator-interesado-nfe .dialog-main form hr {
    width: 100%;
}

#dialog-ator-interesado-nfe .dialog-main .info-dados {
    border-radius: var(--raio-borda);
    padding: var(--espaco-m);
    display: flex;
    gap: var(--espaco-m);
    flex: 1 1 100%;
}

#dialog-ator-interesado-nfe .dialog-main .info-dados > div {
    flex: 1 1 auto;
}

#dialog-ator-interesado-nfe .info-dados p {
    margin: 0;
}

#dialog-ator-interesado-nfe .campos-row {
    display: flex;
    align-items: flex-start;
    gap: var(--espaco-p);
    flex: 1 0 100%;
}

#dialog-escolha-processamento-nfe {
    z-index: 10000;
}

#dialog-ator-interesado-nfe .campos-row .campo-txt {
    flex: 1 1 auto;
}

#dialog-ator-interesado-nfe .campos-row .selecionar {
    flex: 2 1 auto;
}

#dialog-ator-interesado-nfe .campos-row .btn-pre {
    margin-top: 2.5rem;
    flex: 0 0 auto;
}

.nu-obj-pendencia {
    position: absolute;
    margin-top: -10px;
    margin-left: 0.5rem;
    padding: 0 0.5rem;
    background: #fff;
    font-size: 12px;
}
.modal-pendencias {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    width: 65%;
    max-width: 65%;
    max-height: 80vh;
    overflow-y: auto;
}

#pagination-links {
    display: flex !important;
    justify-content: center !important;
}

#pagination-links .active > .page-link,
.page-link.active {
    background-color: #016399 !important;
    border-color: #016399 !important;
}

#pagination-links .active > .page-link,
.page-link.active {
    color: #fff !important;
}

#dialog-mudanca {
    position: fixed;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    text-align: center;
    z-index: 1150;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    width: 90%;
    max-width: 500px;
}

/* Resposividade */
@media screen and (max-width: 599px) {
    #dialog-ator-interesado-nfe .campos-row {
        flex-direction: column;
    }

    #dialog-ator-interesado-nfe .campos-row .campo-txt {
        width: 100%;
    }

    #dialog-ator-interesado-nfe .campos-row .btn-pre {
        margin-top: 0;
    }
    .campo-consulta-nfe {
        display: flex;
        gap: 2rem;
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
}

@media screen and (max-width: 899px) {
    #dialog-ator-interesado-nfe .campos-row {
        flex-wrap: wrap;
    }

    #dialog-ator-interesado-nfe .campos-row .campo-txt,
    #dialog-ator-interesado-nfe .campos-row .selecionar {
        flex: 1 1 calc(50% - 1rem);
    }
}

/* CSS para reduzir o tamanho dos SVGs dentro da navegação */
.pagination svg {
    width: 16px; /* Ajuste o tamanho conforme necessário */
    height: 16px; /* Ajuste o tamanho conforme necessário */
}

/* Caso você queira reduzir o tamanho geral da paginação */
.pagination .page-item {
    font-size: 14px; /* Ajuste o tamanho da fonte, se necessário */
}

/* Caso precise ajustar o tamanho de todas as páginas numeradas */
.pagination .page-link {
    padding: 5px 10px; /* Ajuste o tamanho do botão */
    font-size: 14px; /* Ajuste o tamanho da fonte */
}

.d-none {
    display: none;
}

/* Cursor pointer nas opções de "O que deseja enviar?" */
#camada-principal .card-selecionavel,
#camada-encomenda label.radio,
#camada-nfe label.radio,
#camada-documento label.radio {
    cursor: pointer;
}
