.simple-reviews-list {
    margin: 20px 0;
}

.reviews-header h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.mb-0{
    margin-bottom: 0 !important;
}

.review-item, .s-review-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
    position: relative;
    /* Fix overflow issue for nested replies */
    word-wrap: break-word;
    overflow: hidden;
}

.review-item:hover, .s-review-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.review-header, .s-review-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 20px;
    overflow: auto;
    white-space: nowrap;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

/* Hide user avatar if setting is disabled */
.reviews-container.hide-user-avatar .author-avatar {
    display: none;
}

.author-site {
    font-size: 12px;
    color: #007cba;
    text-decoration: none;
}

.author-site:hover {
    text-decoration: underline;
}

.review-meta {
    text-align: right;
    font-size: 12px;
    color: #666;
}

/* Hide datetime if setting is disabled */
.reviews-container.hide-datetime .review-date {
    display: none;
}

.review-rating, .s-rates-wrapper {

}

.review-rating .star, .s-rates-wrapper .star {
    color: #ddd;
    font-size: 18px;
}

.s-rates-wrapper .star.empty {
    color: #ddd !important;
}

.review-rating .star.filled, .s-rates-wrapper .star.filled {
    color: #ffd700;
}

.product-info {
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
}

.product-image, .customer-reviews-image {
    max-width: 150px;
    height: auto;
    border-radius: 3px;
}

.customer-reviews-float-left {
    float: left;
}

.review-title, .s-review-name {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: bold;
}

.review-title a, .s-review-name a, .customer-reviews-link {
    color: #007cba;
    text-decoration: none;
}

.review-title a:hover, .s-review-name a:hover, .customer-reviews-link:hover {
    text-decoration: underline;
}

.review-text, .description-wrapper {
    line-height: 1.6;
    color: #333;
    margin-bottom: 10px;
    clear: both;
}

.review-actions, .actions-wrapper {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    clear: both;
}

.reply-btn, .customer-reviews-reply, .review-reply {
    background: none;
    border: none;
    color: #007cba;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
}

.reply-btn:hover, .customer-reviews-reply:hover, .review-reply:hover {
    color: #005a87;
}

.review-replies {
    margin-top: 15px;
    /* Container for nested replies */
    max-width: 100%;
    overflow: hidden;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.customer-reviews-clear {
    clear: both;
}

/* Review Images */
.s-images-list, .review-images {
    margin: 10px 0;
}

.review-item .s-image-wrapper {
    display: inline-block;
    vertical-align: top;
    margin: 0 10px 10px 0;
    cursor: pointer;
    width: 80px;
    height: 80px;
    border-radius: 3px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid #ddd;
}

.review-item .s-image {
    max-height: 100px;
    width: auto;
    height: auto;
    vertical-align: top;
    border-radius: 3px;
    transition: transform 0.2s;
}

.review-item .s-image:hover {
    transform: scale(1.05);
}

.rc-flex{
    display: flex;
}

/* Image upload section */
.s-review-images-section {
    border: 1px dashed #ddd;
    border-radius: 3px;
    padding: 10px;
}

.s-image-form-section {
    position: relative;
}

.s-file-field {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.s-error {
    color: #d9534f;
    font-size: 12px;
    margin-bottom: 5px;
    padding: 5px;
    background: #f2dede;
    border: 1px solid #ebccd1;
    border-radius: 3px;
}

/* Image Modal */
.customer-reviews-modal {
    z-index: 9999999;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #000;
    background-color: rgba(0,0,0,0.4);
}

.customer-reviews-modal-content {
    margin: auto;
    position: relative;
    padding: 0;
    outline: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    background: transparent;
}

.customer-reviews-modal-close {
    z-index: 99999999;
    padding: 4px 8px;
    border-radius: 0.09em;
    color: #fff;
    font-weight: bold;
    font-size: 40px;
    cursor: pointer;
    background: #000;
    margin: 10px;
    position: absolute;
    top: 0;
    right: 0;
}

.customer-reviews-modal-title {
    z-index: 99999999;
    padding: 3px 10% 8px 10%;
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    position: absolute;
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    margin: auto;
    text-align: center;
    text-shadow: 1px 1px 1px #000;
    overflow: hidden;
    height: 32px;
    line-height: 26px;
    width: 100%;
    box-sizing: border-box;
}

.customer-reviews-modal-next {
    z-index: 99999999;
    padding: 4px 8px;
    border-radius: 0.09em;
    color: #fff;
    font-weight: bold;
    font-size: 40px;
    cursor: pointer;
    background: #000;
    margin: 10px;
    position: absolute;
    top: 50%;
    right: 0;
    user-select: none;
}

.customer-reviews-modal-prev {
    z-index: 99999999;
    padding: 4px 8px;
    border-radius: 0.09em;
    color: #fff;
    font-weight: bold;
    font-size: 40px;
    cursor: pointer;
    background: #000;
    margin: 10px;
    position: absolute;
    top: 50%;
    left: 0;
    user-select: none;
}

.customer-reviews-modal-img {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 1px 1px 50px rgba(0,0,0,0.8);
    display: none;
    margin: auto;
    top: 0;
    bottom: 0;
    position: absolute;
    left: 0;
    right: 0;
}

.customer-reviews-modal-img.active {
    display: block;
}

/* Fixed nested reply styling with proper overflow handling */
.reviews-container {
    max-width: 100%;
    overflow: hidden;
}

.review-item[style*="margin-left: 40px"], 
.s-review-item[style*="margin-left: 40px"] {
    background: #f8f8f8;
    border-left: 3px solid #007cba;
    max-width: calc(100% - 40px);
}

.review-item[style*="margin-left: 80px"], 
.s-review-item[style*="margin-left: 80px"] {
    background: #f5f5f5;
    border-left: 3px solid #5ba3d4;
    max-width: calc(100% - 80px);
}

.review-item[style*="margin-left: 120px"], 
.s-review-item[style*="margin-left: 120px"] {
    background: #f2f2f2;
    border-left: 3px solid #8bbde8;
    max-width: calc(100% - 120px);
}

/* Alternative nested reply styling that scales better */
.review-replies .review-item,
.review-replies .s-review-item {
    margin-left: 20px;
    max-width: calc(100% - 20px);
    border-left: 3px solid #007cba;
    background: #f8f8f8;
}

.review-replies .review-replies .review-item,
.review-replies .review-replies .s-review-item {
    margin-left: 20px;
    max-width: calc(100% - 40px);
    border-left: 3px solid #5ba3d4;
    background: #f5f5f5;
}

.review-replies .review-replies .review-replies .review-item,
.review-replies .review-replies .review-replies .s-review-item {
    margin-left: 20px;
    max-width: calc(100% - 60px);
    border-left: 3px solid #8bbde8;
    background: #f2f2f2;
}

/* Responsive design */
@media (max-width: 768px) {
    .review-header, .s-review-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .review-meta {
        text-align: left;
    }
    
    .review-item[style*="margin-left"], 
    .s-review-item[style*="margin-left"] {
        margin-left: 10px !important;
        max-width: calc(100% - 10px) !important;
    }
    
    .review-replies .review-item,
    .review-replies .s-review-item {
        margin-left: 10px;
        max-width: calc(100% - 10px);
    }
    
    .review-replies .review-replies .review-item,
    .review-replies .review-replies .s-review-item {
        margin-left: 10px;
        max-width: calc(100% - 20px);
    }
    
    .product-info {
        float: none;
        margin-bottom: 15px;
    }
    
    .product-image, .customer-reviews-image {
        max-width: 100px;
    }
    
    .s-image {
        max-height: 80px;
    }
    
    .s-file-wrapper {
        width: 80px;
    }
    
    .s-file-wrapper .s-image-wrapper {
        height: 60px;
    }
}