/* ═══════════════════════════════════════════════════════════════
   PNTP Legislativo — Frontend v3.4.0
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --pntp-primary:        #1a365d;
    --pntp-primary-light:  rgba(26, 54, 93, .10);
    --pntp-surface:        #ffffff;
    --pntp-bg:             #f8fafc;
    --pntp-text:           #1e293b;
    --pntp-text-muted:     #64748b;
    --pntp-border:         #e2e8f0;
    --pntp-radius:         12px;
    --pntp-radius-sm:      8px;
    --pntp-shadow:         0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.02);
    --pntp-font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pntp-wrapper {
    max-width: 100%;
    font-family: var(--pntp-font);
    color: var(--pntp-text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    /* Garante que o overflow do tema não quebre o modal position:fixed */
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   HERO — header full-width com cor primária
   ═══════════════════════════════════════════════════════════════ */

.pntp-hero {
    /* Usa --pntp-primary-bg para suportar gradiente configurado pelo admin */
    background: var(--pntp-primary-bg, var(--pntp-primary));
    border-bottom: 3px solid rgba(255,255,255,.10);

    /*
     * Full-bleed: ocupa 100vw independente do container do tema.
     * calc(50% - 50vw) = diferença entre metade do elemento pai e
     * metade do viewport. Ex: container 1200px, viewport 1600px
     * → cada lado sangra 200px além do container.
     * Requer body.has-pntp { overflow-x: clip } para evitar scroll.
     */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 28px 32px 24px;
    box-sizing: border-box;
}

.pntp-hero-inner {
    display: flex;
    align-items: center;
    gap: 18px;
}

.pntp-hero-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .15);
    border-radius: 14px;
    font-size: 22px;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,.20);
}

.pntp-hero-content {
    flex: 1;
    min-width: 0;
}

.pntp-titulo {
    margin: 0 0 8px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -.4px;
    line-height: 1.2;
    /* Fallback para títulos longos */
    overflow-wrap: break-word;
}

.pntp-hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pntp-hero-date {
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
    display: flex;
    align-items: center;
    gap: 5px;
}

.pntp-hero-date i {
    font-size: 11px;
    opacity: .8;
}

/* ─── Badges de classificação ─── */
.pntp-cls {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}

.pntp-cls i { font-size: 10px; }

.pntp-cls--essencial  { background: rgba(220, 38,  38, .20); color: #fca5a5; border: 1px solid rgba(220,38,38,.30); }
.pntp-cls--obrigatoria{ background: rgba(217,119,  6, .20); color: #fcd34d; border: 1px solid rgba(217,119,6,.30); }
.pntp-cls--recomendada{ background: rgba( 13,148,136, .20); color: #5eead4; border: 1px solid rgba(13,148,136,.30); }

/* ═══════════════════════════════════════════════════════════════
   FILTROS
   ═══════════════════════════════════════════════════════════════ */

.pntp-filtros {
    padding: 20px 32px;
    background: var(--pntp-surface);
    border-bottom: 1px solid var(--pntp-border);
}

/*
 * O form inteiro vira um card unificado: fundo levemente acinzentado,
 * borda suave e sombra. Quando qualquer campo recebe foco, a borda
 * inteira acende na cor primária — dá sensação de "bloco coeso".
 */
.pntp-filtros-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    background: var(--pntp-bg);
    border: 1.5px solid var(--pntp-border);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
    transition: border-color .2s, box-shadow .2s;
}

.pntp-filtros-form:focus-within {
    border-color: var(--pntp-primary);
    box-shadow: 0 0 0 3px var(--pntp-primary-light),
                0 4px 16px rgba(26, 54, 93, .06);
}

.pntp-filtro-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pntp-filtro-col label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--pntp-text-muted);
    padding-left: 2px;
}

.pntp-filtro-grow {
    flex: 1;
    min-width: 200px;
}

/* ─── Select de Ano ─── */
.pntp-select {
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--pntp-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--pntp-font);
    font-weight: 500;
    color: var(--pntp-text);
    background: var(--pntp-surface);
    min-width: 130px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    /* Seta nativa mantida — funciona em todos os browsers */
    -webkit-appearance: auto;
    appearance: auto;
}

.pntp-select:focus {
    outline: none;
    border-color: var(--pntp-primary);
    box-shadow: 0 0 0 3px var(--pntp-primary-light);
}

/* ─── Campo de busca ─── */
/*
 * Solução definitiva: ícone como background-image CSS no próprio input.
 * Nenhum elemento HTML extra, nenhuma dependência de position/flexbox.
 * Funciona em qualquer tema WordPress independente de sobrescritas.
 */
.pntp-input-search {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 16px 0 40px;
    border: 1.5px solid var(--pntp-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--pntp-font);
    color: var(--pntp-text);
    background-color: var(--pntp-surface);
    /* Ícone de lupa como SVG inline — cor neutra que funciona em qualquer bg */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 16px 16px;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s, background-image .2s;
    outline: none;
    box-shadow: none;
}

.pntp-input-search::placeholder { color: #b0bec5; }

/* No foco: lupa fica na cor primária */
.pntp-input-search:focus {
    outline: none;
    border-color: var(--pntp-primary);
    box-shadow: 0 0 0 3px var(--pntp-primary-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%231a365d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
}

.pntp-filtro-btns { display: flex; gap: 8px; align-items: flex-end; }

/* ─── Botões ─── */
.pntp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--pntp-radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--pntp-font);
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}

.pntp-btn i { font-size: 12px; }

.pntp-btn-primary {
    background: var(--pntp-primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(26,54,93,.25);
}

.pntp-btn-primary:hover {
    background: #0f2440;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,54,93,.30);
}

.pntp-btn-ghost {
    background: var(--pntp-surface);
    color: var(--pntp-text-muted);
    border: 1px solid var(--pntp-border);
}

.pntp-btn-ghost:hover {
    border-color: var(--pntp-primary);
    color: var(--pntp-primary);
    background: var(--pntp-primary-light);
}

/* ─── Rodapé dos filtros ─── */
.pntp-filtros-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--pntp-border);
    flex-wrap: wrap;
    gap: 10px;
}

.pntp-export-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pntp-text-muted);
}

.pntp-btn-export {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--pntp-border);
    border-radius: 6px;
    color: var(--pntp-text-muted);
    background: var(--pntp-surface);
    text-decoration: none;
    transition: all .2s;
    font-family: var(--pntp-font);
}

.pntp-btn-export i   { font-size: 11px; color: #0d9488; }
.pntp-btn-export:hover {
    border-color: var(--pntp-primary);
    color: var(--pntp-primary);
    background: var(--pntp-primary-light);
}

.pntp-count {
    font-size: 13px;
    color: var(--pntp-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pntp-count i { font-size: 12px; opacity: .8; }

/* ═══════════════════════════════════════════════════════════════
   BODY
   ═══════════════════════════════════════════════════════════════ */

.pntp-body { padding: 16px 24px 24px; background: var(--pntp-bg); }

/* ─── Loading state (AJAX) ─── */
.pntp-body.pntp-loading {
    opacity: .45;
    pointer-events: none;
    position: relative;
    transition: opacity .15s;
}

.pntp-body.pntp-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, .55) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: pntp-shimmer 1s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
}

@keyframes pntp-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* ─── Vazio ─── */
.pntp-vazio {
    text-align: center;
    padding: 64px 32px;
    background: var(--pntp-surface);
    border-radius: var(--pntp-radius);
    border: 1px solid var(--pntp-border);
}

.pntp-vazio-icon  { font-size: 40px; color: #cbd5e1; margin-bottom: 12px; }
.pntp-vazio-title { font-size: 16px; font-weight: 700; color: var(--pntp-text); margin: 0 0 6px; }
.pntp-vazio p     { color: var(--pntp-text-muted); font-size: 14px; margin: 0; }

/* ─── Accordion — bloco por ano ─── */
.pntp-ano-bloco {
    /*
     * Sangra além do padding lateral do .pntp-body (24px cada lado),
     * fazendo o header ocupar ponta a ponta do componente.
     */
    margin-left:  -24px;
    margin-right: -24px;
    margin-bottom: 20px;
}

.pntp-ano-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Padding compensa o negative margin: 24px (bleed) + 28px (interno) */
    padding: 20px 52px 20px 52px;
    background: var(--pntp-primary-bg, var(--pntp-primary));
    color: #fff;
    cursor: pointer;
    user-select: none;
    /* Sem border-radius: edge-to-edge fica mais limpo */
    border-radius: 0;
    transition: filter .15s;
}

/* Primeiro bloco do ano ganha radius só no topo, para não colidir com filtros */
.pntp-ano-bloco:first-child .pntp-ano-header {
    border-radius: var(--pntp-radius-sm) var(--pntp-radius-sm) 0 0;
}

.pntp-ano-header:hover         { filter: brightness(1.1); }
.pntp-ano-header-left          { display: flex; align-items: center; gap: 14px; }

.pntp-ano-icon {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12);
    border-radius: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

.pntp-ano-header h3    { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .4px; }
.pntp-ano-sub          { font-size: 12px; opacity: .65; display: block; margin-top: 2px; }
.pntp-chevron          { font-size: 14px; opacity: .6; transition: transform .3s ease; }
.pntp-ano-header.aberto .pntp-chevron { transform: rotate(180deg); }

.pntp-ano-body {
    background: var(--pntp-surface);
    border: 1px solid var(--pntp-border);
    border-top: none;
    /* Sem radius nem border lateral: acompanha o header edge-to-edge */
    border-radius: 0;
    border-left: none;
    border-right: none;
    /* Padding interno compensa o negative margin do bloco pai */
    padding: 20px 48px;
}

/* Último bloco ganha radius na base */
.pntp-ano-bloco:last-child .pntp-ano-body {
    border-radius: 0 0 var(--pntp-radius-sm) var(--pntp-radius-sm);
    border-left: 1px solid var(--pntp-border);
    border-right: 1px solid var(--pntp-border);
}

/* ─── Declaração de inexistência ─── */
.pntp-declaracao {
    background: #fef9ee;
    border-left: 4px solid #f59e0b;
    border-radius: var(--pntp-radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
}

.pntp-declaracao-inner { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; }
.pntp-dec-icon         { color: #d97706; font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.pntp-dec-content      { flex: 1; }
.pntp-dec-title        { display: block; font-size: 14px; font-weight: 700; color: var(--pntp-text); margin-bottom: 4px; }
.pntp-dec-texto        { margin: 0 0 6px; font-size: 14px; color: #475569; line-height: 1.5; }
.pntp-dec-date         { font-size: 12px; color: #d97706; }

/* ─── Registro (card horizontal) ─── */
.pntp-registro {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--pntp-surface);
    border: 1px solid var(--pntp-border);
    border-radius: var(--pntp-radius-sm);
    margin-bottom: 10px;
    transition: border-color .15s, box-shadow .15s;
}

.pntp-registro:hover        { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.pntp-registro:last-child   { margin-bottom: 0; }

.pntp-reg-left              { flex-shrink: 0; }

.pntp-reg-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9;
    border-radius: 10px;
    font-size: 18px;
    color: #94a3b8;
}

.pntp-reg-icon--has { background: #fef2f2; color: #dc2626; }

.pntp-reg-center      { flex: 1; min-width: 0; }
.pntp-reg-titulo      { margin: 0; font-size: 14px; font-weight: 600; color: var(--pntp-text); }
.pntp-reg-meta        { font-size: 12px; color: var(--pntp-text-muted); margin-top: 3px; display: block; }
.pntp-reg-conteudo    { margin-top: 8px; font-size: 13px; color: #475569; }
.pntp-reg-conteudo p  { margin: 2px 0; }

.pntp-reg-right { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

/* ─── Botões de arquivo ─── */
.pntp-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--pntp-font);
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid var(--pntp-primary);
    color: var(--pntp-primary);
    background: transparent;
    transition: all .2s;
    white-space: nowrap;
}

.pntp-file-btn i { font-size: 12px; }

.pntp-file-btn:hover {
    background: var(--pntp-primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,54,93,.20);
}

/* ─── Paginação ─── */
.pntp-paginacao-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: var(--pntp-surface);
    border: 1px solid var(--pntp-border);
    border-radius: var(--pntp-radius);
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.pntp-pag-info { font-size: 13px; color: var(--pntp-text-muted); font-weight: 500; }

.pntp-paginacao { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.pntp-pg {
    display: flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 4px;
    border-radius: var(--pntp-radius-sm);
    text-decoration: none;
    font-weight: 600; font-size: 13px;
    color: var(--pntp-text-muted);
    border: 1px solid var(--pntp-border);
    transition: all .2s;
}

.pntp-pg:hover     { border-color: var(--pntp-primary); color: var(--pntp-primary); background: var(--pntp-primary-light); }
.pntp-pg.ativa     { background: var(--pntp-primary); color: #fff; border-color: var(--pntp-primary); }
.pntp-pg-dots      { font-size: 13px; color: #94a3b8; padding: 0 4px; line-height: 36px; }

/* ═══════════════════════════════════════════════════════════════
   ÍNDICE DE SEÇÕES
   ═══════════════════════════════════════════════════════════════ */

.pntp-indice { max-width: 100%; font-family: var(--pntp-font); }

.pntp-indice-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 36px;
    background: var(--pntp-primary-bg, var(--pntp-primary));
}

.pntp-indice-header h2 { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0 0 6px; }
.pntp-indice-header p  { color: rgba(255,255,255,.65); margin: 0; font-size: 14px; }

.pntp-indice-dim h3 {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .8px; color: var(--pntp-primary);
    border-bottom: 2px solid var(--pntp-primary);
    padding-bottom: 6px; margin: 28px 0 12px;
}

.pntp-indice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

.pntp-indice-card {
    padding: 14px 16px;
    background: var(--pntp-surface);
    border: 1px solid var(--pntp-border);
    border-radius: var(--pntp-radius-sm);
    border-left: 4px solid #cbd5e1;
    transition: box-shadow .2s, transform .2s;
    text-decoration: none;
    display: block;
}

.pntp-indice-card:hover { box-shadow: var(--pntp-shadow); transform: translateY(-1px); }
.pntp-ic--essencial     { border-left-color: #dc2626; }
.pntp-ic--obrigatoria   { border-left-color: #f59e0b; }
.pntp-ic--recomendada   { border-left-color: #0d9488; }
.pntp-ic-info h4        { margin: 0 0 4px; font-size: 14px; font-weight: 600; }

.pntp-badge--essencial,
.pntp-badge--obrigatoria,
.pntp-badge--recomendada {
    display: inline-block; font-size: 9px; font-weight: 700;
    padding: 2px 8px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: .4px;
}

.pntp-badge--essencial  { background: #fef2f2; color: #b91c1c; }
.pntp-badge--obrigatoria{ background: #fffbeb; color: #92400e; }
.pntp-badge--recomendada{ background: #f0fdfa; color: #0d9488; }

/* ═══════════════════════════════════════════════════════════════
   ERRO
   ═══════════════════════════════════════════════════════════════ */

.pntp-erro {
    padding: 24px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--pntp-radius);
    color: #991b1b;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL PDF — injetado uma única vez no wp_footer
   ═══════════════════════════════════════════════════════════════ */

/*
 * overflow-x: clip no body quando PNTP está presente.
 * Diferente de overflow: hidden, o clip não cria um novo BFC (block
 * formatting context), então não afeta o layout do tema.
 * Necessário para o hero full-bleed não gerar scroll horizontal.
 */
body.has-pntp {
    overflow-x: clip;
}

/*
 * Usamos visibility + opacity + pointer-events em vez de display:none
 * para garantir compatibilidade com temas que sobrescrevem display em div.
 * A transição suave de opacidade é um bônus.
 */
#pntp-modal-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    z-index: 999999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, .65);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity .2s ease, visibility .2s ease;
}

#pntp-modal-overlay.ativo {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.pntp-modal {
    background: var(--pntp-surface);
    border-radius: var(--pntp-radius);
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pntp-slide-up .25s ease;
}

@keyframes pntp-slide-up {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.pntp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--pntp-border);
    flex-shrink: 0;
}

.pntp-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.pntp-modal-icon {
    width: 36px; height: 36px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #dc2626;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}

.pntp-modal-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--pntp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--pntp-font);
}

.pntp-modal-close {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: #f8fafc;
    border: 1px solid var(--pntp-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: var(--pntp-text-muted);
    transition: all .15s;
    flex-shrink: 0;
    padding: 0;
}

.pntp-modal-close:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

.pntp-modal-body {
    flex: 1;
    min-height: 0;
    background: #f1f5f9;
    position: relative;
}

/* Spinner de carregamento enquanto o iframe carrega */
.pntp-modal-body::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 32px; height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid var(--pntp-border);
    border-top-color: var(--pntp-primary);
    border-radius: 50%;
    animation: pntp-spin .7s linear infinite;
    z-index: 0;
}

@keyframes pntp-spin {
    to { transform: rotate(360deg); }
}

.pntp-modal-iframe {
    width: 100%;
    height: 65vh;
    border: none;
    display: block;
    position: relative;
    z-index: 1;
}

.pntp-modal-footer {
    display: flex;
    justify-content: center;
    padding: 14px 24px;
    border-top: 1px solid var(--pntp-border);
    flex-shrink: 0;
    gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .pntp-hero              { padding: 20px; }
    .pntp-hero-icon         { width: 42px; height: 42px; font-size: 18px; }
    .pntp-titulo            { font-size: 1.25rem; }
    .pntp-filtros           { padding: 16px 16px; }
    .pntp-filtros-form      { flex-direction: column; }
    .pntp-filtro-col,
    .pntp-filtro-grow       { min-width: 100%; }
    .pntp-body              { padding: 12px 16px; }
    /* Negative margin menor em mobile (body tem 16px de padding) */
    .pntp-ano-bloco         { margin-left: -16px; margin-right: -16px; }
    .pntp-ano-header        { padding: 16px 32px; }
    .pntp-ano-body          { padding: 14px 32px; }
    .pntp-registro          { flex-direction: column; align-items: flex-start; }
    .pntp-reg-right         { margin-top: 10px; }
    .pntp-filtros-bottom    { flex-direction: column; align-items: flex-start; }
    .pntp-modal-iframe      { height: 55vh; }
    .pntp-paginacao-wrap    { justify-content: center; }
}

@media (max-width: 480px) {
    .pntp-hero-inner { gap: 12px; }
    .pntp-hero-icon  { display: none; }
    .pntp-titulo     { font-size: 1.1rem; }
}
