/* Vehicle Comparison Cards Component */

#vehicle-comparison-section {
    margin: 16px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border: 1px solid #d97706;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comparison-header {
    background: #fef3c7;
    padding: 16px;
    border-bottom: 1px solid #d97706;
}

.comparison-header h3 {
    color: #92400e;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.comparison-subtitle {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.comparison-vehicles {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.comparison-vehicle {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 4px solid #3498db;
    transition: all 0.2s ease;
}

.comparison-vehicle:hover {
    background: #f1f3f4;
    transform: translateX(2px);
}

.comparison-vehicle.top-pick {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05) 0%, #f8f9fa 100%);
}

.comparison-vehicle.good-value {
    border-left-color: #27ae60;
}

.comparison-vehicle.caution {
    border-left-color: #f39c12;
    opacity: 0.9;
}

.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.vehicle-name {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
}

.vehicle-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e74c3c;
    margin-left: 8px;
}

.vehicle-details {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.vehicle-mini-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-pros, .mini-cons {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.mini-pros {
    border-left: 2px solid #27ae60;
}

.mini-cons {
    border-left: 2px solid #e74c3c;
}

.mini-pros h5, .mini-cons h5 {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #2c3e50;
}

.mini-pros ul, .mini-cons ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mini-pros li, .mini-cons li {
    margin-bottom: 2px;
    padding-left: 12px;
    position: relative;
    font-size: 0.7rem;
    color: #495057;
}

.mini-pros li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 0.8rem;
}

.mini-cons li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
    font-size: 0.8rem;
}

.vehicle-mini-ratings {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
}

.mini-rating {
    text-align: center;
    flex: 1;
}

.mini-rating-label {
    font-size: 0.65rem;
    color: #7f8c8d;
    margin-bottom: 2px;
    font-weight: 500;
}

.mini-rating-score {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.vehicle-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comparison-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.comparison-badge.best {
    background: #e74c3c;
    color: white;
}

.comparison-badge.good {
    background: #27ae60;
    color: white;
}

.comparison-badge.caution {
    background: #f39c12;
    color: white;
}

.comparison-badge.neutral {
    background: #6c757d;
    color: white;
}

.dealer-contact {
    font-size: 0.7rem;
    color: #7f8c8d;
}

.dealer-contact strong {
    color: #2c3e50;
}

.comparison-summary {
    background: #f8f9fa;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #495057;
    line-height: 1.4;
}

.comparison-summary strong {
    color: #2c3e50;
}

/* Scrollbar styling for comparison section */
.comparison-vehicles::-webkit-scrollbar {
    width: 6px;
}

.comparison-vehicles::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.comparison-vehicles::-webkit-scrollbar-thumb {
    background: #d97706;
    border-radius: 3px;
}

.comparison-vehicles::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .vehicle-mini-pros-cons {
        grid-template-columns: 1fr;
    }
    
    .vehicle-mini-ratings {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .mini-rating {
        min-width: 60px;
    }
    
    .comparison-vehicles {
        max-height: 300px;
    }
}

/* Real-candidate detail rows (search data layer) */
.vc-candidates {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vc-candidate {
    padding: 8px 10px;
    background: #fffdf7;
    border: 1px solid #fde68a;
    border-left: 4px solid #d97706;
    border-radius: 6px;
    font-size: 13px;
}

.vc-candidate .vc-head {
    color: #2c3e50;
}

.vc-candidate .vc-meta {
    color: #92400e;
    font-weight: 600;
}

.vc-candidate .vc-why {
    color: #555;
    margin: 4px 0 2px;
    line-height: 1.35;
}

.vc-candidate .vc-source {
    color: #b45309;
    font-size: 12px;
    text-decoration: none;
}

.vc-candidate .vc-source:hover {
    text-decoration: underline;
}

/* Matches as clickable links */
.vc-matches-sub {
    font-size: 12px;
    font-style: italic;
    color: #555;
    margin: 6px 0 10px;
    line-height: 1.35;
}

.vc-matches {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.vc-match-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 10px 12px;
    background: #fffdf7;
    border: 1px solid #fde68a;
    border-left: 4px solid #d97706;
    border-radius: 6px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.vc-match-link:hover {
    background: #fef3c7;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.vc-link-head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: #2c3e50;
}

.vc-link-name {
    font-weight: 700;
}

.vc-match-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #92400e;
    background: #fde68a;
    border-radius: 10px;
    padding: 1px 8px;
    white-space: nowrap;
}

.vc-link-meta {
    color: #92400e;
    font-weight: 600;
    font-size: 12px;
    margin-top: 3px;
}

/* Real dealer-inventory extras (mileage · distance · dealer) — Visor listings only. */
.vc-link-extra {
    color: #57534e;
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
}

.vc-link-cta {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
}

/* Full comparison modal */
.vc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.vc-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.vc-modal-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fef3c7;
    border-bottom: 1px solid #d97706;
    color: #92400e;
    font-weight: 700;
    border-radius: 12px 12px 0 0;
}

.vc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #92400e;
    cursor: pointer;
    padding: 0 4px;
}

.vc-modal-sub {
    padding: 10px 18px;
    color: #555;
    font-size: 13px;
    font-style: italic;
    border-bottom: 1px solid #f1f3f4;
}

.vc-modal-cards {
    padding: 14px 18px;
    display: grid;
    gap: 12px;
}

.vc-modal-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
}

.vc-modal-card-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.vc-modal-name {
    font-weight: 700;
    color: #2c3e50;
}

.vc-modal-price {
    margin-left: auto;
    color: #92400e;
    font-weight: 700;
}

.vc-score-bar {
    position: relative;
    height: 18px;
    background: #f1f3f4;
    border-radius: 9px;
    margin: 8px 0;
    overflow: hidden;
}

.vc-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.vc-score-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #2c3e50;
}

.vc-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
    margin: 8px 0;
}

.vc-spec {
    font-size: 12px;
}

.vc-spec-k {
    color: #7f8c8d;
    margin-right: 4px;
}

.vc-spec-v {
    color: #2c3e50;
    font-weight: 600;
}

.vc-modal-why {
    color: #555;
    font-size: 13px;
    line-height: 1.4;
    margin: 6px 0;
}