/**
 * Product Comments CSS
 * Styling for enhanced product comments and rating system
 */

/* Rating Statistics */
.product-rating-statistics {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.product-rating-statistics h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--color-secondary);
}

.rating-stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-label {
    width: 100px;
    display: flex;
    align-items: center;
}

.rating-label .stars {
    color: #FFD700;
    margin-right: 5px;
    font-size: 14px;
}

.rating-label .count {
    font-size: 13px;
    color: #777;
}

.rating-bar-container {
    flex-grow: 1;
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 10px;
}

.rating-bar {
    height: 100%;
    background-color: var(--color-primary);
    border-radius: 5px;
}

.rating-percentage {
    width: 40px;
    font-size: 13px;
    color: #777;
    text-align: right;
}

/* Login Notice */
.review-login-notice {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    text-align: center;
}

.review-login-notice p {
    margin-bottom: 15px;
}

.button.login-to-review {
    background-color: var(--color-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.button.login-to-review:hover {
    background-color: var(--color-secondary);
}

/* Comment Actions */
.comment-actions {
    margin-top: 10px;
}

.comment-actions a {
    display: inline-block;
    margin-right: 10px;
    font-size: 14px;
    color: #777;
    text-decoration: none;
    transition: all 0.3s ease;
}

.comment-actions a:hover {
    color: var(--color-primary);
}

.edit-comment:before {
    content: "\f304";
    font-family: "bootstrap-icons";
    margin-right: 5px;
}

.delete-comment:before {
    content: "\f5de";
    font-family: "bootstrap-icons";
    margin-right: 5px;
}

/* Edit Comment Form */
.edit-comment-form {
    margin-top: 15px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

.edit-comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 100px;
    margin-bottom: 15px;
}

.edit-comment-form button {
    margin-right: 10px;
}

.comment-edit-response {
    margin-top: 10px;
}

.comment-edit-response .error {
    color: #d9534f;
    font-size: 14px;
}

.comment-update-success {
    background: #dff0d8;
    color: #3c763d;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
}

/* Note about using Enter to submit */
.comment-notes-enter {
    margin-top: 5px;
    color: #777;
    font-style: italic;
}

/* Star Rating Select */
.star-rating-select {
    display: inline-flex;
    margin: 5px 0;
    font-size: 24px;
    cursor: pointer;
}

.star-rating-select .star {
    color: #ccc;
    transition: color 0.2s ease;
    padding: 0 2px;
}

.star-rating-select .star.active {
    color: #FFD700;
}

.star-rating-select .star:hover {
    transform: scale(1.2);
}

p.stars {
    margin-bottom: 5px !important;
}

/* Hide original WooCommerce rating select */
.comment-form-rating select#rating {
    display: none !important;
}

/* Style the comment form */
#respond .comment-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

#respond .comment-form-comment label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-secondary);
}

#respond .comment-form-comment textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 120px;
}

#respond .form-submit input[type="submit"] {
    background-color: var(--color-primary);
    color: #fff;
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#respond .form-submit input[type="submit"]:hover {
    background-color: var(--color-secondary);
}

/* Review list styling */
.woocommerce #reviews #comments ol.commentlist {
    padding-left: 0;
}

.woocommerce #reviews #comments ol.commentlist li {
    margin-bottom: 30px;
}

.woocommerce #reviews #comments ol.commentlist li .comment_container {
    padding: 20px;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.woocommerce #reviews #comments ol.commentlist li .comment_container:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.woocommerce #reviews #comments ol.commentlist li img.avatar {
    width: 60px;
    height: 60px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: none;
}

.woocommerce #reviews #comments ol.commentlist li .comment-text {
    margin-left: 80px;
    border: none;
    padding: 0;
}

.woocommerce #reviews #comments ol.commentlist li .meta {
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}

.woocommerce #reviews #comments ol.commentlist li .meta strong {
    color: var(--color-secondary);
    font-weight: 600;
}

.woocommerce #reviews #comments ol.commentlist li .description p {
    font-size: 15px;
    line-height: 1.6;
    margin-top: 10px;
}

/* Star rating */
.woocommerce .star-rating {
    color: #FFD700;
}

.woocommerce p.stars a {
    color: #FFD700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rating-stat-row {
        flex-wrap: wrap;
    }
    
    .rating-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .rating-bar-container {
        width: calc(100% - 50px);
    }
    
    .woocommerce #reviews #comments ol.commentlist li img.avatar {
        width: 40px;
        height: 40px;
    }
    
    .woocommerce #reviews #comments ol.commentlist li .comment-text {
        margin-left: 60px;
    }
}