/* ========================================================== */
/* 1. Base Reviews Container Styling */
/* ========================================================== */
#reviews.woocommerce-Reviews {
    margin-top: 40px;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#reviews #comments {
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.woocommerce-Reviews-title {
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 25px;
}

/* ========================================================== */
/* 2. Individual Review List Styling */
/* ========================================================== */
.commentlist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.commentlist .review {
    padding: 20px 0;
    border-top: 1px solid #f5f5f5;
}

.commentlist .review:first-child {
    border-top: none;
    padding-top: 0;
}

.comment_container {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

/* Reviewer Avatar */
.comment_container img.avatar {
    border-radius: 50%;
    border: 2px solid #eeeeee;
    flex-shrink: 0;
    /* Prevent avatar from shrinking */
}

/* Review Text Content */
.comment-text {
    flex-grow: 1;
    line-height: 1.6;
}

/* Reviewer Meta (Author, Date) */
.comment-text .meta {
    font-size: 14px;
    color: #777777;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.woocommerce-review__author {
    font-weight: 600;
    color: #333333;
}

.woocommerce-review__dash {
    margin: 0 5px;
}

/* Star Rating Display */
.comment-text .star-rating {
    margin-bottom: 8px;
}

/* WooCommerce's default star-rating class uses absolute positioning, 
   which is why we adjust its container styling in the .comment-text block 
   and rely on its built-in look. */


/* Review Description Text */
.comment-text .description p {
    margin: 0;
    font-size: 15px;
    color: #444444;
}

/* ========================================================== */
/* 3. Review Form Styling */
/* ========================================================== */
#review_form_wrapper {
    padding-top: 20px;
}

#respond {
    padding: 0;
}

.comment-reply-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 20px;
}

/* Form Fields */
.comment-form p {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555555;
}

.comment-form textarea,
.comment-form input:not([type="submit"]):not([type="hidden"]) {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.comment-form textarea:focus,
.comment-form input:not([type="submit"]):not([type="hidden"]):focus {
    border-color: #000000;
    outline: none;
}

/* Star Rating Input (WooCommerce Default) */
.comment-form-rating {
    margin-bottom: 20px;
}

.comment-form-rating .stars a {
    color: #ffc107;
    /* Star color */
}

/* Submit Button */
.comment-form .form-submit {
    margin-top: 25px;
}

#submit.submit {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.1s;
    text-transform: uppercase;
}

#submit.submit:hover {
    background-color: #333333;
}


/* Container styling to reverse the visual order of stars and add spacing */
p.stars span {
    display: flex;
    flex-direction: row-reverse;
    /* Makes stars display 5 to 1 visually */
    justify-content: flex-end;
    /* Aligns them correctly */
    gap: 0.2em;
    /* Space between stars */
}

/* Styling for the individual star links (Hides text, sets size/position) */
p.stars span a {
    color: transparent !important;
    /* Hides the original "1 of 5 stars" text */
    position: relative;
    display: inline-block;
    font-size: 30px;
    width: 30px;
    /* Ensures each link is exactly one star wide */
    height: 30px;
    line-height: 1;
    text-decoration: none;
    overflow: hidden;
}

/* Styling for the star icon itself (the ::before pseudo-element) */
p.stars span a::before {
    content: "\2605";
    /* Unicode solid star ★ */
    position: absolute;
    left: 0;
    top: 0;
    color: #ddd !important;
    /* Default inactive light gray color */
    font-size: 100%;
    /* Makes icon fill its parent link */
    transition: color 0.2s ease;
    /* Smooth transition for color changes */
    text-indent: 0;
    /* Resets text-indent from parent */
}

/* Hover and active effects (Highlights the hovered star AND all visually previous/HTML subsequent stars) */
p.stars a:hover::before,
p.stars a:hover~a::before,
p.stars a.active::before,
p.stars a.active~a::before {
    color: #ffcc00 !important;
    /* Gold color on hover/active state */
}




/* here */

/* 1. Hide the original text while keeping it accessible to screen readers */
.star-rating span {
    font-size: 0;
    line-height: 0;
    display: block;
    overflow: hidden;
}

/* 2. Add the stars using a pseudo-element */
.star-rating::before {
    content: "\2605\2605\2605\2605\2605";
    /* Five solid stars */
    font-size: 20px;
    /* Adjust size as needed */
    letter-spacing: 2px;
    color: #ccc;
    /* Default 'empty' star color */
    display: block;
}

/* 3. Use the width of the inner span to "fill" the stars */
.star-rating {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

.star-rating span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    /* The inline style width (e.g., 20%) will control the fill */
}

.star-rating span::before {
    content: "\2605\2605\2605\2605\2605";
    font-size: 20px;
    letter-spacing: 2px;
    color: gold;
    /* Filled star color */
    position: absolute;
    top: 16px;
    left: 0;
}

em.woocommerce-review__verified.verified {
    color: green;
}

.review {
    padding: 20px !important;
    background: #f9f9f9;
    margin-bottom: 10px;
    border-radius: 10px;
    border: solid 1px #ddd !important;
}

.comment-uploaded-image img {
    max-width: 200px;
    width: 100%;
    height: 200px;
    border-radius: 4px;
    display: block;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 768px) {
    .comment_container {
        flex-direction: column;
    }

    #reviews.woocommerce-Reviews {
        padding: 5px;
    }

    .comment-uploaded-image img {
        max-width: 100%;
    }

    nav.woocommerce-breadcrumb {
        padding: 7px 10px;
    }
}

nav.woocommerce-breadcrumb {
    background: #fff;
    padding: 7px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
    border-radius: 3px;
}