/* Car Dashboard Styles - Added styling for car cards with thumbnails */
.cdv-car-dashboard {
    margin: 20px 0;
}

.cdv-car-dashboard h2 {
    margin-bottom: 25px;
    font-size: 28px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
}

.cdv-car-dashboard h2 .dashicons {
    margin-right: 10px;
    color: #0073aa;
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.cdv-car-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.cdv-car-item {
    padding: 0;
    border: none;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    margin-bottom: 0;
}

.cdv-car-item:hover {
    transform: translateY(-5px);
}

.cdv-car-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cdv-car-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.cdv-car-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cdv-car-card:hover .cdv-car-thumbnail img {
    transform: scale(1.05);
}

.cdv-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    color: #888;
    font-style: italic;
}

.cdv-car-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cdv-car-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.cdv-car-info {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.cdv-button-view-details {
    margin-top: auto;
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: 500;
    margin-top: 15px;
    align-self: flex-start;
}

.cdv-button-view-details:hover {
    background-color: #005f8b;
    color: white;
    text-decoration: none;
}

.cdv-button-add-car {
    margin-top: 20px;
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.cdv-button-add-car:hover {
    background-color: #3e8e41;
    color: white;
    text-decoration: none;
}

/* Success message styling */
.cdv-success-message {
    background-color: #dff0d8;
    color: #3c763d;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 5px solid #5cb85c;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    .cdv-car-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .cdv-car-list {
        grid-template-columns: 1fr;
    }
}
