/* --- AJUSTES LOCAIS PARA LGPD --- */

/* HOTFIX: Evita o "pulo" do layout quando o modal abre e a barra de rolagem some */
html {
    scrollbar-gutter: stable;
}

/* --- CORREÇÕES DE PARIDADE VISUAL (OVERRIDE BOOTSTRAP) --- */

/* Força as fontes da Intranet sobrepondo o reset do Bootstrap */
body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6, 
.section-title, 
.card h3, 
.btn {
    font-family: var(--font-title) !important;
}

/* Corrige o peso da fonte do H1 */
.section-title {
    font-weight: 700 !important; 
    letter-spacing: -0.5px;
}

/* --- AJUSTES ESTRUTURAIS DO CARD --- */

/* 
   1. AUMENTO DA CAPA:
   Aumentado para 55% para dar mais destaque à miniatura do PDF.
*/
.card-image-wrapper {
    height: 55% !important; 
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px; /* Reduzi a margem inferior da imagem para ganhar espaço */
}

.card-image-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card h3 {
    font-weight: 700;
    width: 100%;
    
    /* Altura reservada para o texto */
    height: 60px; 
    
    /* 2. ESPAÇAMENTO (PAD): Garante separação entre o texto e o botão */
    margin-bottom: 15px;
    
    /* Centralização Flexbox */
    display: flex;
    align-items: center;
    justify-content: center;
    
    overflow: hidden; 
    line-height: 1.1;
    padding: 0 5px;
    text-align: center;
}

/* 
   3. BOTÃO MENOR:
   Reduzido o padding e a fonte para ficar mais compacto.
   Usa margin-top: auto para fixar no rodapé do card.
*/
.card .btn {
    margin-top: auto;
    margin-bottom: 5px;
    padding: 6px 14px; /* Mais compacto (era 10px 16px) */
    font-size: 0.85rem; /* Fonte ligeiramente menor */
    border-radius: 20px;
}

/* Remove sombra preta no texto do botão ao passar o mouse */
.btn:hover {
    text-shadow: none !important;
    color: #fff !important;
    transform: translateY(-2px);
}


/* --- ESTILOS ESPECÍFICOS LGPD --- */

.pdf-card-trigger {
    cursor: pointer;
}

#pdfViewerIframe {
    width: 100%;
    height: 75vh;
    display: block;
}

/* --- CORREÇÕES PARA O BOOTSTRAP DENTRO DO TEMA --- */

body.dark-theme .modal-content {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #444;
}

body.dark-theme .modal-header {
    border-bottom: 1px solid #444;
}

body.dark-theme .modal-footer {
    border-top: 1px solid #444;
}

body.dark-theme .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

body.dark-theme .form-control {
    background-color: #404040;
    border-color: #555;
    color: #fff;
}

body.dark-theme .form-control:focus {
    background-color: #404040;
    color: #fff;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(30, 136, 229, 0.25);
}

body.dark-theme label {
    color: #e0e0e0 !important;
}

body.dark-theme .modal-title {
    color: var(--secondary-color) !important;
}