/* Modal de Comparação */
.modal-comparacao {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-comparacao-conteudo {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-comparacao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.modal-comparacao-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.modal-comparacao-close {
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.3s ease;
}

.modal-comparacao-close:hover,
.modal-comparacao-close:focus {
    color: #000;
}

/* Tabela de Comparação */
.tabela-comparacao {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.tabela-comparacao thead {
    background-color: #f9f9f9;
}

.tabela-comparacao th,
.tabela-comparacao td {
    padding: 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.tabela-comparacao tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.tabela-comparacao tbody tr:hover {
    background-color: #f0f0f0;
}

.coluna-veiculo {
    position: relative;
    vertical-align: top;
    padding: 20px 15px !important;
    background-color: #fff !important;
}

.coluna-veiculo:hover {
    background-color: #fff !important;
}

.btn-remover-comparacao {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.btn-remover-comparacao:hover {
    background-color: #c82333;
}

.img-veiculo-comparacao {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.coluna-veiculo h5 {
    margin: 10px 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.versao-comparacao {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.oferta-comparacao {
    margin: 5px 0;
    font-size: 12px;
    color: #fff;
    background-color: #28a745;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
}

.label-comparacao {
    font-weight: 600;
    color: #333;
    text-align: left;
    background-color: #f0f0f0 !important;
}

.linha-valor {
    background-color: #e8f5e9 !important;
    font-size: 18px;
}

.linha-valor td {
    color: #27ae60;
    border-top: 2px solid #27ae60;
    border-bottom: 2px solid #27ae60;
}

/* Botões de ação */
.modal-comparacao-botoes {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-modal {
    padding: 10px 25px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-modal-fechar {
    background-color: #6c757d;
    color: white;
}

.btn-modal-fechar:hover {
    background-color: #5a6268;
}

.btn-modal-continuar {
    background-color: #007bff;
    color: white;
}

.btn-modal-continuar:hover {
    background-color: #0056b3;
}

/* Responsivo */
@media (max-width: 768px) {
    .modal-comparacao-conteudo {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .modal-comparacao-header h2 {
        font-size: 18px;
    }
    
    .tabela-comparacao th,
    .tabela-comparacao td {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .img-veiculo-comparacao {
        max-height: 150px;
    }
    
    .coluna-veiculo h5 {
        font-size: 14px;
    }
}
