/**
 * Vehizo Wishlist Module - Frontend Styles
 * 
 * @package Vehizo
 * @version 4.1.0
 */

/* Park Button Styles */
.btn-park {
    background: #f1f5f9; 
    color: #475569; 
    border: 2px solid #e2e8f0;
    padding: 0.875rem 1.75rem; 
    border-radius: 8px; 
    text-decoration: none;
    font-weight: 600; 
    font-size: 1rem; 
    transition: all 0.3s ease;
    display: inline-flex; 
    align-items: center; 
    gap: 0.5rem; 
    cursor: pointer; 
    text-align: center;
}

.btn-park:hover { 
    background: #e2e8f0; 
    border-color: #cbd5e1; 
    transform: translateY(-2px); 
    text-decoration: none; 
    color: #475569;
}

.btn-park.parked { 
    background: #fefce8; 
    color: #a16207; 
    border-color: #facc15; 
}

.btn-park:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Wishlist Counter */
.parked-vehicle-count { 
    background-color: #ef4444; 
    color: white; 
    border-radius: 50%; 
    padding: 2px 6px; 
    font-size: 10px; 
    vertical-align: top; 
    margin-left: 5px; 
    display: none; 
    min-width: 18px; 
    text-align: center;
}

/* Wishlist Container */
#vehizo-wishlist-container .no-results {
    text-align: center; 
    padding: 4rem 2rem; 
    background: white;
    border-radius: 12px; 
    box-shadow: 0 4px 16px rgba(0,0,0,0.05); 
    margin-top: 2rem;
}

/* Comparison Table */
.comparison-table-wrapper { 
    overflow-x: auto; 
    margin-top: 2rem;
}

.comparison-table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 800px; 
    background: white; 
    border-radius: 8px; 
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.comparison-table th, 
.comparison-table td { 
    padding: 1rem; 
    border: 1px solid #e2e8f0; 
    text-align: center; 
    vertical-align: top; 
}

.comparison-table thead th { 
    background-color: #f8fafc; 
    font-weight: 700; 
    color: #374151;
}

.comparison-table tbody th { 
    text-align: left; 
    font-weight: 600; 
    background-color: #f8fafc; 
    color: #374151;
}

.comparison-table .vehicle-col { 
    width: 25%; 
}

.comparison-table img { 
    max-width: 150px; 
    height: auto; 
    border-radius: 8px; 
    margin-bottom: 1rem; 
    transition: transform 0.3s ease;
}

.comparison-table img:hover {
    transform: scale(1.05);
}

.comparison-table .title { 
    font-weight: 700; 
    color: #1f2937; 
    margin-bottom: 0.5rem;
}

.comparison-table .price { 
    font-weight: 700; 
    font-size: 1.2rem; 
    color: #2563eb; 
}

.comparison-table .remove-from-list { 
    color: #ef4444; 
    cursor: pointer; 
    font-size: 0.9rem; 
    text-decoration: underline; 
    margin-top: 1rem; 
    display: inline-block;
    transition: color 0.3s ease;
}

.comparison-table .remove-from-list:hover {
    color: #dc2626; 
    text-decoration: none;
}

/* Floating Button */
.floating-park-button {
    position: fixed; 
    bottom: 25px; 
    right: 25px; 
    z-index: 999;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white; 
    padding: 1rem 1.5rem; 
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); 
    display: none;
    align-items: center; 
    gap: 0.75rem; 
    text-decoration: none;
    font-weight: 600; 
    transition: all 0.3s ease; 
    animation: slideInUp 0.5s ease; 
    border: none;
}

.floating-park-button:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); 
    color: white; 
    text-decoration: none;
}

.floating-park-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.floating-park-button .parked-vehicle-count { 
    padding: 3px 8px; 
    font-size: 12px; 
    display: inline-block; 
}

/* Animations */
@keyframes slideInUp { 
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

/* Wishlist Header */
.wishlist-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 1.5rem; 
    padding-bottom: 1.5rem; 
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap; 
    gap: 1rem;
}

.wishlist-header h2 { 
    margin: 0; 
    font-size: 1.8rem; 
    color: #1f2937; 
}

/* Back Button */
.btn-back {
    background: #f1f5f9; 
    color: #475569; 
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1.5rem; 
    border-radius: 8px; 
    text-decoration: none;
    font-weight: 600; 
    font-size: 0.9rem; 
    transition: all 0.3s ease;
    display: inline-flex; 
    align-items: center; 
    gap: 0.5rem;
}

.btn-back:hover { 
    background: #e2e8f0; 
    border-color: #cbd5e1; 
    transform: translateY(-2px); 
    color: #475569; 
    text-decoration: none;
}

.btn-back:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading States */
.wishlist-loading {
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: 2rem; 
    color: #6b7280;
}

.wishlist-spinner {
    width: 20px; 
    height: 20px; 
    margin-right: 0.5rem;
    border: 2px solid #e5e7eb; 
    border-top: 2px solid #3b82f6;
    border-radius: 50%; 
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .floating-park-button {
        bottom: 15px; 
        right: 15px; 
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .comparison-table-wrapper {
        margin: 1rem -1rem 0;
    }
    
    .comparison-table {
        min-width: 600px; 
        font-size: 0.9rem;
    }
    
    .comparison-table th, 
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .comparison-table img {
        max-width: 100px;
    }
    
    .wishlist-header {
        flex-direction: column; 
        align-items: stretch; 
        text-align: center;
    }
    
    .btn-park {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .floating-park-button {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
        bottom: 10px;
        right: 10px;
    }
    
    .comparison-table {
        min-width: 500px;
        font-size: 0.8rem;
    }
    
    .comparison-table th, 
    .comparison-table td {
        padding: 0.5rem 0.375rem;
    }
    
    .comparison-table img {
        max-width: 80px;
    }
    
    .wishlist-header h2 {
        font-size: 1.5rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-park {
        border-width: 3px;
    }
    
    .comparison-table th, 
    .comparison-table td {
        border-width: 2px;
    }
    
    .floating-park-button {
        border: 2px solid #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn-park,
    .btn-back,
    .floating-park-button,
    .comparison-table img,
    .remove-from-list {
        transition: none;
        animation: none;
    }
    
    .btn-park:hover,
    .btn-back:hover,
    .floating-park-button:hover {
        transform: none;
    }
    
    .comparison-table img:hover {
        transform: none;
    }
    
    @keyframes slideInUp {
        from, to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Print styles */
@media print {
    .floating-park-button,
    .btn-park,
    .btn-back,
    .remove-from-list {
        display: none !important;
    }
    
    .comparison-table {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .wishlist-header {
        border-bottom-color: #000;
    }
}