@font-face {
    font-family: "All Round Gothic";
    font-style: normal;
    font-weight: 700;
    src: url("/jakarta.faces.resource/fonts/all-round-gothic-bold.otf.xhtml?ln=diamond-layout&v=2.0.65-mwz5o82o") format("opentype");
}

/* Mapa público da rede (showmapa/index.xhtml). Página fora do template: não carrega o citius-base.css nem o
   css/citius-ui/, por isso os tokens ficam aqui. Três arranjos:
   - computador (a partir de 1025 px): busca no alto à esquerda, legenda embaixo à esquerda, ferramentas e "Minha
     localização" numa barra no canto inferior direito, cartões da localização no alto à direita;
   - tablet (641 a 1024 px): ferramentas em coluna à direita, com nome; "Minha localização" em pílula no canto;
   - celular (até 640 px): ferramentas numa barra fixa no rodapé, botão redondo de localização, painéis que sobem do
     rodapé e legenda em selos abaixo da busca; sem o rodapé de copyright. */
:root {
    --rede-topbar-ink: #FFFFFF;
    --rede-topo: 4rem;
    --rede-base: 2rem;
    --rede-ink: #18212D;
    --rede-ink-2: #4A5668;
    --rede-borda: #E0E5EC;
    --rede-borda-forte: #C9D1DC;
    --rede-primaria: #1667D9;
    --rede-primaria-hover: #0F56BA;
    --rede-primaria-suave: #E7F0FD;
    --rede-aviso-ink: #8A5100;
    --rede-aviso-bg: #FCEBCF;
    --rede-erro: #C0352B;
    --rede-trecho: #000080;
    --rede-sombra: 0 2px 8px rgba(16, 32, 60, .18);
    --rede-sombra-alta: 0 16px 40px rgba(16, 32, 60, .3);
}

/* ---------------------------------------------------------------- moldura (layout Diamond) */

@media screen and (min-width: 992px) {
    .layout-wrapper.layout-slim .layout-sidebar {
        width: 0 !important;
    }

    .layout-wrapper.layout-slim .layout-menu .layout-root-menuitem > ul {
        left: 0 !important;
        width: max-content !important;
    }

    .layout-wrapper.layout-slim .layout-content-wrapper {
        margin-left: 0 !important;
    }

    .layout-wrapper.layout-slim .layout-topbar {
        width: 100% !important;
    }
}

.layout-topbar {
    display: flex !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: var(--rede-topo) !important;
    z-index: 1000 !important;
    background-image: linear-gradient(120deg, #004070 0%, #0069B4 100%);
    color: #FFFFFF !important;
}

.layout-topbar .topbar-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.layout-content {
    padding: 0 !important;
}

.layout-footer {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    width: 100% !important;
    height: var(--rede-base) !important;
    align-items: center;
    background-image: linear-gradient(120deg, #004070 0%, #0069B4 100%);
    color: #FFFFFF !important;
}

.rede-rodape {
    justify-content: flex-end;
    padding: 0 16px;
    box-sizing: border-box;
    font-size: 12px;
}

.layout-topbar-logo img {
    height: 30px;
}

.rede-aviso {
    color: var(--rede-topbar-ink);
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.3;
}

.rede-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------------------------------------------------------------- mapa e camadas por cima dele */

.rede-mapa {
    position: fixed;
    top: var(--rede-topo);
    bottom: var(--rede-base);
    left: 0;
    right: 0;
}

.rede-mapa__mapa {
    width: 100%;
    height: 100%;
}

.rede-topo,
.rede-selos,
.rede-legenda,
.rede-cartao,
.rede-comandos,
.rede-cidades {
    z-index: 1000;
    color: var(--rede-ink);
}

.rede-topo {
    position: fixed;
    top: calc(var(--rede-topo) + 16px);
    left: 16px;
    right: 16px;
    pointer-events: none;
}

.rede-busca {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(500px, 100%);
    min-height: 44px;
    padding: 0 12px;
    box-sizing: border-box;
    background: #FFFFFF;
    border: 1px solid var(--rede-borda-forte);
    border-radius: 8px;
    box-shadow: var(--rede-sombra);
    color: #6B778A;
}

.rede-busca input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--rede-ink);
    font-size: 15px;
}

.rede-selos {
    position: fixed;
    top: calc(var(--rede-topo) + 68px);
    left: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 32px);
}

.rede-selo {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 800;
}

.rede-selo[hidden] {
    display: none;
}

.rede-selo--azul {
    background: var(--rede-primaria);
    color: #FFFFFF;
}

.rede-selo--escuro {
    background: var(--rede-ink);
    color: #FFFFFF;
}

.rede-selo--suave {
    padding: 3px 10px;
    background: var(--rede-primaria-suave);
    color: var(--rede-primaria);
    font-size: 12px;
}

.rede-legenda {
    position: fixed;
    left: 16px;
    bottom: calc(var(--rede-base) + 16px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--rede-borda);
    border-radius: 12px;
    box-shadow: var(--rede-sombra);
    font-size: 13px;
}

.rede-legenda__item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rede-legenda__item[hidden] {
    display: none;
}

.rede-legenda__rede {
    display: inline-block;
    width: 26px;
    height: 5px;
    border-radius: 3px;
    background: var(--rede-trecho);
}

.rede-legenda__ponto {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 6px;
    border-radius: 50%;
    box-sizing: border-box;
    background: var(--rede-primaria);
    border: 3px solid #FFFFFF;
    box-shadow: 0 0 0 1px var(--rede-primaria);
}

.rede-legenda__cidade {
    color: var(--rede-ink-2);
}

.rede-legenda__cidade b {
    color: var(--rede-ink);
}

/* cartões da localização (resultado e erro) */
.rede-cartao {
    position: fixed;
    top: calc(var(--rede-topo) + 16px);
    right: 16px;
    width: min(360px, calc(100% - 32px));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid var(--rede-borda);
    border-radius: 12px;
    box-shadow: var(--rede-sombra);
}

.rede-cartao[hidden] {
    display: none;
}

.rede-cartao__cab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.rede-cartao__tit {
    font-size: 15px;
    font-weight: 800;
}

.rede-cartao__tit--erro {
    color: var(--rede-erro);
}

.rede-cartao__texto {
    font-size: 14px;
    line-height: 1.5;
    color: var(--rede-ink-2);
}

.rede-cartao__nota {
    font-size: 12px;
    color: var(--rede-ink-2);
}

.rede-distancia {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--rede-aviso-bg);
    color: var(--rede-aviso-ink);
    font-size: 14px;
}

.rede-distancia[hidden] {
    display: none;
}

.rede-acoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.rede-btn {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--rede-borda-forte);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--rede-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.rede-btn:hover {
    background: #F4F6F9;
}

.rede-btn--pri {
    border-color: var(--rede-primaria);
    background: var(--rede-primaria);
    color: #FFFFFF;
    font-weight: 800;
}

.rede-btn--pri:hover {
    border-color: var(--rede-primaria-hover);
    background: var(--rede-primaria-hover);
}

.rede-btn:focus-visible,
.rede-ferr:focus-visible,
.rede-local:focus-visible,
.rede-cidades__item:focus-visible {
    outline: 3px solid #5AA2FF;
    outline-offset: 2px;
}

/* ferramentas (computador: uma barra no canto inferior direito, só ícones, com "Minha localização" no fim) */
.rede-comandos {
    position: fixed;
    right: 16px;
    bottom: calc(var(--rede-base) + 16px);
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 32px);
    padding: 6px;
    background: #FFFFFF;
    border: 1px solid var(--rede-borda);
    border-radius: 12px;
    box-shadow: var(--rede-sombra);
}

.rede-ferramentas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rede-ferr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--rede-borda);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--rede-ink-2);
    font-family: inherit;
    cursor: pointer;
}

.rede-ferr:hover {
    background: #F4F6F9;
}

.rede-ferr .pi {
    font-size: 1.15rem;
}

/* no computador, o nome fica só para o leitor de tela (a dica do botão mostra o nome completo) */
.rede-ferr span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.rede-ferr[aria-pressed="true"],
.rede-ferr[aria-expanded="true"] {
    border-color: var(--rede-primaria);
    background: var(--rede-primaria-suave);
    color: var(--rede-primaria);
}

.rede-local {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--rede-primaria);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.rede-local:hover {
    background: var(--rede-primaria-hover);
}

.rede-local[aria-pressed="true"] {
    box-shadow: inset 0 0 0 2px #FFFFFF, 0 0 0 2px var(--rede-primaria);
}

/* lista "Centralizar mapa em …" */
.rede-cidades {
    position: fixed;
    right: 16px;
    bottom: calc(var(--rede-base) + 80px);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 280px;
    padding: 6px;
    background: #FFFFFF;
    border: 1px solid var(--rede-borda);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(16, 32, 60, .2);
}

.rede-cidades[hidden] {
    display: none;
}

.rede-cidades__tit {
    padding: 6px 12px 4px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--rede-ink-2);
}

html body .rede-cidades__item {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--rede-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

html body .rede-cidades__item:hover {
    background: #EAF2FE;
    color: var(--rede-primaria);
}

.rede-cidades__cancelar {
    display: none;
}

/* diálogo antes do pedido do navegador */
.rede-dialogo {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 39, 71, .45);
}

.rede-dialogo[hidden] {
    display: none;
}

.rede-dialogo__caixa {
    width: min(440px, 100%);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: var(--rede-sombra-alta);
    color: var(--rede-ink);
}

.rede-dialogo__caixa h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.rede-dialogo__caixa p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--rede-ink-2);
}

.rede-dialogo__caixa .rede-dialogo__nota {
    padding: 10px 12px;
    border-radius: 8px;
    background: #F4F6F9;
    font-size: 13px;
}

/* ---------------------------------------------------------------- tablet */

@media screen and (min-width: 641px) and (max-width: 1024px) {
    .rede-busca {
        width: min(440px, calc(100% - 96px));
        min-height: 48px;
    }

    .rede-busca input {
        font-size: 16px;
    }

    .rede-selos {
        top: calc(var(--rede-topo) + 72px);
        max-width: calc(100% - 128px);
    }

    /* barra sem fundo próprio: as ferramentas viram coluna à direita e a localização, uma pílula no canto */
    .rede-comandos {
        display: contents;
    }

    .rede-ferramentas {
        position: fixed;
        z-index: 1000;
        top: calc(var(--rede-topo) + 16px);
        right: 16px;
        flex-direction: column;
        gap: 4px;
        padding: 6px;
        background: #FFFFFF;
        border: 1px solid var(--rede-borda);
        border-radius: 14px;
        box-shadow: var(--rede-sombra);
    }

    .rede-ferr {
        flex-direction: column;
        width: 64px;
        min-height: 56px;
        padding: 4px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        font-size: 11px;
        font-weight: 700;
    }

    .rede-ferr span {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }

    .rede-ferr[aria-pressed="true"],
    .rede-ferr[aria-expanded="true"] {
        background: var(--rede-primaria-suave);
    }

    .rede-local {
        position: fixed;
        z-index: 1000;
        right: 16px;
        bottom: calc(var(--rede-base) + 16px);
        min-height: 56px;
        padding: 0 22px;
        border-radius: 28px;
        font-size: 16px;
        box-shadow: 0 4px 14px rgba(16, 32, 60, .3);
    }

    .rede-cidades {
        top: calc(var(--rede-topo) + 240px);
        right: 104px;
        bottom: auto;
    }

    /* abaixo da coluna de ferramentas */
    .rede-cartao {
        top: calc(var(--rede-topo) + 350px);
        width: min(380px, calc(100% - 32px));
    }
}

/* ---------------------------------------------------------------- celular */

@media screen and (max-width: 640px) {
    :root {
        --rede-topo: 56px;
        --rede-base: 64px;
    }

    .layout-footer {
        display: none !important;
    }

    .layout-topbar {
        padding: 0 12px !important;
    }

    .layout-topbar-logo img {
        height: 24px;
    }

    .rede-aviso {
        font-size: 11px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .rede-topo {
        top: calc(var(--rede-topo) + 12px);
        left: 12px;
        right: 12px;
    }

    .rede-busca {
        width: 100%;
        min-height: 48px;
        border-radius: 24px;
    }

    .rede-busca input {
        font-size: 16px; /* 16 px: o iOS não amplia a página ao tocar no campo */
    }

    /* legenda em selos logo abaixo da busca */
    .rede-legenda {
        top: calc(var(--rede-topo) + 70px);
        left: 12px;
        right: 12px;
        bottom: auto;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        font-size: 12px;
        font-weight: 700;
        pointer-events: none;
    }

    .rede-legenda__item,
    .rede-legenda__cidade {
        padding: 6px 10px;
        background: rgba(255, 255, 255, .95);
        border: 1px solid var(--rede-borda);
        border-radius: 16px;
    }

    .rede-legenda__rede {
        width: 18px;
        height: 4px;
    }

    /* selos de andamento acima da barra, ao lado do botão de localização */
    .rede-selos {
        top: auto;
        bottom: calc(var(--rede-base) + 16px);
        left: 12px;
        max-width: calc(100% - 96px);
    }

    .rede-comandos {
        display: contents;
    }

    .rede-ferramentas {
        position: fixed;
        z-index: 1000;
        left: 0;
        right: 0;
        bottom: 0;
        height: var(--rede-base);
        box-sizing: border-box;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        padding: 6px 6px 8px;
        background: #FFFFFF;
        border-top: 1px solid var(--rede-borda);
    }

    .rede-ferr {
        flex-direction: column;
        min-width: 0;
        min-height: 0;
        padding: 2px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        font-size: 11px;
        font-weight: 700;
    }

    .rede-ferr span {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }

    .rede-ferr[aria-pressed="true"],
    .rede-ferr[aria-expanded="true"] {
        background: var(--rede-primaria-suave);
    }

    .rede-local {
        position: fixed;
        z-index: 1000;
        right: 14px;
        bottom: calc(var(--rede-base) + 16px);
        width: 56px;
        height: 56px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
        box-shadow: 0 4px 14px rgba(16, 32, 60, .3);
    }

    .rede-local span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .rede-painel-aberto .rede-local {
        display: none;
    }

    /* cartões, lista de cidades e diálogo sobem do rodapé */
    .rede-cartao,
    .rede-cidades {
        top: auto;
        left: 0;
        right: 0;
        bottom: var(--rede-base);
        width: auto;
        min-width: 0;
        padding: 16px 18px;
        border: 0;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 24px rgba(16, 32, 60, .2);
    }

    .rede-cartao__tit {
        font-size: 17px;
    }

    .rede-acoes {
        flex-direction: column-reverse;
    }

    .rede-acoes .rede-btn {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
    }

    html body .rede-cidades__item {
        min-height: 48px;
        font-size: 16px;
    }

    .rede-cidades__cancelar {
        display: block;
        min-height: 48px;
        margin-top: 6px;
        font-size: 16px;
    }

    .rede-dialogo {
        align-items: flex-end;
        padding: 0;
    }

    .rede-dialogo__caixa {
        width: 100%;
        padding: 20px 18px;
        border-radius: 18px 18px 0 0;
    }
}
