/**
 * Rusoft Reviews Styles
 * Integration with custom review system for WordPress + WooCommerce
 */

/* Container */
.rusoft-reviews-container {
    width: 100%;
    margin-top: 20px;
}

/* Comments Container */
.comments-bl {
    max-width: 1220px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Rating Header */
.rusoft-rating-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid #F2F2F2;
    border-bottom: 1px solid #F2F2F2;
}

.rusoft-rating-bars {
    flex: 1;
}

.rusoft-rating-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.rusoft-rating-bar-star {
    width: 12px;
    text-align: center;
    font-size: 13px;
    color: #333;
}

.rusoft-rating-bar-track {
    flex: 1;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.rusoft-rating-bar-fill {
    height: 100%;
    background: #ff9500;
    border-radius: 4px;
}

.rusoft-rating-summary {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rusoft-rating-score {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    line-height: 1;
}

.rusoft-rating-stars {
    display: flex;
    gap: 2px;
    margin: 6px 0;
    justify-content: center;
}

.rusoft-star {
    width: 16px;
    height: 16px;
    background: #ff9500;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.rusoft-star.empty {
    background: #e0e0e0;
}

.rusoft-star.small {
    width: 14px;
    height: 14px;
}

.rusoft-rating-count {
    font-size: 14px;
    font-weight: 500;
    color: #6C6C6C;
}

/* Media Gallery */
.rusoft-media-gallery {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.rusoft-media-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

.rusoft-media-more {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
    cursor: pointer;
}

/* Review Card */
.rusoft-review-card {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.rusoft-review-card:last-of-type {
    border-bottom: none;
}

.rusoft-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.rusoft-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.rusoft-review-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Avatar background colors */
.rusoft-review-avatar.bg-blue {
    background: #6b9dc7;
}

.rusoft-review-avatar.bg-teal {
    background: #7db9a8;
}

.rusoft-review-avatar.bg-purple {
    background: #9b7db9;
}

.rusoft-review-avatar.bg-orange {
    background: #d4a574;
}

.rusoft-review-avatar.bg-green {
    background: #7db97d;
}

.rusoft-review-avatar.bg-pink {
    background: #b97d9b;
}

.rusoft-review-avatar.bg-red {
    background: #c76b6b;
}

.rusoft-review-avatar.bg-yellow {
    background: #d4c574;
}

.rusoft-review-meta {
    flex: 1;
    min-width: 0;
}

.rusoft-review-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.rusoft-review-rating {
    display: flex;
    gap: 2px;
}

.rusoft-review-author {
    font-size: 14px;
    color: #6C6C6C;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.rusoft-verified-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #1b8f3a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.rusoft-verified-badge {
    width: 16px;
    height: 16px;
    background: #4caf50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rusoft-verified-badge::after {
    content: '';
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.rusoft-review-date {
    font-size: 13px;
    color: #6C6C6C;
    margin-left: auto;
    white-space: nowrap;
}

.rusoft-review-product {
    font-size: 14px;
    color: #6C6C6C;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 2px;
    margin-bottom: 8px;
    display: inline-block;
    text-underline-offset: 2px;
}

.rusoft-review-product:hover {
    color: #6C6C6C;
}

.rusoft-review-text {
    font-size: 14px;
    line-height: 1.6;
    color: #1D1B20;
    margin-bottom: 12px;
}

.rusoft-review-photos {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.rusoft-review-photo {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
}

/* Admin Reply - Professional Conversation Style */
.reply-block {
    display: flex;
    margin-top: 12px;
    margin-left: 40px;
    gap: 12px;
}

.reply-line {
    width: 2px;
    flex-shrink: 0;
    background: #E0E0E0;
    border-radius: 2px;
}

.reply-content {
    flex: 1;
    background: #F9F9F9;
    border-radius: 8px;
    padding: 12px 14px;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.reply-avatar {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
}

.reply-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1b8f3a;
    color: #fff;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
    flex-shrink: 0;
}

.reply-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.reply-body {
    padding-left: 28px;
}

.reply-text {
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    margin: 0;
}

.rusoft-review-actions {
    display: block;
    margin-top: 12px;
}

.rusoft-review-helpful-text {
    font-size: 13px;
    color: #6C6C6C;
    display: block;
    margin-bottom: 8px;
}

.rusoft-review-btn {
    padding: 10px 12px;
    border: none;
    border-radius: 15px;
    background: #F2F2F2;
    font-size: 13px;
    color: #6C6C6C;
    cursor: pointer;
    transition: background 0.2s;
}

.rusoft-review-btn:hover {
    background: #eee;
}

.rusoft-review-btn.liked {
    background: #e3f2fd;
    border-color: #bbdefb;
    color: #1976d2;
}

/* Priority Icon Hover Effect */
.priority-icon-wrap {
    position: relative;
    display: inline-flex;
    cursor: help;
}

.priority-icon-wrap img {
    transition: filter 0.2s ease;
}

.priority-icon-wrap:hover img {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%);
}

.priority-icon-wrap::after {
    content: 'Проверенный покупатель';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #1D1B20;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    margin-bottom: 6px;
    z-index: 100;
}

.priority-icon-wrap::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1D1B20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    margin-bottom: -4px;
    z-index: 100;
}

.priority-icon-wrap:hover::after,
.priority-icon-wrap:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Show More Button */
.rusoft-show-more {
    width: 100%;
    padding: 12px 24px;
    margin-top: 20px;
    border: none;
    border-radius: 24px;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.rusoft-show-more:hover {
    background: #bbdefb;
}

.rusoft-show-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rusoft-show-more-icon {
    width: 16px;
    height: 16px;
    position: relative;
}

.rusoft-show-more-icon::before,
.rusoft-show-more-icon::after {
    content: '';
    position: absolute;
    background: #1976d2;
    border-radius: 1px;
}

.rusoft-show-more-icon::before {
    width: 2px;
    height: 12px;
    left: 7px;
    top: 2px;
}

.rusoft-show-more-icon::after {
    width: 12px;
    height: 2px;
    left: 2px;
    top: 7px;
}

/* No Reviews State */
.rusoft-no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #6C6C6C;
    font-size: 14px;
}

/* Review Wrapper Styles */
.review-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.review-wrapper .title-post {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    padding: 0 24px;
}

.review-wrapper .title-post h2 {
    margin: 0 0 8px 0;
    text-align: left;
}

.review-wrapper .title-post span {
    text-align: left;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .rusoft-reviews-container {
        padding: 16px;
    }

    .rusoft-rating-header {
        flex-direction: column;
        gap: 20px;
    }

    .rusoft-rating-summary {
        text-align: center;
    }

    .rusoft-rating-stars {
        justify-content: center;
    }

    .rusoft-review-card {
        padding: 16px 0;
    }

    .rusoft-review-header {
        gap: 10px;
    }

    .rusoft-review-avatar {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .rusoft-review-meta-top {
        flex-wrap: wrap;
        gap: 6px;
    }

    .rusoft-review-author {
        font-size: 13px;
    }

    .rusoft-review-date {
        margin-left: 0;
        width: 100%;
        font-size: 12px;
    }

    .rusoft-review-text {
        font-size: 13px;
        line-height: 1.5;
    }

    .rusoft-review-actions {
        gap: 8px;
    }

    .rusoft-review-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .rusoft-media-gallery {
        gap: 6px;
    }

    .rusoft-media-thumb,
    .rusoft-media-more {
        width: 56px;
        height: 56px;
    }

    .rusoft-review-photo {
        width: 56px;
        height: 56px;
    }

    /* Admin Reply Mobile Styles */
    .reply-block {
        margin-top: 10px;
        margin-left: 20px;
        gap: 8px;
    }

    .reply-line {
        width: 2px;
    }

    .reply-content {
        padding: 10px 12px;
        border-radius: 6px;
    }

    .reply-header {
        gap: 6px;
        margin-bottom: 6px;
    }

    .reply-avatar {
        width: 18px;
        height: 18px;
    }

    .reply-icon {
        width: 12px;
        height: 12px;
        font-size: 7px;
    }

    .reply-title {
        font-size: 12px;
    }

    .reply-body {
        padding-left: 24px;
    }

    .reply-text {
        font-size: 13px;
        line-height: 1.55;
    }
}

@media (max-width: 480px) {
    .rusoft-reviews-container {
        padding: 12px;
        border-radius: 8px;
    }

    .rusoft-rating-header {
        gap: 16px;
        margin-bottom: 16px;
    }

    .rusoft-rating-score {
        font-size: 28px;
    }

    .rusoft-show-more {
        padding: 10px 16px;
        font-size: 13px;
    }
}