Ir para o conteúdo

MediaWiki:Common.css: mudanças entre as edições

De Normas Regulamentadoras
Sem resumo de edição
Etiqueta: Revertido
Sem resumo de edição
Etiqueta: Revertido
Linha 131: Linha 131:
     color: #ffffff;
     color: #ffffff;
}
}
/* CONTAINER GERAL DO INFOGRÁFICO */
/* CONTAINER DO INFOGRÁFICO */
.info-historico {
.info-historico {
     width: 100%;
     width: 100%;
     margin-top: 15px;
     margin-top: 15px;
     box-sizing: border-box;
     box-sizing: border-box;
    /* Inicializa o contador automático de Versões R de cima para baixo */
    counter-reset: versao-nr 0;
}
}


/* ESTRUTURA GRID DE DUAS COLUNAS */
/* TABELA BASE COM BORDAS EXTERNAS GROSSAS */
.info-bloco-grid {
.info-tabela-linha {
    display: grid;
    grid-template-columns: 1fr 1fr;
     width: 100%;
     width: 100%;
     border-left: 3px solid #000000;
     border-collapse: collapse;
     border-right: 3px solid #000000;
     border: 3px solid #000000;
     box-sizing: border-box;
     box-sizing: border-box;
    counter-reset: v-seq 0; /* Inicializa o contador de versões */
}
}


.info-bloco-esq {
/* CONFIGURAÇÃO DAS CÉLULAS */
    display: flex;
.info-tabela-linha td {
    align-items: center;
    justify-content: flex-start;
     padding: 8px 12px;
     padding: 8px 12px;
    box-sizing: border-box;
}
.celula-esq {
    width: 50%;
    text-align: left;
     font-weight: bold;
     font-weight: bold;
     font-size: 1.1em;
     font-size: 1.1em;
}
}


.info-bloco-dir {
.celula-dir {
     display: flex;
     width: 50%;
     align-items: center;
     text-align: right;
    justify-content: flex-end;
    padding: 8px 12px;
     font-size: 1.0em;
     font-size: 1.0em;
     font-weight: normal;
     font-weight: normal;
}
}


/* LÓGICA DE EXIBIÇÃO POR CSS */
/* LÓGICA DE EXIBIÇÃO: Oculta o texto do lado oposto sem criar caixas fantasmas */
.info-tipo-A .info-bloco-esq { visibility: hidden; }
.linha-v-A .celula-esq { color: transparent !important; user-select: none; }
.info-tipo-R .info-bloco-dir { visibility: hidden; }
.linha-v-R .celula-dir { color: transparent !important; user-select: none; }


/* COMPORTAMENTO DAS BORDAS */
/* REMOÇÃO DE DIVISÕES INTERNAS (Linhas contínuas por bloco) */
.info-tipo-R {
.info-tabela-linha tr {
    border-bottom: 3px solid #000000;
}
.info-tipo-R .info-bloco-esq {
    border-right: 3px solid #000000;
    margin-right: -3px;
}
.info-tipo-A {
     border-bottom: none;
     border-bottom: none;
    background-color: #ffffff; /* Alterações sempre em fundo branco */
}
}
.info-historico > div:first-child {
 
     border-top: 3px solid #000000;
/* O elemento R funciona como o fechamento real do caixote, passando a régua preta de 3px na base */
.linha-v-R {
     border-bottom: 3px solid #000000 !important;
}
}


/* CONTADOR AUTOMÁTICO DE VERSÕES (Injeta o número antes da data) */
/* Garante uma divisória vertical preta de 3px apenas nas linhas que contêm o marcador de versão R */
.info-tipo-R .info-bloco-esq::before {
.linha-v-R .celula-esq {
     counter-increment: versao-nr; /* Soma +1 para cada R encontrado */
     border-right: 3px solid #000000;
    content: "V" counter(versao-nr) " - "; /* Escreve na tela: V1 - , V2 - */
    font-size: 0.85em;
    opacity: 0.8;
    margin-right: 4px;
}
}


/* ENGENHARIA DE CORES DINÂMICAS PURIFICADA */
/* CONTADOR SEQUENCIAL PERFEITO (V1, V2, V3...) */
 
/* O incremento é feito estritamente quando o navegador lê uma célula visível do tipo R */
/* 1. Por padrão, TODA linha R recebe a paleta de cinzas do degradê */
.linha-v-R .celula-esq::before {
.info-tipo-R { background-color: #e0e0e0; color: #333333; }
    counter-increment: v-seq 1;
.info-tipo-R:nth-of-type(2n)  { background-color: #f5f5f5; }
    content: "V" counter(v-seq) " - ";
.info-tipo-R:nth-of-type(3n)  { background-color: #e0e0e0; }
     font-size: 0.9em;
.info-tipo-R:nth-of-type(4n)  { background-color: #cccccc; }
.info-tipo-R:nth-of-type(5n) { background-color: #b3b3b3; }
 
/* 2. A SOLUÇÃO JURÍDICA: Sempre que o contador do navegador marcar exatamente 1 (V1),
  independentemente de quantas linhas 'A' existam antes dele, ele força o VERDE VIGENTE */
.info-historico {
     counter-reset: versao-nr 0;
}
}


/* Criamos um gancho direto no elemento para monitorar o valor do contador */
/* ENGENHARIA DE CORES DINÂMICAS CONTÍNUAS (Degradê do topo para a base) */
.info-tipo-R .info-bloco-esq {
    counter-increment: versao-nr;
}


/* Se o contador for o primeiro (V1), aplica o verde e o texto branco no container pai */
/* Por padrão, todo o histórico assume o degradê de cinza conforme a profundidade */
.info-historico .info-tipo-R:has(.info-bloco-esq) {
.info-tabela-linha tr { background-color: #e0e0e0; color: #333333; }
    /* O navegador verifica dinamicamente qual bloco disparou o primeiro incremento */
.info-tabela-linha tr:nth-of-type(2n) { background-color: #f5f5f5; }
}
.info-tabela-linha tr:nth-of-type(3n) { background-color: #e0e0e0; }
.info-tabela-linha tr:nth-of-type(4n) { background-color: #cccccc; }
.info-tabela-linha tr:nth-of-type(5n) { background-color: #b3b3b3; }


/* Como o seletor :has pode ser pesado, aqui está a forma ultra-otimizada e universal:
/* A REGRA MÁTER: Toda a primeira caixa V1 fica completamente unificada em VERDE VIGENTE */
  Mudamos a cor de fundo do bloco usando uma classe que identifica o primeiro R da fila */
.info-tabela-linha tr {
.info-historico > div.info-tipo-R:first-of-type,
.info-historico > div.info-tipo-A ~ div.info-tipo-R:first-of-type {
     background-color: #2ecc71 !important;
     background-color: #2ecc71 !important;
     color: #ffffff !important;
     color: #ffffff !important;
}
}
.info-historico > div.info-tipo-R:first-of-type .info-bloco-esq,
 
.info-historico > div.info-tipo-A ~ div.info-tipo-R:first-of-type .info-bloco-esq {
/* Quando o primeiro fechamento 'R' acontece, ele encerra a V1 e aplica o degradê de cinza nas linhas seguintes */
     color: #ffffff !important;
.linha-v-R:first-of-type ~ tr {
    background-color: #e0e0e0 !important;
     color: #333333 !important;
}
}
/* Restabelece as cores de histórico suavizadas para as versões antigas (V2 para baixo) */
.linha-v-R:first-of-type ~ tr:nth-of-type(odd) { background-color: #f5f5f5 !important; }
.linha-v-R:first-of-type ~ tr:nth-of-type(even) { background-color: #e0e0e0 !important; }
.linha-v-R:nth-of-type(3) ~ tr { background-color: #cccccc !important; }
.linha-v-R:nth-of-type(4) ~ tr { background-color: #b3b3b3 !important; }

Edição das 14h16min de 3 de julho de 2026

/* Container do Card com Sombra Sutil e Borda Escura */
.norma-container {
    display: block; 
    clear: both; 
    width: 100%; 
    margin-bottom: 16px; 
    box-sizing: border-box;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #bbb !important;
    border-radius: 6px;
    overflow: hidden;
}

/* Cores Unificadas por Classe (Cabeçalho e Conteúdo) */
.norma-box-Geral th, .norma-box-Geral td {
    background-color: #e3f2fd !important;
}
.norma-box-Especial th, .norma-box-Especial td {
    background-color: #fff3e0 !important;
}
.norma-box-Setorial th, .norma-box-Setorial td {
    background-color: #e8f5e9 !important;
}
.norma-box-Revogada th, .norma-box-Revogada td {
    background-color: #ffebee !important;
}
/* Container Principal: Divide em duas colunas (70% para o texto, 30% para a barra lateral) */
.norma-page-layout {
    display: flex;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Coluna da Esquerda (Texto Principal) */
.norma-main-column {
    flex: 70%;
}

/* Coluna da Direita (Painéis Laterais) */
.norma-sidebar-column {
    flex: 30%;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espaço vertical entre as caixas da direita */
}

/* Estilo padrão de cada caixa/bloco desenhado */
.norma-block-box {
    background: #ffffff;
    border: 3px solid #000000; /* Borda grossa preta do desenho */
    border-radius: 4px;
    padding: 20px;
    box-sizing: border-box;
}

/* Títulos internos de cada caixa */
.norma-block-box h4 {
    margin-top: 0;
    font-size: 1.3em;
    font-weight: bold;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
}
/* Container que agrupa o infográfico */
.info-historico {
    width: 100%;
    margin-top: 15px;
    box-sizing: border-box;
}

/* Linha Base: Grid com 2 Colunas Iguais e bordas pretas grossas de 3px */
.info-bloco-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    border-left: 3px solid #000000;
    border-right: 3px solid #000000;
    box-sizing: border-box;
}

/* Coluna da Esquerda (Versões R) */
.info-bloco-esq {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 1.1em;
}

/* Coluna da Direita (Alterações A) */
.info-bloco-dir {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 12px;
    font-size: 1.0em;
    font-weight: normal;
}

/* REGRA DE RENDERAÇÃO JURÍDICA: */

/* Sempre que uma linha for do tipo R, ela 'passa a régua' e fecha o bloco com uma borda inferior grossa */
.info-tipo-R {
    border-bottom: 3px solid #000000;
    background-color: #ffeb3b; /* Fundo amarelo para destacar a cabeça da versão */
}

/* Cria uma divisória interna de 3px apenas entre o lado esquerdo e direito nas linhas do tipo R */
.info-tipo-R .info-bloco-esq {
    border-right: 3px solid #000000;
    margin-right: -3px;
}

/* Linhas do tipo A servem para empilhar conteúdo e não fecham a borda inferior, criando o efeito de 'bloco contínuo' */
.info-tipo-A {
    border-bottom: none;
    background-color: #ffffff;
}

/* Garante que a primeiríssima linha do topo (a mais recente do banco devido ao DESC) feche a borda superior do infográfico */
.info-historico > div:first-child {
    border-top: 3px solid #000000;
}

/* Destaque visual: Pinta a versão mais recente e ativa do topo de Verde Vigente */
.info-historico > div.info-tipo-R:first-child,
.info-historico > div.info-tipo-A:first-child ~ div.info-tipo-R {
    background-color: #2ecc71 !important;
    color: #ffffff;
}
/* CONTAINER DO INFOGRÁFICO */
.info-historico {
    width: 100%;
    margin-top: 15px;
    box-sizing: border-box;
}

/* TABELA BASE COM BORDAS EXTERNAS GROSSAS */
.info-tabela-linha {
    width: 100%;
    border-collapse: collapse;
    border: 3px solid #000000;
    box-sizing: border-box;
    counter-reset: v-seq 0; /* Inicializa o contador de versões */
}

/* CONFIGURAÇÃO DAS CÉLULAS */
.info-tabela-linha td {
    padding: 8px 12px;
    box-sizing: border-box;
}

.celula-esq {
    width: 50%;
    text-align: left;
    font-weight: bold;
    font-size: 1.1em;
}

.celula-dir {
    width: 50%;
    text-align: right;
    font-size: 1.0em;
    font-weight: normal;
}

/* LÓGICA DE EXIBIÇÃO: Oculta o texto do lado oposto sem criar caixas fantasmas */
.linha-v-A .celula-esq { color: transparent !important; user-select: none; }
.linha-v-R .celula-dir { color: transparent !important; user-select: none; }

/* REMOÇÃO DE DIVISÕES INTERNAS (Linhas contínuas por bloco) */
.info-tabela-linha tr {
    border-bottom: none;
}

/* O elemento R funciona como o fechamento real do caixote, passando a régua preta de 3px na base */
.linha-v-R {
    border-bottom: 3px solid #000000 !important;
}

/* Garante uma divisória vertical preta de 3px apenas nas linhas que contêm o marcador de versão R */
.linha-v-R .celula-esq {
    border-right: 3px solid #000000;
}

/* CONTADOR SEQUENCIAL PERFEITO (V1, V2, V3...) */
/* O incremento é feito estritamente quando o navegador lê uma célula visível do tipo R */
.linha-v-R .celula-esq::before {
    counter-increment: v-seq 1;
    content: "V" counter(v-seq) " - ";
    font-size: 0.9em;
}

/* ENGENHARIA DE CORES DINÂMICAS CONTÍNUAS (Degradê do topo para a base) */

/* Por padrão, todo o histórico assume o degradê de cinza conforme a profundidade */
.info-tabela-linha tr { background-color: #e0e0e0; color: #333333; }
.info-tabela-linha tr:nth-of-type(2n) { background-color: #f5f5f5; }
.info-tabela-linha tr:nth-of-type(3n) { background-color: #e0e0e0; }
.info-tabela-linha tr:nth-of-type(4n) { background-color: #cccccc; }
.info-tabela-linha tr:nth-of-type(5n) { background-color: #b3b3b3; }

/* A REGRA MÁTER: Toda a primeira caixa V1 fica completamente unificada em VERDE VIGENTE */
.info-tabela-linha tr {
    background-color: #2ecc71 !important;
    color: #ffffff !important;
}

/* Quando o primeiro fechamento 'R' acontece, ele encerra a V1 e aplica o degradê de cinza nas linhas seguintes */
.linha-v-R:first-of-type ~ tr {
    background-color: #e0e0e0 !important;
    color: #333333 !important;
}

/* Restabelece as cores de histórico suavizadas para as versões antigas (V2 para baixo) */
.linha-v-R:first-of-type ~ tr:nth-of-type(odd) { background-color: #f5f5f5 !important; }
.linha-v-R:first-of-type ~ tr:nth-of-type(even) { background-color: #e0e0e0 !important; }
.linha-v-R:nth-of-type(3) ~ tr { background-color: #cccccc !important; }
.linha-v-R:nth-of-type(4) ~ tr { background-color: #b3b3b3 !important; }