 
/* Price Comparison Modal */
.price-comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.comparison-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Comparison Header */
.comparison-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.comparison-header h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.comparison-header p {
    opacity: 0.9;
    font-size: 1rem;
}

.selected-vehicle-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-vehicle-details h3 {
    margin-bottom: 0.3rem;
}

.selected-vehicle-stats {
    text-align: right;
}

/* Comparison Table */
.comparison-table-container {
    padding: 1.5rem;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.comparison-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.comparison-table tr:hover {
    background: #f8f9fa;
}

/* Row Highlighting */
.target-row {
    background: #e3f2fd !important;
    border-left: 4px solid #2196F3;
}

.target-row td:first-child {
    padding-left: calc(1rem - 4px);
}

.best-price {
    background: #e8f5e8 !important;
    border-left: 4px solid #4CAF50;
}

.best-price td:first-child {
    padding-left: calc(1rem - 4px);
}

/* Provider Cell */
.provider-cell {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.provider-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.provider-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.feature-tag {
    background: #f0f0f0;
    color: #666;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
}

.target-badge, .best-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.target-badge {
    background: #2196F3;
    color: white;
}

.best-badge {
    background: #4CAF50;
    color: white;
}

/* Battery Cell */
.battery-cell {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.battery-percentage {
    font-weight: 600;
    font-size: 1.1rem;
}

.battery-bar {
    width: 60px;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.battery-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444 0%, #ffaa00 50%, #44ff44 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Distance Cell */
.distance-cell {
    text-align: center;
}

.distance-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.walking-time {
    color: #666;
    font-size: 0.8rem;
}

/* Price Cells */
.price-cell {
    text-align: center;
    font-weight: 600;
}

.unlock-price {
    color: #ff9800;
}

.minute-price {
    color: #2196F3;
}

.total-price {
    color: #4CAF50;
    font-size: 1.2rem;
}

.best-total {
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.3rem;
}

/* Duration Headers */
.duration-header {
    text-align: center;
    background: #667eea !important;
    color: white !important;
}

/* Comparison Insights */
.comparison-insights {
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.comparison-insights h3 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.insight-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.insight-card.savings {
    border-left-color: #4CAF50;
}

.insight-card.battery {
    border-left-color: #ff9800;
}

.insight-card.distance {
    border-left-color: #2196F3;
}

.insight-card h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.insight-card p {
    color: #666;
    margin-bottom: 0.5rem;
}

.savings-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4CAF50;
}

/* Comparison Actions */
.comparison-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.comparison-actions .btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-close {
    background: #6c757d;
    color: white;
}

.btn-close:hover {
    background: #5a6268;
}

.btn-route {
    background: #2196F3;
    color: white;
}

.btn-route:hover {
    background: #1976D2;
}

.btn-book-cheapest {
    background: #4CAF50;
    color: white;
}

.btn-book-cheapest:hover {
    background: #45a049;
}

/* Provider Benefits */
.provider-benefits {
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #eee;
}

.provider-benefits h4 {
    margin-bottom: 0.8rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    padding: 0.3rem 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.benefits-list li::before {
    content: '✅';
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-modal-content {
        max-width: 98vw;
        margin: 1rem;
    }
    
    .comparison-table-container {
        padding: 1rem;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.8rem 0.5rem;
    }
    
    .selected-vehicle-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .insight-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-actions {
        flex-direction: column;
    }
    
    .comparison-actions .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .comparison-header {
        padding: 1rem;
    }
    
    .comparison-header h2 {
        font-size: 1.5rem;
    }
    
    .comparison-table {
        font-size: 0.8rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.6rem 0.3rem;
    }
    
    .provider-cell {
        min-width: 120px;
    }
    
    .battery-bar {
        width: 40px;
        height: 6px;
    }
    
    .insight-card {
        padding: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .comparison-modal-content {
        box-shadow: none;
        max-width: 100%;
        max-height: none;
    }
    
    .comparison-actions {
        display: none;
    }
    
    .comparison-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .comparison-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .comparison-table th {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .comparison-table td {
        border-bottom-color: #4a5568;
    }
    
    .comparison-table tr:hover {
        background: #4a5568;
    }
    
    .insight-card {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .comparison-insights {
        background: #2d3748;
    }
}
