/**
 * QP WooCommerce Reviews
 */

/* --- General & Variables --- */
:root {
    --qp-color-primary: #007bff; /* Blue */
    --qp-color-secondary: #f8f9fa; /* Light grey */
    --qp-color-text: #333;
    --qp-color-text-muted: #6c757d;
    --qp-color-border: #efefef;
    --qp-color-star: #ffb400; /* Orange/Yellow for stars */
    --qp-color-verified: #28a745; /* Green */
    --qp-color-recommend: #dc3545; /* Red */
    --qp-border-radius: 4px;
    --qp-spacing-xs: 5px;
    --qp-spacing-sm: 10px;
    --qp-spacing-md: 15px;
    --qp-spacing-lg: 20px;
    --qp-spacing-xl: 30px;
}
.qp-reviews-section {
    color: var(--qp-color-text);
}

/* Helper classes */
.qp-button-primary {
    background-color: var(--qp-color-primary) !important;
    border-color: var(--qp-color-primary) !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: var(--qp-border-radius) !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
    font-size: 14px!important;
    margin: 0 !important;
    box-shadow: unset!important;
}
.qp-button-primary:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
}

.qp-button-secondary {
    background-color: var(--qp-color-secondary) !important;
    border: 1px solid var(--qp-color-border) !important;
    color: var(--qp-color-text) !important;
    padding: 10px 20px !important;
    border-radius: var(--qp-border-radius) !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.qp-button-secondary:hover {
    background-color: #e2e6ea !important;
}
/* --- Review Section Layout --- */
#reviews.qp-reviews-section #comments {
    margin-bottom: var(--qp-spacing-lg);
}
.qp-reviews-main-title {
    margin-bottom: var(--qp-spacing-md);
    font-size: 1.5em;
    font-weight: 600;
}
.qp-reviews-summary-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--qp-spacing-lg);
    margin-bottom: var(--qp-spacing-lg);
    padding-bottom: var(--qp-spacing-lg);
    border-bottom: 1px solid var(--qp-color-border);
}

/* --- Review Summary Block --- */
.qp-review-summary-block {
    display: flex;
    flex: 1 1 400px;
    gap: var(--qp-spacing-lg);
    background-color: var(--qp-color-secondary);
    padding: var(--qp-spacing-md);
    border-radius: var(--qp-border-radius);
}
.qp-review-summary-block.qp-no-reviews {
    min-height: 100px;
    align-items: center;
    justify-content: center;
}
.qp-summary-left {
    text-align: center;
    flex-shrink: 0;
}
.qp-average-rating {
    margin-bottom: var(--qp-spacing-xs);
}
.qp-average-rating .qp-rating-value {
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1;
}
.qp-average-rating .qp-rating-max {
    font-size: 1.2em;
    color: var(--qp-color-text-muted);
}
.qp-average-rating .star-rating {
    margin: 8px auto 10px;
    color: var(--qp-color-star);
}
.qp-review-count {
    font-size: 14px;
    color: var(--qp-color-text-muted);
}
.qp-summary-right {
    flex-grow: 1;
}
.qp-rating-distribution {
    width: 100%;
}
.qp-dist-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.9em;
}
.qp-dist-stars {
    width: 45px;
    flex-shrink: 0;
    color: var(--qp-color-text-muted);
    display: flex;
    align-items: center;
    gap: 2px;
}
.qp-dist-stars .qp-star-icon {
    display: inline-block;
    vertical-align: middle;
}
.qp-dist-stars .qp-star-icon .star-active {
    fill: var(--qp-color-star);
}
.qp-dist-stars .star-num {
    width: 12px;
}
.qp-dist-bar {
    flex-grow: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 var(--qp-spacing-sm);
}
.qp-dist-bar span {
    display: block;
    height: 100%;
    background-color: var(--qp-color-star);
    border-radius: 4px;
}
.qp-dist-percentage {
    width: 50px;
    text-align: right;
    flex-shrink: 0;
    color: var(--qp-color-text-muted);
}

/* --- Image Gallery Summary --- */
.qp-review-image-gallery-summary {
    flex: 1 1 200px;
}
.qp-gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: var(--qp-spacing-sm);
}
.qp-gallery-thumbnail,
.qp-gallery-view-all {
    display: block;
	width: 65px;
    height: 77px;
    border-radius: var(--qp-border-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--qp-color-border);
}
.qp-gallery-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qp-gallery-view-all {
    background-color: var(--qp-color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8em;
    color: var(--qp-color-text);
    text-decoration: none;
    line-height: 1.2;
}
.qp-gallery-view-all:hover {
    background-color: #e2e6ea;
}
.qp-reviews-action-buttons {
    margin-bottom: var(--qp-spacing-lg);
    display: flex;
    gap: var(--qp-spacing-sm);
}
.qp-load-more-reviews-wrapper {
    text-align: center;
    margin-top: var(--qp-spacing-lg);
}

/* --- Review List --- */
.comment-list>li:not(:first-child), .commentlist>li:not(:first-child){
    border-top:unset!important;
    padding-top:15px!important;
}
.qp-review-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.qp-review-item {
    border-bottom: 1px solid var(--qp-color-border);
    padding: var(--qp-spacing-lg) 0;
    padding:0!important;
    margin:0!important;
}
.qp-review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    padding:20px 0 0!important;
    margin:0;
}
.qp-review-item .comment_container {
    display: flex;
    gap: var(--qp-spacing-md);
}
.qp-review-item .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Avatar container */
.qp-review-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    margin-right: 12px;
}

.qp-review-avatar img,
.qp-review-avatar .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: block;
}

.qp-avatar-letter {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--qp-color-verified);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.qp-review-item .comment-text {
    flex-grow: 1;
    padding:0!important;
}
.qp-review-header-wrapper,.qp-reply-header-wrapper {
    margin-bottom: var(--qp-spacing-sm);
}
.qp-author-rating,.qp-reply-author {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}
.qp-author-rating .woocommerce-review__author,.woocommerce-review__author {
    font-weight: 700;
    margin-right: var(--qp-spacing-md);
    font-size: 14px;
}
.woocommerce-review__verified{
    display: flex;
    align-items: center;
    font-size: 13px;
    color: green;
    gap: 3px;
}
.qp-review-author-meta {
    display: flex;
    margin-right: 15px;
    font-size: 0.9em;
    position: relative;
    align-items: center;
}
.qp-review-author-meta.no-choose{
    display: none;
}
.review-icon:before{
    content:'';
    background-repeat: no-repeat;
    background-size: contain;
    display: block;   
}
.icon-like:before{
    content:'';
    width: 13px;
    height: 13px;
    background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16px' height='16px' viewBox='0 0 16 16' version='1.1'%3E%3Cg id='surface1'%3E%3Cpath style=' stroke:none;fill-rule:nonzero;fill:rgb(0%25,0%25,0%25);fill-opacity:1;' d='M 16 9.5 C 16 9.101562 15.839844 8.726562 15.566406 8.449219 C 15.878906 8.109375 16.035156 7.652344 15.992188 7.179688 C 15.914062 6.332031 15.152344 5.667969 14.253906 5.667969 L 10.136719 5.667969 C 10.339844 5.046875 10.667969 3.910156 10.667969 3 C 10.667969 1.554688 9.4375 0.332031 8.667969 0.332031 C 7.972656 0.332031 7.480469 0.722656 7.457031 0.738281 C 7.378906 0.804688 7.332031 0.898438 7.332031 1 L 7.332031 3.261719 L 5.414062 7.421875 L 5.332031 7.460938 L 5.332031 7.332031 C 5.332031 7.148438 5.183594 7 5 7 L 1.667969 7 C 0.746094 7 0 7.746094 0 8.667969 L 0 14 C 0 14.917969 0.746094 15.667969 1.667969 15.667969 L 3.667969 15.667969 C 4.386719 15.667969 5.003906 15.207031 5.234375 14.566406 C 5.789062 14.851562 6.539062 15 7 15 L 13.121094 15 C 13.847656 15 14.480469 14.511719 14.628906 13.835938 C 14.707031 13.488281 14.660156 13.136719 14.511719 12.835938 C 15.003906 12.585938 15.332031 12.078125 15.332031 11.5 C 15.332031 11.265625 15.28125 11.039062 15.175781 10.835938 C 15.667969 10.585938 16 10.078125 16 9.5 Z M 4.667969 14 C 4.667969 14.550781 4.21875 15 3.667969 15 L 1.667969 15 C 1.113281 15 0.667969 14.550781 0.667969 14 L 0.667969 8.667969 C 0.667969 8.117188 1.117188 7.667969 1.667969 7.667969 L 1.667969 7.671875 L 4.664062 7.671875 L 4.664062 8.003906 C 4.664062 8.003906 4.667969 8.007812 4.667969 8.007812 Z M 14.59375 10.324219 C 14.464844 10.339844 14.355469 10.425781 14.316406 10.550781 C 14.273438 10.671875 14.308594 10.808594 14.402344 10.898438 C 14.574219 11.058594 14.667969 11.273438 14.667969 11.5 C 14.667969 11.921875 14.347656 12.273438 13.925781 12.324219 C 13.796875 12.335938 13.691406 12.425781 13.648438 12.546875 C 13.609375 12.671875 13.640625 12.808594 13.738281 12.894531 C 13.957031 13.101562 14.042969 13.394531 13.980469 13.691406 C 13.898438 14.0625 13.535156 14.332031 13.121094 14.332031 L 7 14.332031 C 6.503906 14.332031 5.707031 14.121094 5.332031 13.839844 L 5.332031 8.207031 L 5.8125 7.96875 C 5.882812 7.933594 5.933594 7.878906 5.96875 7.808594 L 7.96875 3.476562 C 7.988281 3.433594 7.996094 3.382812 7.996094 3.335938 L 7.996094 1.183594 C 8.136719 1.109375 8.378906 1.003906 8.664062 1.003906 C 9.03125 1.003906 9.996094 1.910156 9.996094 3.003906 C 9.996094 4.175781 9.359375 5.867188 9.351562 5.882812 C 9.316406 5.988281 9.328125 6.101562 9.390625 6.191406 C 9.453125 6.28125 9.554688 6.335938 9.664062 6.335938 L 14.253906 6.335938 C 14.808594 6.335938 15.28125 6.734375 15.328125 7.242188 C 15.363281 7.621094 15.179688 7.984375 14.851562 8.183594 C 14.75 8.246094 14.691406 8.363281 14.695312 8.480469 C 14.699219 8.601562 14.769531 8.710938 14.875 8.765625 C 15.15625 8.910156 15.332031 9.191406 15.332031 9.503906 C 15.332031 9.921875 15.015625 10.277344 14.59375 10.324219 Z M 14.59375 10.324219 '/%3E%3C/g%3E%3C/svg%3E%0A");
}
.icon-traitim:before{
    content:'';
    width: 13px;
    height:13px; 
    background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='20px' height='20px' viewBox='0 0 20 20' version='1.1'%3E%3Cg id='surface1'%3E%3Cpath style=' stroke:none;fill-rule:nonzero;fill:rgb(86.274511%25,20.784314%25,27.058825%25);fill-opacity:1;' d='M 14.378906 2.140625 C 17.257812 2.15625 19.585938 4.484375 19.601562 7.363281 C 19.601562 12.636719 10 17.859375 10 17.859375 C 10 17.859375 0.398438 12.558594 0.398438 7.363281 C 0.398438 4.480469 2.738281 2.140625 5.621094 2.140625 C 7.386719 2.128906 9.039062 3.015625 10 4.496094 C 10.96875 3.023438 12.613281 2.136719 14.378906 2.140625 Z M 14.378906 2.140625 '/%3E%3C/g%3E%3C/svg%3E%0A");
}
.icon-damua:before{
    content:'';
    width: 13px;
    height:13px; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16px' height='16px' viewBox='0 0 16 16' version='1.1'%3E%3Cg id='surface1'%3E%3Cpath style=' stroke:none;fill-rule:evenodd;fill:rgb(0%25,72.941178%25,0%25);fill-opacity:1;' d='M 8.003906 1.003906 C 11.820312 1.074219 14.878906 4.1875 14.878906 8.003906 C 14.878906 11.820312 11.820312 14.933594 8.003906 15.003906 C 4.1875 14.933594 1.128906 11.820312 1.128906 8.003906 C 1.128906 4.1875 4.1875 1.074219 8.003906 1.003906 Z M 6.550781 10.277344 L 4.835938 8.5625 C 4.542969 8.269531 4.542969 7.792969 4.835938 7.5 C 5.128906 7.210938 5.601562 7.210938 5.894531 7.5 L 7.105469 8.710938 L 10.109375 5.707031 C 10.402344 5.414062 10.878906 5.414062 11.171875 5.707031 C 11.460938 6 11.460938 6.472656 11.171875 6.765625 L 7.632812 10.300781 C 7.488281 10.445312 7.289062 10.527344 7.085938 10.519531 C 6.882812 10.515625 6.6875 10.429688 6.550781 10.277344 Z M 6.550781 10.277344 '/%3E%3C/g%3E%3C/svg%3E");
}
span.qp-review-recommend.qp-recommend-badge:before {
    background-color: #f1f1f1;
    content: '';
    height: 18px;
    right: 0;
    position: absolute;
    top: calc(50% - 9px);
    width: 1px;
}
.qp-verified-badge, .qp-recommend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: var(--qp-spacing-sm);
    font-size: 0.85em;
    margin-right:0;
    padding-right: 20px;
}
.qp-verified-badge {
    color: var(--qp-color-verified);
    border: 1px solid var(--qp-color-verified);
}
.qp-verified-badge .dashicons { font-size: 16px; }

.qp-recommend-badge {
    color: var(--qp-color-recommend);
}
.qp-recommend-badge .dashicons { font-size: 16px; margin-top:3px;}

.qp-review-header .star-rating {
    display: inline-block;
    vertical-align: middle;
    margin-left: var(--qp-spacing-xs);
    color: var(--qp-color-star);
    margin: 0;
}
.rating-wrapper{
    display: flex;
    align-items: center;
}
.qp-review-item .description {
    margin-bottom: var(--qp-spacing-sm);
    line-height: 1.6;
}
.qp-review-item .description p{
    margin-bottom: 10px;
    font-size: 14px;
    font-style: normal;
}
/* Review Images */
.qp-review-comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: var(--qp-spacing-sm);
    margin-bottom: var(--qp-spacing-sm);
}
.qp-comment-image-thumb {
    display: block;
    width: 70px; /* Adjust size */
    height: 70px;
    border-radius: var(--qp-border-radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--qp-color-border);
}
.qp-comment-image-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qp-comment-image-thumb:hover{
    border-color:var(--qp-color-primary);
}
.qp-star-rating-input .qp-star.is-selected svg {
    fill: var(--qp-color-star, #FFD700);
}
/* Review Actions */
.qp-review-actions {
    display: flex;
    align-items: center;
    gap: var(--qp-spacing-md);
    font-size: 0.9em;
    color: var(--qp-color-text-muted);
    margin-bottom: 5px;
}
.qp-helpful-button {
    background: none !important;
    border: 1px solid var(--qp-color-border) !important;
    color: var(--qp-color-text-muted) !important;
    padding: 3px 10px !important;
    border-radius: var(--qp-border-radius) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    box-shadow: unset!important;
}
.qp-helpful-button:hover{
    color:var(--qp-color-primary)!important;
}
.qp-helpful-button .dashicons-thumbs-up {
    font-size: 16px;
    margin-top:3px;
}
.qp-helpful-button.helped {
    color:var(--qp-color-primary);
}
.qp-review-actions .qp-helpful-button{
    font-weight: normal;
    margin: 0;
    border: 0 !important;
    box-shadow: unset;
    padding: 0 15px 0 0 !important;
    text-transform: none;
}
.qp-review-date{
    color: #8f9bb3;
    font-size: 12px;
    position: relative;
}
.qp-helpful-button:before,.qp-reply-button:before{
    background-color: #eaeaea;
    content: '';
    height: 18px;
    right: 0;
    position: absolute;
    top: calc(50% - 9px);
    width: 1px;
}
/* --- Modal Styles --- */
.qp-modal-container {
    overflow-y: auto;
    padding: var(--qp-spacing-lg);
}
.qp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
}
.qp-modal-close{
	margin: 0;
    min-height: 40px;
    width: 40px;
    background: var(--qp-color-text);
    color: var(--qp-color-secondary);
    border-radius: 99px;
    font-size: 18px;
    font-weight: normal;
    padding-bottom: 4px;
}
.qp-modal-close {
    position: absolute;
    top: 5px;
    right: 5px;
    line-height: 1;
    border: none;
    cursor: pointer;
    padding: 0;
}
.qp-modal-close:hover {
    color: var(--qp-color-text);
    background: var(--qp-color-star);
}

/* --- Review Form Styles --- */
.qp-modal-title {
    margin-top: 0;
    margin-bottom: var(--qp-spacing-lg);
    font-size: 1.4em;
    font-weight: 700;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}
#qp-review-form,#qp-reply-form{
    padding: 0 30px 20px;
    margin-bottom:0;
}
.qp-review-form .qp-form-product-info {
    margin-bottom: var(--qp-spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--qp-spacing-sm);
}
.qp-review-form .qp-form-product-info img {
    max-width: 80px;
    height: auto;
    border: 1px solid var(--qp-color-border);
}
.qp-review-form .qp-form-product-info h3 {
    margin: 0;
    font-size: 1.1em;
}
.form-recommend-wrapper{
    justify-content: space-between;
    margin-bottom: 15px;
    align-items: flex-start;
}
.qp-form-section.qp-form-recommend,.qp-form-section.qp-form-privacy{
    display: flex;
    gap: 5px;
    align-items: center;
}
.qp-form-section.qp-logged-in-info{
    margin-bottom: 15px;
    text-align: left;
}
input#qp_recommend_review,input#qp_privacy_policy,#qp_reply_privacy_policy{
    margin: 0;
    width: 17px !important;
    height: 17px;
}
.qp-form-author input,.qp-form-phone input{
    height:50px;
    border:1px solid var(--qp-color-border);
    box-shadow: unset;
}
.qp-form-author input:focus,.qp-form-phone input:focus {
    border-color: var(--qp-color-primary);
}
.qp-review-form .qp-form-section label{
    margin:0;
    line-height: 0;
    justify-content: flex-start;
}
.qp-review-form label {
    margin-bottom: var(--qp-spacing-xs);
    font-weight: 500;
}
.qp-review-form input[type="text"],
.qp-review-form input[type="tel"],
.qp-review-form input[type="email"],
.qp-review-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--qp-color-border);
    border-radius: var(--qp-border-radius);
    box-sizing: border-box;
}
.qp-review-form textarea {
    min-height: 90px;
    resize: vertical;
    box-shadow: unset;
    margin-bottom: 15px;
}
.qp-review-form textarea:focus{
    border-color:var(--qp-color-primary);
}
.qp-review-form .required {
    color: var(--qp-color-recommend);
    font-weight: bold;
    margin-left: 2px;
}
/*REPLY*/
#qp-reply-form{
    padding-top:30px;
}
/* Star Rating Input */
.qp-form-section.qp-form-rating{
	padding:5px 0;
}
.qp-form-rating label {
    text-align: center;
}
.qp-star-rating-input {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 0px;
}
.qp-star-rating-input .qp-star {
    cursor: pointer;
}
.qp-star-rating-input .qp-star svg {
    width: 50px;
    height: 50px;
    fill: #ccc;
    transition: fill 0.2s ease, transform 0.1s ease;
}
.qp-star-rating-input .qp-star:hover svg,
.qp-star-rating-input .qp-star.is-hover svg {
    fill: #fac919; 
    transform: scale(1.1);
}
.qp-star-rating-input .qp-star.is-selected svg {
    fill: var(--qp-color-star);
}
.qp-rating-text {
    display: block;
    text-align: center;
    font-size: 0.9em;
    color: var(--qp-color-text-muted);
    min-height: 1.2em;
    margin-top: var(--qp-spacing-xs);
}

/* Recommend & Privacy Checkbox */
.qp-form-recommend label,
.qp-form-privacy label {
    display: inline-flex;
    align-items: center;
    gap: var(--qp-spacing-xs);
    font-weight: normal;
    cursor: pointer;
}
.qp-form-recommend input[type="checkbox"],
.qp-form-privacy input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}
.qp-form-privacy a {
    color: var(--qp-color-primary);
    text-decoration: none;
}
.qp-form-privacy a:hover {
    text-decoration: underline;
}

/* Image Upload */
.qp-upload-button {
    display: inline-flex;
    align-items: center;
    gap: var(--qp-spacing-xs);
    padding: 0;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    text-align: center;
}
.qp-upload-button:hover {
    color:var(--qp-color-primary);
}
.qp-upload-button .dashicons {
    font-size: 18px;
}
/* Image Preview Container */
.qp-image-preview {
    margin-top: var(--qp-spacing-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--qp-spacing-sm);
    justify-content: flex-start;
    margin-bottom: 15px;
}

/* Individual Preview Item */
.qp-preview-item {
    position: relative;
    width: 120px;
    border: 1px solid var(--qp-color-border);
    border-radius: var(--qp-border-radius);
    overflow: hidden;
    background: #fff;
    transition: all 0.2s ease;
}

.qp-preview-item:hover {
    transform: translateY(-1px);
}
.qp-add-button .add-text{
    font-size: 14px;
}

/* Preview Image */
.qp-preview-image {
    width: 100%;
    height: 80px;
    overflow: hidden;
    position: relative;
}

.qp-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qp-preview-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.qp-preview-item:hover .qp-preview-actions {
    opacity: 1;
}

.qp-btn-remove,
.qp-btn-replace {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--qp-color-star);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
    padding:0;
    min-height: 24px;
    margin: 0 !important;
}

.qp-btn-remove:hover {
    background: #dc3545;
    color: white;
}
.qp-btn-remove:before{
    content:'';
    width: 15px;
    height: 15px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    display: block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000000' width='40' height='40' viewBox='-3.5 0 19 19' class='cf-icon-svg'%3E%3Cpath d='M11.383 13.644A1.03 1.03 0 0 1 9.928 15.1L6 11.172 2.072 15.1a1.03 1.03 0 1 1-1.455-1.456l3.928-3.928L.617 5.79a1.03 1.03 0 1 1 1.455-1.456L6 8.261l3.928-3.928a1.03 1.03 0 0 1 1.455 1.456L7.455 9.716z'/%3E%3C/svg%3E");
}
.qp-btn-replace:before{
    content:'';
    width: 15px;
    height: 15px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    display: block; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3 3V8M3 8H8M3 8L6 5.29168C7.59227 3.86656 9.69494 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.71683 21 4.13247 18.008 3.22302 14' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.qp-btn-replace:hover {
    background: var(--qp-color-primary);
    color: white;
}

/* Preview Info */
.qp-preview-info {
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.2;
    background: #f8f9fa;
    border-top: 1px solid var(--qp-color-border);
}

.qp-preview-info .file-name {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qp-preview-info .file-size {
    display: block;
    color: #666;
    font-size: 10px;
}

/* Add More Button */
.qp-add-more {
    background: #f8f9fa;
    border: 2px dashed var(--qp-color-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    transition: all 0.2s ease;
}

.qp-add-more:hover {
    background: #e9ecef;
    border-color: var(--qp-color-primary);
}

.qp-add-button {
    text-align: center;
    color: #666;
}

.qp-add-more:hover .qp-add-button {
    color: var(--qp-color-primary);
}

.qp-add-icon {
    display: block;
    font-size: 24px;
    line-height: 1;
    margin-bottom: 4px;
}

.qp-add-text {
    display: block;
    font-size: 12px;
    font-weight: 500;
}
.qp-image-upload-info {
    display: block;
    font-size: 0.85em;
    color: #777;
    margin-top: 8px;
}

/* User Info Section */
.qp-form-user-info {
    display: flex;
    gap: var(--qp-spacing-md);
}
.qp-form-user-info .qp-form-section {
    flex: 1;
    margin-bottom: 0;
}

/* Submit & Links */
.qp-form-submit {
    margin-top: var(--qp-spacing-lg);
    margin-bottom: var(--qp-spacing-md);
}
.qp-form-submit button {
    width: 100%;
}
.qp-form-links {
    font-size: 0.9em;
    text-align: center;
}
.qp-form-links a {
    color: var(--qp-color-text-muted);
    text-decoration: none;
    margin: 0 var(--qp-spacing-xs);
}
.qp-form-links a:hover {
    color: var(--qp-color-primary);
    text-decoration: underline;
}

/* Form Messages */
.qp-form-message {
    margin-top: var(--qp-spacing-md);
    padding: var(--qp-spacing-sm);
    border-radius: var(--qp-border-radius);
    text-align: center;
}
.qp-form-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}
.qp-form-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    font-size: 14px;
}

/* Loading Indicators */
.qp-loading-spinner {
   display: inline-block;
   border: 3px solid #f3f3f3;
   border-top: 3px solid var(--qp-color-primary);
   border-radius: 50%;
   width: 20px;
   height: 20px;
   animation: qp-spin 1s linear infinite;
   vertical-align: middle;
   margin-right: 5px;
}
.qp-submit-spinner { display: none;}

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

/* Gallery Modal */
.qp-gallery-modal-content {
    max-width: 90%;
    width: auto;
}
.qp-gallery-modal-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--qp-spacing-md);
    margin-top: var(--qp-spacing-md);
    max-height: 70vh;
    overflow-y: auto;
}
.qp-gallery-modal-image-item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--qp-border-radius);
    border: 1px solid var(--qp-color-border);
}
.qp-star-rating-input .qp-star.is-hover svg {
    fill: #ffdd77;
}
.qp-star-rating-input .qp-star.is-selected svg {
    fill: var(--qp-color-star);
}

.qp-comment-image-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: var(--qp-color-secondary);
    border: 1px solid var(--qp-color-border);
    border-radius: var(--qp-border-radius);
    font-size: 1.2em;
    font-weight: bold;
    color: var(--qp-color-text-muted);
    cursor: pointer;
    user-select: none;
}
.qp-comment-image-more:hover {
    background-color: #e9ecef;
}

.qp-hidden-review-gallery-items {
    display: none;
}
.qp-edit-image-list li.image-marked-for-deletion {
    opacity: 0.4;
}

/* Modal Styles */
.qp-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
}

.qp-modal-content {
    position: relative;
    background-color: #fff;
    padding: 0px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 92vh;
    overflow-y: auto;
    z-index: 10001;
}

.qp-modal-title {
    margin-top: 0;
    margin-bottom: 0px;
    font-size:18px;
    text-align: center;
}

.qp-loading-spinner {
    display: inline-block;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--qp-color-primary, #007bff);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: qp-spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}

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


.qp-edit-review-form .qp-edit-form-field,.qp-form-section.qp-form-recommend {
    margin-bottom: 15px;
}
.qp-edit-review-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.qp-edit-review-form input[type="text"],
.qp-edit-review-form input[type="number"],
.qp-edit-review-form textarea,
.qp-edit-review-form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}
.qp-edit-review-form textarea {
    min-height: 80px;
    resize: vertical;
}
.qp-edit-image-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.qp-edit-image-list li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}
.qp-edit-image-list img {
    max-width: 50px;
    height: auto;
    border: 1px solid #ddd;
}
.qp-edit-image-list .button-link-delete {
    color: #a00 !important;
    text-decoration: none;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.qp-edit-image-list .button-link-delete:hover {
    color: #f00 !important;
}
.qp-edit-form-actions {
    margin-top: 20px;
    text-align: right;
}
.qp-edit-form-actions button {
    margin-left: 10px;
}
.qp-edit-form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 3px;
    text-align: center;
}
.qp-edit-form-message.success { background-color: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.qp-edit-form-message.error { background-color: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.qp-review-form input[type="text"], .qp-review-form input[type="tel"],.qp-review-form input[type="email"]{
height:45px;
box-shadow:unset;
}
.qp-review-form input[type="text"]:focus, .qp-review-form input[type="tel"]:focus,.qp-review-form input[type="email"]:focus{
border-color: var(--qp-color-primary);
    box-shadow: 0 0 5px #ccc;
}
.qp-form-section.qp-form-rating .stars{
    display:none!important;
}
.qp-form-section.qp-form-comment textarea:focus{
    border:1px solid var(--qp-color-primary)!important;
    outline: unset ! Important;
}
@media(max-width: 600px){
	.qp-modal-container{
		padding:0;
	}
	#qp-review-form {
    	padding: 0 20px 20px;
	}
    #qp-reply-form{
        padding:20px;
    }
	.form-recommend-wrapper{
		flex-wrap: wrap;
    	gap: 20px;
	}
	.qp-modal-title {
    	font-size: 18px;
        padding: 20px 50px;
        line-height: 1.5;
	}
	.qp-modal-content {
	    height: fit-content;
	}
    .qp-form-user-info {
        flex-direction: column;
        gap: 0;
    }
    .qp-write-review-button{
        width: 100%;
    }
    .qp-reviews-action-buttons{
        margin-bottom: 40px;
    }
}
/* Rating filter buttons */
.qp-rating-buttons {
    gap: var(--qp-spacing-sm);
}
.qp-filter-rating-btn {
    background-color: var(--qp-color-secondary) !important;
    border: 1px solid var(--qp-color-border) !important;
    color: var(--qp-color-text) !important;
    padding: 6px 10px !important;
    border-radius: var(--qp-border-radius) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}
.qp-filter-rating-btn:hover {
    background-color: #e2e6ea !important;
    border-color: var(--qp-color-primary) !important;
}
.qp-filter-rating-btn.is-active {
    background-color: var(--qp-color-primary) !important;
    border-color: var(--qp-color-primary) !important;
    color: #fff !important;
}

/* Loader states for reviews list */
.qp-review-list.qp-loading { position: relative; opacity: 0.7; transition: opacity 0.2s ease; }
.qp-review-list.qp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 50%;
    border: 3px solid #e9ecef;
    border-top-color: var(--qp-color-primary);
    animation: qp-spin 0.9s linear infinite;
    z-index: 2;
}

/* Inline spinner*/
.qp-inline-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    border-top-color: var(--qp-color-primary);
    animation: qp-spin 0.9s linear infinite;
    vertical-align: middle;
    margin-left: 6px;
}

/* Load-more spinner reuse */
.qp-load-more-spinner {
    display: none;
    margin-left: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-top-color: var(--qp-color-primary);
    border-radius: 50%;
    animation: qp-spin 0.9s linear infinite;
}
.qp-load-more-spinner.is-active { display: inline-block; }
.qp-reviews-filters{
    justify-content: space-between;
}
.filter-by-star{
    flex-direction: column;
}
.filter-by-star,.qp-reviews-filters{
    display: flex;
    margin-bottom: 10px;
    width: fit-content;
}
.qp-review-rating-filters{
    display: inline-flex;
    gap: 10px;
    margin-top: 10px;
}
.filter-by-star span,.qp-reviews-filters label{
    font-weight: bold;
    font-size: 14px;
}
.filter-by-star button.qp-filter-rating-btn.qp-button-secondary.btn-rating{
    max-height: 36px;
    padding: 5px 20px !important;
    border-radius: 99px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    font-size: 13px;
    width: fit-content;
    color: #ffb400 !important;
    background: #fff!important;
    border:1px solid #efefef;
}
.filter-by-star button:hover{
    background-color: var(--qp-color-primary) !important;
    border-color: var(--qp-color-primary) !important;
    color: #fff !important;
}
.qp-reviews-filters #qp-review-sort{
    max-height: 36px;
    padding: 5px 20px !important;
    border-radius: 99px;
    font-weight: bold;
    font-size: 12px;
    margin: 0;
    height: 36px;
    width: 100%;
    box-shadow: unset;
    width: fit-content;
}
.star-rating span:before,.star-rating:before, .woocommerce-page .star-rating:before {
    color: #ffb400!important;
}
ol.children.qp-review-replies{
    background: var(--qp-color-secondary);
    margin: 0;
    border-radius: 5px;
    position: relative;
}
ol.children.qp-review-replies:before {
    content: '';
    margin-left: 7px;
    border-color: rgba(231, 231, 231, 0) rgba(231, 231, 231, 0) var(--qp-color-secondary);
    border-width: 13px;
    bottom: 100%;
    left: 20px;
    height: 0px;
    width: 0px;
    position: absolute;
    pointer-events: none;
    border-style: solid;
}
ol.children.qp-review-replies li{
    padding: 15px;
    margin: 0 0 20px;
    padding: var(--qp-spacing-md);
}
ol.children.qp-review-replies li p,ol.children.qp-review-replies li .description{
    margin-bottom: 0;
}
ol.children.qp-review-replies li:not(:last-child) {
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 0;
}
ol.children.qp-review-replies li{
    padding-bottom: 0;
}
.woocommerce-review__published-date{
    font-size: 14px;
}
.qp-helpful-text,.qp-helpful-count{
    font-size: 12px;
}
.qp-admin-badge{
    font-size: 11px;
    background: var(--qp-color-primary);
    color: white;
    padding: 0 5px;
    border-radius: 2px;
}
@media (max-width: 600px){
    .filter-by-star, .qp-reviews-filters{
        width: 100%;
    }
    .qp-gallery-thumbnails{
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        grid-column-gap: 15px;
        grid-row-gap: 15px;
    }
    .filter-by-star button.qp-filter-rating-btn.qp-button-secondary.btn-rating{
        padding: 0 10px !important;
    }
    .qp-reviews-filters #qp-review-sort {
        padding: 5px 15px !important;
    }
    .qp-gallery-thumbnail, .qp-gallery-view-all {
        width: 65px;
        height: 65px;
    }
    .qp-review-form .qp-form-section label{
        justify-content: flex-start;
    }
    .qp-modal-content{
        width: 95%;
    }
}

body.qp-modal-open {
    overflow: hidden;
}
.qp-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
}

.qp-modal-content {
    position: relative;
    z-index: 100000;
    max-width: 900px;
    width: 90%;
    max-height: 95vh;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.qp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qp-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Gallery Modal Specific */
.qp-gallery-modal .qp-modal-content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    background: unset;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.qp-gallery-modal .qp-modal-close svg{
    fill: #fff;
    width: 15px;
}
.qp-gallery-modal .qp-modal-close:hover,#qp-review-form-modal-container .qp-modal-close:hover{
    background: rgba(255, 255, 255, 0.4);
        transform: unset;
}
.qp-gallery-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.qp-gallery-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.qp-gallery-image-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: 90vh;
    padding: 60px 80px;
}

.qp-gallery-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.qp-gallery-caption {
    margin-top: 20px;
    color: #fff;
    text-align: center;
    font-size: 14px;
    max-width: 600px;
}

/* Gallery Navigation */
.qp-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100002;
    margin:0!important;
}

.qp-gallery-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.qp-gallery-prev {
    left: 20px;
}

.qp-gallery-next {
    right: 20px;
}

.qp-gallery-nav svg {
    width: 24px;
    height: 24px;
}

/* Gallery Counter */
.qp-gallery-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 100003;
}

/* Loading State */
.qp-modal-loading {
    text-align: center;
    padding: 40px;
    color: #fff;
}

.qp-modal-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qp-spin 0.8s linear infinite;
}

@keyframes qp-spin {
    to { transform: rotate(360deg); }
}
#qp-review-form-modal-content,#qp-reply-form-modal-content{
    max-width: 600px;
    padding: 0;
}
#qp-review-form-modal-content .qp-modal-close,#qp-reply-form-modal-content .qp-modal-close{
    top: 10px;
    right: 10px;
    background: var(--qp-color-text-muted);
}
#qp-review-form-modal-content .qp-modal-close:hover,#qp-reply-form-modal-content .qp-modal-close:hover{
    background: var(--qp-color-text);
}
/* Animation */
@keyframes qpModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes qpModalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.qp-modal-container {
    animation: qpModalFadeIn 0.3s ease;
}

.qp-modal-content {
    animation: qpModalSlideIn 0.3s ease;
}
.qp-reply-button{
    text-transform: none;
    font-weight: normal;
    font-size: 12px;
    color: var(--qp-color-primary);
    padding: 0 15px 0 0;
    margin: 0;
    border: 0;
    font-size:13px;
}
.qp-delete-comment-button {
    text-transform: none;
    font-weight: normal;
    font-size: 12px;
    color: #dc3545;
    padding: 0 15px 0 0;
    margin: 0;
    border: 0;
    font-size: 13px;
    cursor: pointer;
    background: none;
}
.qp-delete-comment-button:hover {
    color: #c82333;
    text-decoration: underline;
}
.qp-delete-comment-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* Mobile Responsive */
@media (max-width: 768px) {
    .qp-modal-content {
        width: 95%;
        max-width: 95%;
        padding: 20px;
        margin: 2vh auto;
        max-height: 96vh;
    }

    .qp-gallery-image-container {
        padding: 40px 20px;
    }

    .qp-gallery-nav {
        width: 40px;
        height: 40px;
    }

    .qp-gallery-prev {
        left: 10px;
    }

    .qp-gallery-next {
        right: 10px;
    }

    .qp-gallery-counter {
        top: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
    .qp-preview-item{
        width: 110px;
    }
    .qp-gallery-nav{
        padding:0;
    }

    .qp-image-preview {
        justify-content: space-between;

    }
}
.cf-turnstile{
    display: flex;
    justify-content: center;
    align-items: center;
}