/* Overall Total Reviews Section */
.esrc-total-reviews {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

/* Header Row */
.header-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    align-items: center;
}

/* Left and Right Columns */
.left-column,
.right-column {
    flex: 50%;
}

/* Average Rating */
.average-rating {
    font-size: 1.5em;
    margin-right: 10px;
}

/* Total Reviews */
.total-reviews {
    font-size: 1em;
}

/* Progress Bars Section */
.rating-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 5px;
}

/* Star Rating Style */
.star-ratings {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

/* ====================================
   WINDMILL STAR RATING 
   WooCommerce ile çakışma YOK!
   ==================================== */
.windmill-star-rating {
    margin: 0;
    display: flex;
    align-items: center;
}

.windmill-star-rating i {
    font-size: 18px;
    color: #121212;
    cursor: pointer;
}

.windmill-star-rating i.far {
    color: #121212;
}

.windmill-star-rating i.fas {
    color: #121212;
}

/* Progress Bar Container */
.progress-bar {
    flex: 1;
    background: #e0e0e0;
    border-radius: 5px;
    height: 10px;
    margin-right: 10px;
}

/* Filled Bar */
.filled-bar {
    background: #121212;
    height: 100%;
    border-radius: 5px;
}

/* Error styling */
#review-error, #character-warning, #reply-error, #reply-character-warning {
    font-size: 12px;
    color: red;
    margin-top: 5px;
    display: none;
}

/* Character message styling */
.character-message {
    font-size: 14px;
    color: #333;
    margin-top: 10px;
}

/* Review note styling */
.review-note {
    font-size: 14px;
    color: #333;
    margin-top: 10px;
}

/* Close button positioning */
.popup-close {
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    font-size: 24px;
    color: #333;
}

/* Center the popup */
.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 750px;
    background-color: rgba(255, 255, 255, 1);
    justify-content: center;
    align-items: center;
}

/* Background blur effect */
.popup-open .content {
    filter: blur(10px);
}

.popup-content {
    padding: 30px;
    text-align: left;
    position: relative;
}

.popup-content p {
    margin-bottom: 10px !important;
}

/* Background overlay for closing the popup on click */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

/* Disable pointer events for static stars in the comment section */
.esrc-comments .windmill-star-rating i {
    pointer-events: none;
}

/* Comment Container */
.esrc-comment {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    padding: 20px;
}

/* Alternating background colors for comments */
.esrc-comment:nth-child(odd) {
    background-color: #f6f0ed;
}

.esrc-comment:nth-child(even) {
    background-color: #ffffff;
}

/* Comment Header */
.comment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

/* First Column: Profile Picture */
.comment-left {
    display: flex;
    align-items: center;
}

/* Profile Picture */
.profile-picture {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Second Column: Name, Rating, Date */
.comment-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 5px;
}

.comment-info p {
    margin-bottom: 0px !important;
}

/* Date Style */
.comment-date {
    font-size: 13px;
    color: #5a5a5a;
}

/* Third Column: Reply Button */
.comment-reply {
    margin-left: 10px;
}

/* Reply Button */
.reply-btn {
    margin-left: auto;
    padding: 8px 12px !important;
    background-color: #121212 !important;
    color: #ffffff !important;
    font-size: 12px !important;
}

/* Comment Body */
.comment-body {
    margin-top: 10px;
}

.comment-body p {
    margin-bottom: 0px!important;
}

/* Reply Comment Styling */
.esrc-reply {
    padding: 15px;
    background-color: #f0f0f0;
    margin-left: 20px;
    border-radius: 8px;
    margin-top: 10px;
}

/* Additional styling for left and right columns */
.left-column {
    width: 50%;
    float: left;
}

.right-column {
    width: 50%;
    float: right;
}

.rating-and-progress {
    display: flex;
    justify-content: space-around;
    width: 100%;
    background: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    align-items: center;
}

.rating-left-column {
    flex: 0 0 35%; 
    padding-right: 10px; 
    text-align:center;
}

.rating-right-column {
    flex: 0 0 65%; 
    padding-left: 10px;  
}

.esrc-main {
    display: flex;
    gap: 25px;
}

.average-rating {
    font-size: 35px;
    font-weight: 600;
}

/* CSS for Comments */
.comment-background-white {
    background-color: #ffffff;
}

.comment-background-light-pink {
    background-color: #f6f0ed;
}

/* Additional classes for replies */
.reply-background-white {
    background-color: #ffffff;
}

.reply-background-light-pink {
    background-color: #f6f0ed;
}

.no-reviews-message {
    text-align: center;
}

textarea#review-content, textarea#reply-content {
    min-height: 20vh;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    .esrc-main {
        flex-direction: column;
    }

    .left-column, .right-column {
        width: 100%;
        float: none;
    }

    .esrc-comment {
        padding: 15px;
    }
}

/* ====================================
   COMMENT SECTION'DA YILDIZLAR STATİK
   Tıklanamaz, hover çalışmaz
   ==================================== */
.esrc-comment .windmill-star-rating {
    pointer-events: none;
}

.esrc-comment .windmill-star-rating i {
    cursor: default;
}

/* ====================================
   WOOCOMMERCE UYUMLULUK
   WooCommerce'in kendi star-rating'i korunur
   ==================================== */
.woocommerce .star-rating {
    /* WooCommerce'in kendi stilleri korunur */
    /* Hiçbir şey override edilmez */
}

/* ====================================
   SADECE BİZİM WİDGETIMIZDAKİ YILDIZLAR
   ==================================== */
.esrc-widget .windmill-star-rating {
    /* Bizim stillerimiz sadece widget içinde çalışır */
}

/* ====================================
   POPUP'TAKİ YILDIZLAR AKTİF
   Tıklanabilir ve hover çalışır
   ==================================== */
#review-popup .windmill-star-rating i {
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.2s ease;
}

#review-popup .windmill-star-rating i:hover {
    transform: scale(1.1);
}