/* Required field indicator */
.electro-advanced-reviews .required {
    color: #ff0000;
}
/* Photo preview styling */
.photo-preview-container {
    margin: 15px 0;
}

.preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.uploaded-photo {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.uploaded-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-photo {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff0000;
    color: #fff;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 12px;
}
#reviews.electro-advanced-reviews .comment_container {
    padding-bottom: 4px;
}
#reviews .commentlist>li {
    margin-bottom: 1em;
    padding-bottom: .5em;
}
/* Photo modal styles */
.review-photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-photo-modal.show {
    opacity: 1;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Lighter background */
    z-index: 1;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0 0 6px;
    background: rgb(185 185 185 / 24%) !important;
    color: #c3c1c1 !important;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 19px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    transform: scale(1.1);
}

/* Custom carousel styles */
.custom-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.modal-close-btn:hover {
    transform: scale(1.1);
}

/* Custom carousel styles */
.custom-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-inner {
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: center;
    background-color: #000;
}

.carousel-item {
    display: none;
    position: relative;
    width: 100%;
    text-align: center;
    transition: transform 0.6s ease-in-out;
}

.carousel-item.active {
    display: block;
}

.carousel-item img {
    max-height: 80vh;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    object-fit: contain;
}

/* Custom carousel controls */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgb(185 185 185 / 12%) !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    font-size: 24px;
    color: #7d7d7d;
    font-weight: bold;
}

/* Carousel indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.carousel-indicators li {
    width: 30px;
    height: 3px;
    margin: 0 3px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicators li.active {
    background-color: #fff;
    height: 5px;
}

/* Main container */
.electro-advanced-reviews {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Review summary and form layout */
.advanced-review {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 0px;
    border-bottom: 1px solid #eee;
}

.rating-summary-container {
    flex: 1;
    min-width: 300px;
}

.review-form-container {
    flex: 1;
    min-width: 300px;
}

/* Rating summary */
.rating-summary {
    margin-bottom: 20px;
    margin-top: 12px;
}

.avg-rating {
    display: flex;
    align-items: baseline;
}

.avg-rating-number {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.avg-rating-max {
    font-size: 24px;
    color: #666;
    margin-left: 2px;
}

.rating-count-text {
    font-size: 14px;
    color: #666;
}

/* Rating histogram */
.advanced-review .avg-rating {
    margin-bottom: 0px;
}
.advanced-review .avg-rating .avg-rating-number {
    font-size: 3.143em;
}
.rating-histogram {
    padding-right: 30px;
}
.rating-histogram .rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px !important;
}

.star-rating-container {
    display: flex;
    min-width: 90px;
}

.star-rating-container .star {
    color: transparent;
    -webkit-text-stroke: .5px #ddd;
    font-size: 20px;
    margin-right: 2px;
}

.star-rating-container .star.filled {
    color: #FFD700;
    -webkit-text-stroke: 1px #FFD700;
}

.rating-bar-container {
    flex: 1;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin: 0 10px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background-color: #FFD700;
    border-radius: 4px;
}

.rating-count {
    min-width: 20px;
    text-align: right;
    color: #666;
}

/* Review form - Matching the screenshot exactly */
.review-title {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.review-subtitle {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.review-form .form-group {
    margin-bottom: 10px;
}

/* Form rows - put label and input on same row */
.form-row {
    display: flex;
    align-items: center;
}

.form-row label {
    margin-right: 15px;
    margin-bottom: 0 !important;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}
.form-textarea {
    margin-bottom: 24px;
}
.form-textarea label {
    font-weight: 500;
}

/* Star rating */
.rating-stars-selector {
    display: flex;
}

.star-icon {
    color: transparent;
    -webkit-text-stroke: .5px #999;
    font-size: 24px;
    cursor: pointer;
    margin-right: 5px;
}

.star-icon.filled {
    color: #FFD700;
    -webkit-text-stroke: 1px #FFD700;
}

/* Text area */
.review-textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    font-size: 14px;
}

/* Photo upload button */
.select-photos-btn {
    padding: 1em 1.4em;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 500;
    color: #000 !important;
    background-color: #fff !important;
    border: none;
    border-radius: 45px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease 0s;
    margin-left: 10px;
}
.select-photos-btn:focus {
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1) !important;
}
.select-photos-btn:hover {
  background-color: #f57224 !important;
  box-shadow: 0px 15px 20px rgba(245, 114, 36, 0.4);
  color: #fff !important;
  transform: translateY(-7px);
}

/* Add review button */
.add-review-btn {
    background-color: #eee;
    color: #444;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.add-review-btn:hover {
    background-color: #e0e0e0;
}

/* Review restriction message */
.review-restriction-message {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
}

.review-message {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Hide the original WooCommerce form elements */
.hidden {
    display: none !important;
}

/* Customer reviews section */
.customer-reviews-title {
    font-size: 16px;
    margin: 11px 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.commentlist > li {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.comment_container {
    display: flex;
    flex-direction: column;
}

/* Styles for reply comments */
.comment_container.reply-comment {
    background-color: #f8f8f8;
    padding: 15px 15px 15px 35px;
    border-radius: 4px;
    position: relative;
    margin-top: 5px;
    margin-left: 10px;
}

/* Add triangle pointer to reply comments */
.comment_container.reply-comment:before {
    content: " ";
    position: absolute;
    top: -15px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid #f8f8f8;
}

.reply-comment .reviewer-name.reply-name {
    color: #ff0000;
}

/* Review header with stars and date */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.star-rating-display {
    display: flex;
    
}

.star-rating-display .star {
    color: transparent;
    -webkit-text-stroke: .5px #ddd;
    font-size: 18px;
    margin-right: 2px;
}

.star-rating-display .star.filled {
    color: #FFD700;
    -webkit-text-stroke: 1px #FFD700;
}

.review-date {
    color: #666;
    font-size: 14px;
}

/* Reviewer info with name and verified badge */
.reviewer-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: 600;
    font-size: 16px;
}

/* Verified badge exactly matching screenshot */
.verified-badge {
    color: #28a745;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Seller response badge */
.seller-response-badge {
    color: #dc3545;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-icon {
    width: 16px;
    height: 16px;
}

.review-content {
    margin: 10px 0;
    line-height: 1.6;
}

/* Review photos */
.review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.review-photo-wrapper {
    position: relative;
}

.review-photo-thumb {
    display: block;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.review-photo-thumb:hover {
    transform: scale(1.05);
}

.review-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Reviews filter and sort styles */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 2px 0;
    border-bottom: 1px solid #eee;
}

.customer-reviews-title {
    margin: 11px 0;
    padding-bottom: 0;
    border-bottom: none;
}

.reviews-filter-sort {
    display: flex;
    gap: 20px;
    align-items: center;
}

.sort-wrapper, .filter-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.sort-label, .filter-label {
    font-size: 14px;
    color: #666;
    margin-right: 5px;
}

.sort-dropdown, .filter-dropdown {
    position: relative;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    min-width: 120px;
}

.current-sort, .current-filter {
    font-size: 14px;
    font-weight: 500;
}

.sort-arrow, .filter-arrow {
    margin-left: auto;
    border-style: solid;
    border-width: 5px 5px 0 5px;
    border-color: #666 transparent transparent transparent;
    margin-left: 10px;
}

.sort-options, .filter-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
}

.sort-dropdown.active .sort-options,
.filter-dropdown.active .filter-options {
    display: block;
}

.sort-option, .filter-option {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sort-option:hover, .filter-option:hover {
    background-color: #f5f5f5;
}

.sort-option.active, .filter-option.active {
    background-color: #f0f0f0;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .advanced-review {
        flex-direction: column;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .review-date {
        margin-top: 5px;
    }
    
    /* Make form rows stack on mobile */
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row label {
        width: 100%;
        margin-bottom: 8px !important;
    }
    
    /* Modal adjustments for mobile */
    .modal-content {
        width: 95%;
        height: auto;
    }
    
    .carousel-inner {
        height: auto;
        min-height: 50vh;
    }
    
    .carousel-item img {
        max-height: 50vh;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 30px;
        height: 30px;
    }
    
    .carousel-indicators li {
        width: 20px;
        height: 2px;
        margin: 0 2px;
    }
    
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .reviews-filter-sort {
        margin-top: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .sort-wrapper, .filter-wrapper {
        width: 100%;
    }
    
    .sort-dropdown, .filter-dropdown {
        width: 100%;
    }
}