/* 点赞按钮样式 */
.comment-helpful-section {
    position: relative;
    margin-top: 15px;
}

.helpful-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.helpful-text {
    font-size: 13px;
    color: #666;
}

.helpful-button-submit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 6px 8px 0px;
   /* background: #f5f5f5;
    border: 1px solid #ddd;*/
    border-radius: 0px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    z-index: 2;
}

/*
.helpful-button:hover {
    background: #e9e9e9;
    transform: translateY(-1px);
}
*/
/*
.helpful-button.voted {
    background: #e3f2fd;
    border-color: #2196F3;
    color: #2196F3;
}*/

.helpful-button.voted .helpful-icon {
    animation: pulse 0.3s ease;
}

.helpful-button:active {
    transform: translateY(1px);
}

.helpful-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.helpful-count {
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

.helpful-label {
    white-space: nowrap;
}

/* 加载动画 */
.helpful-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.helpful-button.loading .helpful-icon::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #ddd;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 成功提示 */
.helpful-success {
    position: relative;
}

.helpful-success::before {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    animation: fadeIn 0.3s ease;
}

/* 最有用评论区域 */
.most-helpful-comments {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.most-helpful-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.most-helpful-title::before {
    content: '👍';
}

.most-helpful-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.most-helpful-item {
    padding: 15px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    transition: transform 0.2s ease;
}

.most-helpful-item:hover {
    transform: translateX(5px);
    border-color: #2196F3;
}

.most-helpful-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.most-helpful-author {
    font-weight: 600;
    color: #333;
}

.most-helpful-count {
    background: #e3f2fd;
    color: #2196F3;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.most-helpful-content {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.custom-photo-reviews .reviews-grid {
    /*display: grid;*/
    gap: 20px;
}

.custom-photo-reviews .reviews-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.custom-photo-reviews .reviews-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.custom-photo-reviews .reviews-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.custom-photo-reviews .reviews-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.custom-photo-reviews .review-item {
    background: #fff;
    /*border: 1px solid #e0e0e0;*/
    border-radius: 8px;
    /*padding: 20px;*/
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}


.custom-photo-reviews .review-icon {
    display: flex;
    gap: 5px;
    width: 54px;
    height: 54px;
    min-width: 54px;
}

.reviews-masonry {
    column-count: 4;
    column-gap: 20px;
}

.reviews-masonry .review-item {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 20px;
}

.custom-photo-reviews .review-icon img {
    border-radius: 4px;
    width: 54px;
    height: 54px;
    min-width: 54px;
}

.review-product {
    padding: 3px;
    background: #f9f9f9;
    border-radius: 3px;
    border: solid 1px #eee;
    vertical-align: middle;
}

.review-title {
    font-size: 13px;
    font-weight: 400;
    box-sizing: border-box;
    word-break: break-word;
    margin-left: 8px;
    opacity: 0.6;
    letter-spacing: 0.05em;
    line-height: 20px;
    height: 46px;
    cursor: pointer;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.qualified-name {
    font-weight: 600;
    font-size: 10px;
    line-height: 10px;
}

.plugin-product-comment-ellipsis {
    overflow: hidden;
    line-height: 1.5;
}

.qualified svg {
    margin-right: 2px;
    width: 12px;
    height: 12px;
}

.qualified {
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    vertical-align: middle;
    margin-right: 4px;
    font-size: 10px;
    border-radius: 24px;
    padding: 3px 4px;
    background: rgba(var(--color-btn-background), 1);
    color: rgba(var(--color-btn-text), 1);
}
.sort-item-1 span{
    margin:0 !important;
}
.sort-item-11 {
    position: relative;
}
.sort-item-11 svg{
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translate(-50%, -50%);
}

.sort-item-1, .sort-item-2, .sort-item-3 {
    padding: 10px 0 10px 15px !important;
    cursor: pointer;
    font-size: 14px;
    width: 130px;
    white-space: nowrap;
    transition: background-color 0.2s;
    border-bottom:solid 1px #f2f2f2;
}

.review-contents {

    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    word-break: break-word;
    white-space: normal;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
}

.custom-photo-reviews .review-item{
    z-index: 0;
}

.custom-photo-reviews .review-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.custom-photo-reviews .review-stars {
    color: #ffb300;
    font-size: 18px;
    margin-bottom: -13px;
    height: 24px;
    line-height: 16px;
}

.custom-photo-reviews .review-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.custom-photo-reviews .review-thumbnails {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.custom-photo-reviews .review-thumbnails img {
    /*width: 60px;
    height: 60px;*/
    object-fit: cover;
    border-radius: 4px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.review-stars {
    display: -ms-flexbox;
    display: flex;
    position: absolute;
    left: 50%;
    -webkit-transform: translate(-50%, 0);
    -ms-transform: translate(-50%, 0);
    transform: translate(-50%, 0);
    white-space: nowrap;
    color: rgb(247, 181, 0);
    --rateWidth: 0%;
    background: #ffffff;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, .1);
    border-radius: 41px;
    padding: 4px 6px;
    z-index: 20;
}

.custom-photo-reviews .review-date {
    color: #888;
    font-size: 13px;
}

.product-comment-ratePercentWrapper {
    display: none;
}

.custom-photo-reviews .reviews-title {
    margin-bottom: 20px;
    font-size: 22px;
    cursor: pointer;
    position: relative;
}    

.load-more-container {
    text-align: center;
    margin-top: 20px;
}

.load-more-reviews {
    padding: 10px 35px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;

    display: -ms-inline-flexbox;
    display: inline-flex;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0;
    text-align: center;
    white-space: normal;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: opacity .15s ease-in-out;
    padding: 9px 18px;
    position: relative;
    border-radius: 0px;
    height: 46px;
    min-width: 125px;
    line-height: 18px;
    background: rgba(var(--color-btn-background), 1);
    border: 1px solid transparent;
    text-decoration: none;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    white-space: nowrap;
}
#reliable-photo-reviews .woocommerce-js button.button,.reviews-modal .woocommerce-js button.button{
    padding-left: 0px;
}
.custom-photo-reviews .review-item {
    background: #fff;
    border: 1px solid #eee !important;
}
.custom-photo-reviews .reviews-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-comment-ratePercentWrapper .product-comment-ratePercentBox {
    position: absolute;
    top: 44px;
    left: 0;
    background: #fff;
    z-index: 100;
    padding: 10px 20px 5px 20px;
    border: 1px solid rgba(221, 221, 216, .5);
    box-shadow: 0px 2px 20px rgba(0, 0, 0, .05);
}
.product-comment-ratePercentWrapper .product-comment-ratePercentBox .product-comment-ratePercentItem {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 0px;
    padding: 0px 0px;
}
.product-comment--star:not(:last-child) {
    margin-right: 2px;
}
.product-comment--star {
    position: relative;
    display: inline-block;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s;
}
.product-comment--star-first {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    width: var(--rateWidth, 50%);
    height: 100%;
    overflow: hidden;
    opacity: 0;
}
.product-comment-ratePercentWrapper .product-comment-ratePercentBox .product-comment-ratePercentItem .product-comment-rateWrap svg {    
    font-size: 12px;
}
.product-comment-ratePercentWrapper .product-comment-ratePercentBox .product-comment-ratePercentItem .product-comment-percent {
    width: 32px;
    font-size: 12px;
    line-height: 16px;
    margin-left: 8px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    word-break: normal;
    color: #000;
}
.product-comment-ratePercentWrapper .product-comment-ratePercentBox .product-comment-ratePercentItem .product-comment-progressPlace {
    width: 140px;
    margin-left: 8px;
    height: 8px;
    position: relative;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

@media (max-width: 768px) {

    .custom-photo-reviews .reviews-cols-3,
    .custom-photo-reviews .reviews-cols-4,
    .custom-photo-reviews .reviews-cols-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .custom-photo-reviews .reviews-cols-2,
    .custom-photo-reviews .reviews-cols-3,
    .custom-photo-reviews .reviews-cols-4,
    .custom-photo-reviews .reviews-cols-5 {
        grid-template-columns: 1fr;
    }
}

/*** 评价排序 */
.sort-container {
    max-width: 300px;
    position: relative;
}

.sort-header {
    padding: 0px 0px;
    border-radius: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border: 0.05em solid #000;
    line-height: 42px;
    text-align: center;
    font-size: 14px;
    width: 110px;
}

.sort-header:hover {
    background-color: #f2f2f2;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.expanded {
    transform: rotate(180deg);
}

.sort-options {
    border-top: none;
    border-radius: 0 0 4px 4px;
    /*max-height: 0;*/
    /*overflow: hidden;*/
    z-index: 1;
    height: 120px;
    position: absolute;
    transition: max-height 0.3s ease-out;
    background-color: white;
    animation: 0.2s product-comment-fadeIn forwards;
    background: #ffffff;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, .15);
    border-radius: 4px;
    top: 44px !important;
    width: 110px;
}

.review-text .review-contents p:last-child {
    margin-bottom: 0;
    line-height: 0px !important;
    height: 0px !important;
    margin-bottom: 0rem !important;
}

.sort-options.expanded {
    max-height: 200px;
}

.sort-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}
.loading__spinner{
    animation: spin 1s ease-in-out infinite;
}
.loading_spinner_circle {
    left: 0px;
    bottom: 0px;
}

.sort-item:last-child {
    border-bottom: none;
}

.sort-item:hover {
    background-color: #f9f9f9;
}
.product-comment-ratePercentWrapper .product-comment-ratePercentBox .product-comment-ratePercentItem .product-comment-progressPlace::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    opacity: 1;
    width: 100%;
    height: 100%;
    background-color: var(--startColor);
}
.product-comment-ratePercentWrapper .product-comment-ratePercentBox .product-comment-ratePercentItem .product-comment-progressPlace-2::before
{
    opacity: 0.1;
    background-color: var(--startColor);
}
.custom-photo-reviews .reviews-title:hover > .product-comment-ratePercentWrapper {
    display: block;
}
/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
#reliable-photo-reviews .reviews-grid.reviews-grid-product {
        display: grid;        
}
.product-comment-btns-cancel{
    color: #000;
    margin-right: 20px;
    cursor: pointer;
    font-size: 17px;
    z-index: 1000;
}

.review-item-one .react-hint,.review-item .react-hint{
    padding: 5px;
    position: absolute;
    z-index: 1;
    cursor: default;
    -webkit-animation: .5s fadeIn;
    animation: .5s fadeIn;
}
.review-item .react-hint{
    opacity: 0;
}
input[type="text"]{
    border-radius: 0px;
    outline: none;
}
input:focus, textarea:focus { outline: none !important;
  border-color:#eee; box-shadow: rgb(0, 0, 0) 0px 0px 0px 0rem; }
.review-item-one .react-hint .react-hint__content,.review-item .react-hint .react-hint__content{
    padding: 10px;
    border-radius: 5px;
    background: #000;
    color: #fff;    
}

.review-item-one .react-hint--top:after,.review-item .react-hint--top:after {
	top: auto;
	border-bottom: none;
	border-top-color: #000;
}

.review-item-one .react-hint--left:after,.review-item .react-hint--left:after {
	left: auto;
	border-right: none;
	border-left-color: #000;
}

.review-item-one .react-hint--right:after,.review-item .react-hint--right:after {
	right: auto;
	border-left: none;
	border-right-color: #000;
}

.review-item-one .react-hint--bottom:after,.review-item .react-hint--bottom:after {
	bottom: auto;
	border-top: none;
	border-bottom-color: #000;
}

.review-item-one .react-hint--top::after,.review-item .react-hint--top::after{
    top: auto !important;
    border-bottom: none !important;
    border-top-color: #000 !important;
}
.review-item-one .react-hint::after,.review-item .react-hint::after{
    content: '';
    width: 0;
    height: 0;
    margin: auto;
    display: block;
    position: absolute;
    top: 0;
    left: -3px;
    right: 0;
    bottom: 0;
    border: 5px solid transparent;
}

/* 响应式设计 */
@media (max-width: 920px) {
    .helpful-actions {
        flex-wrap: wrap;
    }
    
    .reviews-grid.reviews-cols-4 {
        column-count: 2;
        column-gap: 15px;
    }
    .reviews-masonry .review-item {    
        margin-bottom: 15px;
    }
    .helpful-text {
        width: 100%;
        margin-bottom: 8px;
    }
}