/* ===== Reset de links (sobrescreve Bootstrap) ===== */
a {
    color: inherit;
    text-decoration: none;
}

/* ===== Organograma - Nó TRT ===== */
div.node.TRT {
    display: none !important;
}

div.orgchart {
    width: auto;
    height: auto;
    background: none;
}

div.container-interior h3 {
    margin: 0;
}

/* ===== Cabine (nó do organograma) - Glassmorphism ===== */
div.cabine {
    min-height: 54px !important;
    height: auto !important;
    display: table;
    cursor: pointer !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 8px 10px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

div.cabine:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--borda-hover) !important;
}

.node-sigla {
    display: block;
    font-weight: 700;
    font-size: 0.85em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: normal;
    line-height: 1.3;
    color: #1a1a1a;
    padding-bottom: 2px;
}

.node-nome {
    display: block;
    font-weight: 400;
    font-size: 0.68em;
    white-space: normal;
    line-height: 1.25;
    color: rgba(0, 0, 0, 0.55);
    padding-top: 2px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 2px;
}

.oci.symbol {
    display: none;
}

div.orgchart > ul.nodes > li.hierarchy {
    width: auto !important;
}

div.nivel1 ~ ul.node {
    max-width: 200px;
}

i.topEdge,
i.rightEdge,
i.leftEdge,
i.bottomEdge {
    display: none;
}

/* ===== Botão de toggle do orgchart ===== */
.orgchart .node .toggleBtn {
    position: absolute;
    left: 50% !important;
    transform: translateX(-50%);
    bottom: -14px;
    z-index: 10;
    cursor: pointer;
    padding: 4px 6px;
}

.orgchart .node .toggleBtn::before {
    background-color: lightgray !important;
    color: #333;
    font-size: 11pt;
    font-weight: 700;
}

.orgchart .node .cabine .toggleBtn:hover::before {
    background-color: transparent !important;
}

.orgchart .node .cabine .toggleBtn::before {
    background-color: transparent;
}

.oci-minus-square::before {
    background: lightgray;
    color: black;
    content: "-";
    display: inline-table;
    width: 1rem;
    height: 1px;
    border-radius: 3px !important;
    vertical-align: unset;
    font-size: 0.8em;
}

.oci-plus-square::before {
    background: lightgray;
    color: black;
    content: "+";
    display: inline-table;
    width: 1rem;
    height: 1px;
    border-radius: 3px !important;
    vertical-align: unset;
    font-size: 0.8em;
}

.orgchart .node .cabine .toggleBtn::before {
    border-radius: unset;
}

.orgchart .node .cabine .toggleBtn {
    bottom: -14px;
}

.orgchart ul li .node .cabine {
    font-weight: 300;
    height: auto;
}

.orgchart ul li .node:hover {
    transform: scale(1.08);
    background-color: transparent !important;
}

/* ===== Painel lateral ===== */
div.fundo {
    background-color: white;
    border-radius: 16px;
    z-index: -20;
}

div.fundo-trt {
    background: url('../resources/bg.png') repeat-x;
}

div.fundo-trt div#chart-container {
    border: 1px solid black;
    max-width: 100%;
    max-height: 86vh;
    position: relative;
    background-color: rgb(241 241 241);
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    cursor: auto;
    overflow: auto !important;
}

.miniatura {
    width: 100%;
    padding: 14px;
    z-index: 1;
    border: 1px solid #ccc !important;
    border-radius: 16px;
    position: relative;
}

.miniatura img.fundo {
    position: absolute;
    opacity: 0.08;
    z-index: -1;
    right: -45%;
    top: 25%;
    height: 350px;
}

div.brasao {
    position: absolute;
    height: 97%;
    background: url(../resources/LOGO_TRT7.jpg) no-repeat;
    opacity: .15;
    z-index: -1;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-size: contain;
    transform: translateY(10px);
    background-position: center;
}

.miniatura-titulo {
    margin: -14px;
    margin-bottom: 14px;
    height: 2.8rem;
    padding-top: 10px;
    border-radius: 16px 16px 0px 0px;
    text-align: center;
    background-color: rgb(10, 121, 36);
}

.imagem-miniatura {
    z-index: 5;
    margin: 0 auto;
}

img.foto {
    border: 1px solid rgb(222, 226, 230) !important;
    border-radius: 8px;
}

.miniatura .card-body {
    padding: 1rem 0rem;
    min-height: 230px;
}

#painel-dados-setor {
    max-width: 100% !important;
    width: auto !important;
}

/* ===== Máscara de carregamento (tech) ===== */
.mascara-carregamento {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    text-align: center;
    background-color: rgb(241 241 241);
}

.mascara-carregamento .indicador-carga {
    position: absolute;
    top: calc(50% - 50px);
    left: calc(50% - 50px);
}

.indicador-carga-texto {
    display: block;
}

.mascara-carregamento .indicador-carga > i.oci-spinner::before {
    width: 100px;
    height: 100px;
    border-width: 10px;
    border-radius: 50px;
    border-top-color: rgba(68, 157, 68, 0.8);
    border-bottom-color: rgba(68, 157, 68, 0.8);
    border-left-color: rgba(68, 157, 68, 0.8);
}

/* ===== Legenda de cores ===== */
span.texto {
    font-size: 9pt;
    text-align: justify;
    margin-left: 10px;
}

li.hierarchy > div.TRT > div.cabine {
    width: 100% !important;
    max-width: 100% !important;
}

h6.texto-legenda {
    font-size: 11pt;
    margin-top: -10px;
    margin-bottom: 20px;
    text-align: center;
}

div.legenda-cores {
    position: fixed;
    width: 261px;
    bottom: 41px;
    right: 42px;
    border: 5px solid rgb(108, 152, 201);
    border-radius: 5px;
    padding: 20px;
    background-color: white;
    display: none;
}

li.text {
    font-size: 11pt;
    display: flex;
    flex: 100%;
    margin: 2px 0px;
    padding: 0;
    margin-left: 0;
}

li.col-6 {
    list-style-type: none;
}

span.cor {
    border: 1px solid black;
    padding: 8px;
    border-radius: 4px;
    width: 8px;
    height: 15px;
}

ul.row {
    margin-bottom: -20px;
    margin-top: -15px;
    padding: 0;
}

ul.nodes {
    position: relative !important;
}

div.node {
    display: flex !important;
    min-width: 60px;
}

/* ===== Controles de zoom (tech glass) ===== */
div.controles {
    display: flex !important;
    position: absolute;
    top: -55px;
    left: 0;
}

.btn-zoom {
    font-size: .9rem;
    background: #FFF;
    border: 1px solid #005bac;
    border-radius: 50%;
    color: #005bac;
    padding: 15px 10px 5px;
    text-align: center;
    user-select: none;
    transition: all 0.3s ease;
    z-index: 1;
    display: block;
    margin-right: 8px;
}

.btn-zoom:hover {
    transform: scale(1.1);
}

i.nav-item {
    position: relative;
    top: -4px;
    font-size: 1.1rem;
}

.expandir {
    bottom: 230px;
}

.aproximar {
    bottom: 187px;
}

.afastar {
    bottom: 144px;
}

.zoom-inicial {
    bottom: 101px;
}

.baixar {
    bottom: 58px;
    right: 11.6em;
}

div.mascara-interior {
    margin: 0 auto;
    display: table;
}

/* ===== Cabeçalho / Topo ===== */
div.container-fundo-trt {
    font-size: 13px;
    color: white;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem;
}

/* ===== Caixa de busca (tech) ===== */
#area-busca {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    margin-top: .25rem;
}

#caixa-busca {
    position: relative;
    z-index: 100;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 0;
}

.busca-campo {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.busca-campo:focus-within {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.2);
}

#busca-entrada {
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 12px;
    width: 200px;
    background: transparent;
    color: #333;
    font-family: inherit;
    letter-spacing: 0.02em;
}

#busca-entrada::placeholder {
    color: #999;
}

#busca-botao {
    border: none;
    background: #153e50;
    color: white;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#busca-botao:hover:not(:disabled) {
    background: #1a5268;
}

#busca-botao:disabled {
    background: #aaa;
    color: #fff;
    cursor: not-allowed;
}

#busca-info {
    font-size: 11px;
    color: #555;
    white-space: nowrap;
}

/* ===== Destaque de busca ===== */
mark.busca-destaque {
    background-color: #ffe14d;
    color: #000;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 700;
}

.cabine.busca-resultado {
    outline: 3px solid #ffe14d;
    outline-offset: -1px;
    box-shadow: 0 0 14px rgba(255, 225, 77, 0.6);
    animation: pulsar-resultado 1.2s ease-in-out 2;
}

@keyframes pulsar-resultado {
    0%, 100% { box-shadow: 0 0 14px rgba(255, 225, 77, 0.6); }
    50% { box-shadow: 0 0 24px rgba(255, 225, 77, 0.9); }
}

/* ===== Partes do topo ===== */
div.container-fundo-trt .fundo-trt-parte1 {
    display: grid;
}

div.container-fundo-trt .fundo-trt-parte1 > p {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 10px !important;
    line-height: 1.3;
    color: #fff;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin: 0 0 2px 0;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    display: inline;
    align-items: unset;
    gap: 0;
    min-height: unset;
    transition: none;
    border: none;
    user-select: text;
}

div.container-fundo-trt .fundo-trt-parte2 {
    margin-top: 0.5rem;
}

div.container-fundo-trt .titulo-topo {
    flex: 1;
    text-align: center;
    margin-top: 1em;
}

div.container-fundo-trt .titulo-topo > h1 {
    margin: 0;
    font-size: clamp(12px, 1.7vw, 17px) !important;
    font-weight: 600;
    line-height: 1.2;
}


img.imagem-topo {
    width: 60px;
    vertical-align: middle;
}

span.dados-unidade {
    display: block;
}

ul.lista-sem-estilo {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ===== Animação de carregamento (skeleton) ===== */
.carregando .foto-titular-carregando,
.card-body p .dados-unidade-carregando {
    background: #eee;
    background: linear-gradient(90deg, #beb4b4 10%, #d7d7d7 30%, #adadad 20%);
    border-radius: 0px;
    background-size: 200% 100%;
    z-index: 5;
    animation: shine 1.5s linear infinite;
}

.carregando .foto-titular-carregando {
    height: 200px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.card-body p .dados-unidade-carregando {
    height: 30px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

/* ===== Botão flutuante da legenda ===== */
.legenda {
    background-color: #099;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    border-color: #46b8da;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    width: auto;
    max-width: 79px;
    transition: max-width 0.5s;
    height: unset;
}

.legenda:hover {
    max-width: 300px;
}

#botao-legenda {
    position: fixed;
    bottom: 0;
    right: -12px;
}

.icone-legenda {
    font-size: 25px;
    display: flex;
    align-items: unset;
    padding: 0;
    width: 19px;
    margin: 0;
}

.texto-botao-legenda {
    white-space: nowrap;
    margin-left: 26px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ===== Painel inferior da legenda ===== */
div.painel-legenda {
    top: auto;
    background: transparent;
}

div.painel-legenda,
div.painel-legenda > .offcanvas-body {
    padding: 0;
    border: none;
    max-width: 300px !important;
    height: 320px;
}

.btn-fechar-legenda {
    display: inline;
    float: right;
    padding: 0;
    margin: 0;
    margin-top: -10px;
}

/* ===== Cards de membros/plenário ===== */
.card-conteudo {
    display: grid;
    height: inherit;
    gap: 0.5rem;
}

.plenario {
    font-size: 1.1rem;
    min-height: unset;
    padding: 0;
}

.presidente {
    margin-left: auto;
    margin-right: auto;
    float: none;
    place-content: center;
    display: flex;
}

.presidente-container {
    max-width: 600px !important;
}

.ministro-conteudo > div {
    max-width: 600px !important;
}

.presidente-container > * {
    place-content: center;
}

.ministro-card {
    font-size: .9rem;
    margin-bottom: 32px;
    display: flex;
    place-content: center;
}

.ministro-galeria {
    display: flex;
}

.ministro-galeria .ministros {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.ministros {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 auto;
    padding: 1em;
}

.card-plenario.card {
    background-color: transparent;
    background-clip: unset;
    border: none;
    border-radius: unset;
}

.ministro-texto {
    display: flex;
    align-self: center;
    padding-left: 0.7em;
}