/**
 * Recently Viewed Vehicles Widget Styling
 *
 * @package WeymanBusinessHub
 */

/* Widget Container */
.whdr-recently-viewed-widget {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

/* Header */
.whdr-rv-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.whdr-rv-header h3 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whdr-rv-header h3 svg {
    color: #d63638;
}

.whdr-rv-subtitle {
    margin: 0;
    font-size: 14px;
    color: #666666;
}

/* Grid */
.whdr-rv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Item */
.whdr-rv-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whdr-rv-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.whdr-rv-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image */
.whdr-rv-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    position: relative;
}

.whdr-rv-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whdr-rv-item:hover .whdr-rv-image::after {
    opacity: 1;
}

/* Info */
.whdr-rv-info {
    padding: 16px;
}

.whdr-rv-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.whdr-rv-price {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #d63638;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .whdr-recently-viewed-widget {
        margin: 20px 0;
        padding: 20px 16px;
    }

    .whdr-rv-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .whdr-rv-header h3 {
        font-size: 20px;
    }

    .whdr-rv-image {
        height: 140px;
    }

    .whdr-rv-info {
        padding: 12px;
    }

    .whdr-rv-title {
        font-size: 14px;
    }

    .whdr-rv-price {
        font-size: 16px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .whdr-rv-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .whdr-recently-viewed-widget {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        border-color: #333333;
    }

    .whdr-rv-header {
        border-bottom-color: #333333;
    }

    .whdr-rv-header h3 {
        color: #ffffff;
    }

    .whdr-rv-subtitle {
        color: #aaaaaa;
    }

    .whdr-rv-item {
        background: #2a2a2a;
    }

    .whdr-rv-title {
        color: #ffffff;
    }
}

/* Print - Hide widget */
@media print {
    .whdr-recently-viewed-widget {
        display: none !important;
    }
}
