/* Estilos gerais para a página de visualização de eleição - Versão Clássica UI
visualizar_eleicao.css
*/
:root {
    --primary-color: #cc0000;
    --primary-dark: #990000;
    --primary-light: #ff3333;
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-light: #f8f9fa;
    --shadow-color: rgba(204, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-color: #e0e0e0;
    --card-border-radius: 8px;
    --section-border-radius: 5px;
}

body {
    background-color: #f5f5f5;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Barra de navegação com estilo mais tradicional */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand i {
    color: var(--primary-color);
    margin-right: 8px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.7rem 1rem;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-light);
}

.nav-link i {
    margin-right: 5px;
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(204, 0, 0, 0.05);
    border-bottom-color: var(--primary-color);
}

/* Container principal */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 15px;
}

/* Card de conteúdo mais clássico */
.content-card {
    background-color: white;
    border-radius: var(--card-border-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #fcfcfc;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-title i {
    font-size: 1.3rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.2rem 1.5rem;
    background-color: #fcfcfc;
    border-top: 1px solid var(--border-color);
}

/* Informações da eleição */
.eleicao-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary-light);
    text-align: center;
}

.info-panel {
    background-color: white;
    border-radius: var(--section-border-radius);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
    border: 1px solid var(--border-color);
}

.info-panel-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.info-panel-header i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.info-panel-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 0.7rem 0.3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-table th {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    width: 40%;
    background-color: rgba(0, 0, 0, 0.02);
}

.info-table td {
    color: var(--text-primary);
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

.info-table .highlight {
    font-weight: 600;
    color: var(--primary-color);
}

/* Seção de estatísticas */
.participation-stats-panel {
    border-left: 4px solid #007bff;
    border-radius: var(--section-border-radius);
    background-color: #f8fbff;
}

.participation-stats-panel .info-panel-header {
    color: #007bff;
    border-bottom-color: rgba(0, 123, 255, 0.2);
}

.participation-stats-panel .info-panel-header i {
    color: #007bff;
}

.donut-chart-container {
    padding: 1rem;
    height: 280px;
    position: relative;
    background-color: white;
    border-radius: var(--section-border-radius);
    border: 1px solid #eaeaea;
    margin-bottom: 1rem;
}

.stats-cards-container {
    padding: 0.5rem;
}

.stats-card {
    background-color: white;
    border-radius: var(--section-border-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 100%;
    border: 1px solid #eaeaea;
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #666;
    border: 1px solid #e5e5e5;
}

.stats-icon.active {
    background-color: #28a745;
    color: white;
    border-color: #218838;
}

.stats-icon.inactive {
    background-color: #dc3545;
    color: white;
    border-color: #c82333;
}

.stats-info {
    flex-grow: 1;
}

.stats-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.3rem;
}

.stats-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stats-percentage {
    font-size: 0.85rem;
    color: #666;
}

/* Legenda do gráfico */
.chart-legend {
    background-color: white;
    border-radius: var(--section-border-radius);
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #eaeaea;
}

.legend-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    padding: 5px;
    border-radius: 3px;
}

.legend-item:hover {
    background-color: #f9f9f9;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-color.participaram {
    background-color: #28a745;
}

.legend-color.nao-participaram {
    background-color: #dc3545;
}

.legend-text {
    flex-grow: 1;
}

.legend-value {
    font-weight: 600;
    color: #333;
}

/* Resultado da votação */
.resultado-sumario {
    margin-bottom: 1.5rem;
    text-align: center;
}

.vencedor-badge {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
    border: 1px solid #218838;
}

.vencedor-badge.empate {
    background-color: #fd7e14;
    border: 1px solid #e06500;
    box-shadow: 0 2px 5px rgba(253, 126, 20, 0.3);
}

.vencedor-badge i {
    margin-right: 5px;
}

.resultados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.resultado-card {
    background-color: white;
    border-radius: var(--section-border-radius);
    padding: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
}

.resultado-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.resultado-card.vencedor {
    border: 2px solid #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.candidato-posicao {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #28a745;
    font-size: 1.3rem;
}

.candidato-foto {
    width: 80px;
    height: 80px;
    margin-right: 1rem;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
}

.candidato-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sem-foto {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #adb5bd;
}

.candidato-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.candidato-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.votos-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.votos-numero {
    font-weight: 600;
    margin-right: 0.5rem;
}

.votos-percentual {
    color: #666;
    font-size: 0.9rem;
}

/* Lista de candidatos */
.candidatos-grid {
    margin-top: 1rem;
}

.candidato-card {
    background-color: white;
    border-radius: var(--section-border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
}

.candidato-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.candidato-card.ativo {
    border-top: 4px solid #28a745;
}

.candidato-card.inativo {
    border-top: 4px solid #6c757d;
    opacity: 0.7;
}

.candidato-imagem {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    background-color: #f1f1f1;
    border-bottom: 1px solid #eaeaea;
}

.candidato-imagem img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidato-imagem .sem-foto {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
}

.candidato-info {
    padding: 1rem;
    text-align: center;
}

.candidato-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.candidato-status {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

/* Botões de ação mais clássicos */
.actions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: flex-end;
}

.action-btn {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 4px;
}

.action-btn i {
    font-size: 1rem;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Animações suavizadas */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Responsividade */
@media (max-width: 768px) {
    .resultados-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .card-header .status-badge {
        margin-left: 0;
    }

    .actions-container {
        justify-content: space-between;
        width: 100%;
    }
}


/* Adicione este CSS ao arquivo visualizar_eleicao.css */

/* Estilos para dropdown nos botões de ação */
.actions-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.actions-container .dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: background-color 0.15s ease-in-out;
}

.dropdown-item:hover, .dropdown-item:focus {
    color: #16181b;
    background-color: #f8f9fa;
    text-decoration: none;
}

.dropdown-item i {
    margin-right: 0.5rem;
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Estilos para a seção de abstenções e votos brancos */
.votos-brancos-info {
    margin-top: 1.5rem;
}

/* Estilos para mensagem informativa sobre percentuais */
.alert-info {
    background-color: #e9f5ff;
    border-color: #b8e0ff;
    color: #004085;
}

/* Estilos para as estatísticas de votos válidos na tabela */
.info-table .highlight {
    font-weight: 600;
    color: var(--primary-color);
}

/* Ajustes para o card de votos totais */
.stats-card .stats-description {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}