/* ========================================
   COMPARAÇÃO DE RENTABILIDADE - PIXEL PERFECT
   ======================================== */

/* Subtítulo da comparação */
.comparison-subtitle {
    margin-top: 8px;
    margin-bottom: 24px;
}

.comparison-subtitle p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* Wrapper da tabela */
.comparison-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Tabela comparativa */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

/* Cabeçalho da tabela */
.comparison-table thead {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.comparison-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    border-right: 1px solid #e5e7eb;
}

.comparison-table th:last-child {
    border-right: none;
}

/* Colunas específicas do cabeçalho */
.period-column {
    width: 20%;
    min-width: 100px;
}

.comparison-table .investment-column {
    width: 20%;
    min-width: 140px;
    color: #8BC34A !important;
}

.comparison-table .cdi-column {
    width: 15%;
    min-width: 80px;
    color: #2E6C86 !important;
}

.comparison-table .poupanca-column {
    width: 15%;
    min-width: 100px;
    color: #f59e0b !important;
}

.comparison-table .ipca-column {
    width: 15%;
    min-width: 80px;
    color: #dc2626 !important;
}

/* Corpo da tabela */
.comparison-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.comparison-table tbody tr:hover {
    background-color: #f9fafb;
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table td {
    padding: 16px 12px;
    text-align: left;
    border-right: 1px solid #f3f4f6;
    font-weight: 500;
}

.comparison-table td:last-child {
    border-right: none;
}

/* Células específicas */
.period-cell {
    color: #374151;
    font-weight: 600;
}

.investment-value {
    color: #8BC34A !important;
    font-weight: 600;
}

.cdi-value {
    color: #2E6C86 !important;
    font-weight: 600;
}

.poupanca-value {
    color: #f59e0b !important;
    font-weight: 600;
}

.ipca-value {
    color: #dc2626 !important;
    font-weight: 600;
}

/* Bloco de destaque inferior */
.advantage-highlight {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
}

.advantage-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.advantage-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.advantage-icon i {
    color: #6b7280;
    font-size: 16px;
}

.advantage-text {
    flex: 1;
}

.advantage-title {
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.advantage-description {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

/* Tablets */
@media (max-width: 768px) {
    .comparison-subtitle p {
        font-size: 13px;
    }
    
    .comparison-table {
        font-size: 13px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
    }
    
    .period-column {
        min-width: 80px;
    }
    
    .investment-column {
        min-width: 120px;
    }
    
    .advantage-highlight {
        padding: 14px;
    }
    
    .advantage-title {
        font-size: 13px;
    }
    
    .advantage-description {
        font-size: 12px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .comparison-subtitle p {
        font-size: 12px;
    }
    
    .comparison-table {
        font-size: 12px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px 6px;
    }
    
    .period-column {
        min-width: 70px;
    }
    
    .investment-column {
        min-width: 100px;
    }
    
    .cdi-column,
    .poupanca-column,
    .ipca-column {
        min-width: 70px;
    }
    
    .advantage-highlight {
        padding: 12px;
    }
    
    .advantage-content {
        gap: 10px;
    }
    
    .advantage-icon {
        width: 18px;
        height: 18px;
    }
    
    .advantage-icon i {
        font-size: 14px;
    }
    
    .advantage-title {
        font-size: 12px;
    }
    
    .advantage-description {
        font-size: 11px;
    }
}

/* ========================================
   ACESSIBILIDADE
   ======================================== */

/* Foco para navegação por teclado */
.comparison-table:focus-within {
    outline: 2px solid #0070f3;
    outline-offset: 2px;
}

/* Estados de hover melhorados */
.comparison-table tbody tr:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Melhor contraste para leitores de tela */
@media (prefers-reduced-motion: reduce) {
    .comparison-table tbody tr {
        transition: none;
    }
    
    .comparison-table tbody tr:hover {
        transform: none;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .comparison-table {
        border: 2px solid #000;
    }
    
    .comparison-table th,
    .comparison-table td {
        border-color: #000;
    }
    
    .advantage-highlight {
        border: 2px solid #374151;
    }
}