/**
 * Custom Review Card Styles - Okendo Three Column Layout
 * Clean, modern, and fully controlled layout
 */

.star-rating .user-rating
{
    color: #FF9900 !important;
}
.kt-wc-reviews-images-wrap-wrap
{
    margin: 0px !important;
}
/* Hide unwanted elements */
.woocommerce-Reviews-title,
.wcpr-overall-rating-and-rating-count,
[class*="wcpr-overall-rating-and-rating-count-"] {
    display: none !important;
}

.wcpr-avatar-container + img.avatar, .comment_container img.avatar, #reviews img.avatar
{
    display: block !important;
}

/* Custom imported avatar styles */
.wcpr-review-avatar img.avatar-custom {
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

/* ===== REVIEW IMAGES GALLERY (Above Reviews) ===== */
.wcpr-review-images-gallery-container {
    margin: 0 0 30px 0;
    padding: 0 0 20px 0;
    width: 100%;
    overflow: hidden;
    border-bottom: 2px solid #e0e0e0;
}

.wcpr-review-images-gallery {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Minimal scrollbar */
.wcpr-review-images-gallery::-webkit-scrollbar {
    height: 4px;
}

.wcpr-review-images-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.wcpr-review-images-gallery::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.wcpr-review-images-gallery::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.wcpr-gallery-item {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: opacity 0.2s ease;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.wcpr-gallery-item:hover {
    opacity: 0.85;
}

.wcpr-gallery-item img,
.wcpr-gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wcpr-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
}

/* Review Card Container - Flex Layout with wrap for helpful button */
.wcpr-custom-review-card {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    padding: 5px 0;
    margin-bottom: 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #E5E5E5;
    align-items: flex-start;
}

.wcpr-custom-review-card:hover {
    background: transparent;
}

/* ===== LEFT COLUMN: Avatar + User Info (Horizontal) ===== */
.wcpr-review-left {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
}

.wcpr-review-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.wcpr-review-avatar img,
.wcpr-review-avatar .wcpr-avatar-initials {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    font-size: 16px !important;
}

.wcpr-review-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.wcpr-review-author strong {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

.wcpr-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    color: #FF9900;
    font-size: 11px;
    font-weight: 500;
    width: fit-content;
}

.wcpr-verified-badge::before {
    content: "✓";
    font-weight: bold;
    font-size: 13px;
    color: #FF9900;
}

.wcpr-verified-badge::after {
    content: "🛡️";
    font-size: 11px;
}

.wcpr-review-date {
    display: none !important;
}

/* ===== MIDDLE COLUMN: Rating + Content ===== */
.wcpr-review-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* First row: Rating + Date */
.wcpr-review-rating {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wcpr-review-rating .star-rating {
    font-size: 14px;
    color: #FF9900 !important;
}

.wcpr-review-rating .star-rating::before {
    color: #E0E0E0 !important;
}

.wcpr-review-rating .star-rating span::before {
    color: #FF9900 !important;
}

.wcpr-review-date {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.wcpr-review-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
}

.wcpr-review-content {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

.wcpr-review-content p {
    margin: 0 0 6px 0;
}

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

/* Helpful Buttons - Full width row at bottom, right aligned */
.wcpr-comment-helpful-button-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    border: none !important;
    border-top: none !important;
    margin-top: 8px;
    flex-basis: 100%;
    width: 100%;
}

.wcpr-comment-helpful-button-vote-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.wcpr-comment-helpful-button-label {
    color: #666;
    font-size: 12px;
}

.wcpr-comment-helpful-button-up-vote-count,
.wcpr-comment-helpful-button-down-vote-count {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.wcpr-comment-helpful-button {
    cursor: pointer;
    transition: all 0.2s ease;
    width: 20px;
    height: 20px;
    display: inline-block;
}

.wcpr-comment-helpful-button:hover {
    transform: scale(1.1);
}

.wcpr-comment-helpful-button-up-vote,
.wcpr-comment-helpful-button-down-vote {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.wcpr-comment-helpful-button-container.wcpr-comment-helpful-button-voted-up .wcpr-comment-helpful-button-up-vote-count {
    color: #FF9900;
}

.wcpr-comment-helpful-button-container.wcpr-comment-helpful-button-voted-down .wcpr-comment-helpful-button-down-vote-count {
    color: #FF9900;
}

/* ===== RIGHT COLUMN: Images ===== */
.kt-reviews-image-container {
    flex-shrink: 0;
    width: 160px;
}

.kt-wc-reviews-images-wrap-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    align-content: start;
    margin: 0;
}

.reviews-images-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
    float: none !important;
    margin: 0 !important;
}

.reviews-images-item:hover {
    transform: scale(1.05);
}

.reviews-images-item img,
.reviews-images-item video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    float: none !important;
}

/* Override default plugin styles */
.kt-reviews-image-container .kt-wc-reviews-images-wrap-wrap .reviews-images-item .review-images {
    width: 100% !important;
    height: 100% !important;
    float: none !important;
}

/* Single image: full width */
.kt-wc-reviews-images-wrap-wrap:has(.reviews-images-item:only-child) {
    grid-template-columns: 1fr;
    align-content: stretch;
}

.kt-wc-reviews-images-wrap-wrap:has(.reviews-images-item:only-child) .reviews-images-item {
    aspect-ratio: auto;
    height: 100%;
    min-height: 200px;
}

/* Two images: side by side (default grid-template-columns: repeat(2, 1fr) handles this) */

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .wcpr-custom-review-card {
        flex-direction: column;
        gap: 16px;
        padding: 5px 0;
    }
    
    .wcpr-review-left {
        width: 100%;
        flex-direction: row;
        align-items: center;
    }
    
    .wcpr-review-author {
        flex: 1;
    }
    
    .kt-reviews-image-container {
        width: 100%;
        max-width: 100%;
        align-self: flex-start;
    }
    
    /* Force 2 column grid layout on mobile - larger images */
    .kt-reviews-image-container .kt-wc-reviews-images-wrap-wrap,
    .kt-wc-reviews-images-wrap-wrap {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        float: none !important;
        clear: both !important;
        max-width: 400px !important;
    }
    
    /* Force grid items on mobile - override float */
    .kt-reviews-image-container .kt-wc-reviews-images-wrap-wrap .reviews-images-item,
    .reviews-images-item {
        float: none !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
    }
    
    /* Force images to fit in grid cells on mobile */
    .kt-reviews-image-container .kt-wc-reviews-images-wrap-wrap .reviews-images-item img,
    .kt-reviews-image-container .kt-wc-reviews-images-wrap-wrap .reviews-images-item .review-images,
    .reviews-images-item img,
    .reviews-images-item .review-images {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 !important;
        object-fit: cover;
        float: none !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Single image on mobile: spans both columns */
    .kt-wc-reviews-images-wrap-wrap:has(.reviews-images-item:only-child) {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .kt-wc-reviews-images-wrap-wrap:has(.reviews-images-item:only-child) .reviews-images-item {
        grid-column: 1 / -1;
        aspect-ratio: auto;
        min-height: 200px;
    }
    
    /* Review images gallery on mobile - same size */
    .wcpr-gallery-item {
        width: 90px;
        height: 90px;
    }
}

