/**
 * Review Collection Widget Styles - Matches Original Voxel Widget
 * 
 * @package Voxel_Toolkit
 */

/* Grid Layout - matches original elementor-grid */
.user-ratings-wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Review Card - matches original user-rating class */
.user-rating {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-rating:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Review content wrapper */
.review-user-rating {
    flex: 1;
}

/* Post Thumbnail */
.review-user-thumbnail {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    display: block;
}

/* Post Title */
.review-post-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.review-post-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.review-post-title a:hover {
    color: #007cba;
}

/* Rating */
.review-rating {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.rating-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    margin-right: 3px;
}

.rating-icon:last-child {
    margin-right: 0;
}

.rating-icon svg {
    width: 18px;
    height: 18px;
}

.rating-icon-active {
    color: #FFB800;
}

.rating-icon-active svg {
    fill: #FFB800;
}

.rating-icon-inactive {
    color: #D4D6DD;
}

.rating-icon-inactive svg {
    fill: #D4D6DD;
}

/* Author Section */
.review-author {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.review-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.review-username {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* Review Content */
.review-content {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 15px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

/* Date */
.review-created-at {
    font-size: 12px;
    color: #999;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .user-ratings-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .user-ratings-wrapper {
        grid-template-columns: 1fr;
    }
    
    .user-rating {
        padding: 15px;
    }
    
    .review-user-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .review-post-title {
        font-size: 15px;
    }
    
    .rating-icon {
        font-size: 16px;
    }
    
    .rating-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .review-user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .review-username {
        font-size: 13px;
    }
    
    .review-content {
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .user-rating {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .review-post-title a {
        color: #e0e0e0;
    }
    
    .review-post-title a:hover {
        color: #4a9eff;
    }
    
    .review-username {
        color: #e0e0e0;
    }
    
    .review-content {
        color: #b0b0b0;
    }
    
    .review-created-at {
        color: #808080;
        border-top-color: #333;
    }
}

/* Loading State */
.user-ratings-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

.user-ratings-wrapper.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: user-reviews-spin 1s linear infinite;
}

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

/* Empty State */
.user-ratings-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.user-ratings-empty p {
    margin: 0;
    font-size: 16px;
}