/* ====================================
   WOO FAKE REVIEWS - FRONTEND STYLES
   ==================================== */

/* Review Title */
.wfr-review-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #1e293b;
    line-height: 1.4;
}

/* Review Content */
.wfr-review-content {
    margin-bottom: 16px;
}

.wfr-review-content p {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 12px 0;
}

.wfr-review-content p:last-child {
    margin-bottom: 0;
}

/* Review Images Wrapper */
.wfr-review-images-wrapper {
    margin-top: 16px;
    background: #f8fafc;
    padding: 14px;
    border-radius: 10px;
}

/* Review Images Header */
.wfr-review-images-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
}

.wfr-review-images-header .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Review Images Gallery */
.wfr-review-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    max-width: 100%;
}

/* Remove unwanted p and br tags inside images wrapper */
.wfr-review-images p,
.wfr-review-images br {
    display: none;
}

/* Ensure consistent sizing for all images */
.wfr-review-image {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.wfr-review-image:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.wfr-review-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Image Overlay */
.wfr-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(139, 92, 246, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.wfr-review-image:hover .wfr-image-overlay {
    opacity: 1;
}

.wfr-image-overlay .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: white;
}

/* Review Meta */
.wfr-review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    padding-bottom: 14px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

/* Verified Badge */
.wfr-review-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.wfr-review-verified .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Review Date */
.wfr-review-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.wfr-review-date .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Enhanced WooCommerce Review Cards */
.woocommerce-Reviews .comment_container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
}

.woocommerce-Reviews .comment_container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
    transform: translateY(-2px);
}

/* Review Header */
.woocommerce-Reviews .comment-text {
    padding-left: 0;
}

.woocommerce-Reviews .meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.woocommerce-Reviews .meta strong {
    font-size: 16px;
    color: #1e293b;
    font-weight: 600;
}

.woocommerce-Reviews .meta time {
    color: #94a3b8;
    font-size: 13px;
}

/* Avatar Enhancement */
.comment-author .avatar {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Avatar Position Fix for WooCommerce */
.woocommerce #reviews #comments ol.commentlist li img.avatar {
    top: 10px !important;
    left: 10px !important;
}

/* Star Rating Enhancement */
.star-rating {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
}

.star-rating::before {
    color: #fbbf24 !important;
    font-size: 16px !important;
    letter-spacing: 2px;
}

/* Fancybox Customization */
.fancybox__container {
    --fancybox-bg: rgba(0, 0, 0, 0.95);
}

.fancybox__backdrop {
    background: rgba(0, 0, 0, 0.95);
}

.fancybox__slide {
    padding: 20px;
}

.fancybox__content {
    background: transparent;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wfr-review-images-wrapper {
        padding: 12px;
    }
    
    .wfr-review-images {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .wfr-image-overlay .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }
    
    .wfr-review-title {
        font-size: 16px;
    }
    
    .wfr-review-content p {
        font-size: 14px;
    }
    
    .wfr-review-meta {
        gap: 8px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
    
    .woocommerce-Reviews .comment_container {
        padding: 16px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .wfr-review-images-wrapper {
        padding: 10px;
    }
    
    .wfr-review-images {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .wfr-review-images-header {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .wfr-review-verified,
    .wfr-review-date {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .wfr-review-meta {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .woocommerce-Reviews .comment_container {
        padding: 14px;
        border-radius: 10px;
    }
}

/* Large screens - max 4 columns */
@media (min-width: 1200px) {
    .wfr-review-images {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        max-width: 600px;
    }
}

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

.woocommerce-Reviews .comment_container {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading State */
.wfr-review-image.loading {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Fix for WooCommerce default spacing */
.woocommerce-Reviews-title {
    margin-bottom: 20px;
}

#reviews .woocommerce-Reviews {
    padding-top: 10px;
}

/* Ensure proper spacing in review list */
.woocommerce-Reviews .commentlist {
    margin: 0;
    padding: 0;
}

.woocommerce-Reviews .comment {
    list-style: none;
}

/* Additional CSS to prevent conflicts */
.wfr-review-images a.wfr-review-image {
    text-decoration: none;
    display: block;
}

.wfr-review-images a.wfr-review-image:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
