/**
 * WooCommerce Reviews Styling - Metronic 8 Theme
 * Styles for product reviews and ratings
 */

/* Reviews Section */
#reviews {
    margin-top: 3rem;
}

.woocommerce-Reviews-title {
    margin-bottom: 2rem;
}

/* Review List */
.commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.commentlist .comment {
    margin-bottom: 0 !important;
}

/* Review Item */
.comment_container {
    padding: 1.5rem;
}

/* Avatar */
.comment_container .symbol {
    flex-shrink: 0;
}

/* Rating Stars */
.rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.rating-label {
    position: relative;
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
}

.rating-label .star-icon {
    color: #E4E6EF;
    font-size: 1.1rem;
}

.rating-label.checked .star-icon {
    color: #FFC700;
}

/* Review Form */
#review_form_wrapper {
    margin-top: 3rem;
}

#review_form {
    background-color: #F5F8FA;
    border-radius: 0.625rem;
    padding: 2rem;
}

.comment-reply-title {
    display: block;
    margin-bottom: 1.5rem;
}

.comment-form-rating,
.comment-form-author,
.comment-form-email,
.comment-form-comment {
    margin-bottom: 1.5rem;
}

.comment-form-rating label,
.comment-form-author label,
.comment-form-email label,
.comment-form-comment label {
    display: block;
    font-weight: 600;
    color: #181C32;
    margin-bottom: 0.5rem;
}

.comment-form-rating .required,
.comment-form-author .required,
.comment-form-email .required,
.comment-form-comment .required {
    color: #F1416C;
}

/* Star Rating Input */
.rating-input-wrapper {
    background-color: #F5F8FA;
    border-radius: 0.625rem;
    padding: 1.5rem;
    border: 2px dashed #E4E6EF;
    transition: all 0.3s ease;
}

.rating-input-wrapper:hover {
    border-color: #009EF7;
    background-color: #F1FAFF;
}

.rating-stars {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-star {
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.rating-star:hover {
    transform: scale(1.2);
}

.rating-star-icon {
    transition: all 0.2s ease;
}

.rating-star:hover .rating-star-icon,
.rating-star.active .rating-star-icon,
.rating-star.hover .rating-star-icon {
    color: #FFC700 !important;
}

.rating-star .rating-star-icon .path1 {
    fill: currentColor;
}

.rating-star .rating-star-icon .path2 {
    fill: currentColor;
    opacity: 0.3;
}

.rating-star.active .rating-star-icon .path2,
.rating-star.hover .rating-star-icon .path2 {
    opacity: 1;
}

.rating-text {
    text-align: center;
    min-height: 24px;
    transition: all 0.3s ease;
}

.rating-text.has-rating {
    color: #009EF7 !important;
    font-weight: 600 !important;
}

/* Form Controls */
#author,
#email,
#comment {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #E4E6EF;
    border-radius: 0.625rem;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    color: #181C32;
    transition: all 0.2s ease;
}

#author:focus,
#email:focus,
#comment:focus {
    background-color: #ffffff;
    border-color: #009EF7;
    box-shadow: 0 0 0 3px rgba(0, 158, 247, 0.1);
    outline: none;
}

#comment {
    min-height: 150px;
    resize: vertical;
}

/* Submit Button */
.form-submit {
    margin-bottom: 0;
}

#submit {
    background-color: #009EF7;
    border: none;
    border-radius: 0.625rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

#submit:hover {
    background-color: #0095E8;
    box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 158, 247, 0.075);
}

#submit:active {
    background-color: #007CC3;
}

/* Verified Badge */
.badge-light-success {
    background-color: #E8FFF3;
    color: #50CD89;
    padding: 0.35rem 0.65rem;
    border-radius: 0.425rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* No Reviews Message */
.woocommerce-noreviews {
    background-color: #F5F8FA;
    border-radius: 0.625rem;
    padding: 2rem;
    text-align: center;
    font-size: 1rem;
}

/* Verification Required Message */
.woocommerce-verification-required {
    background-color: #FFF8DD;
    border-left: 4px solid #FFC700;
    border-radius: 0.625rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* Review Meta */
.woocommerce-review__published-date {
    font-style: normal;
}

/* Comment Pagination */
.woocommerce-pagination {
    margin-top: 2rem;
}

.woocommerce-pagination ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.woocommerce-pagination li {
    display: inline-block;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #F5F8FA;
    border-radius: 0.425rem;
    color: #3F4254;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.woocommerce-pagination a:hover {
    background-color: #009EF7;
    color: #ffffff;
}

.woocommerce-pagination .current {
    background-color: #009EF7;
    color: #ffffff;
}

/* Character Counter */
#char-counter {
    font-weight: 500;
}

#char-requirement {
    font-weight: 600;
}

/* Success animation */
@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.rating-star.pulse {
    animation: starPulse 0.3s ease-in-out;
}

/* Form field validation states */
.border-danger {
    border-color: #F1416C !important;
    box-shadow: 0 0 0 3px rgba(241, 65, 108, 0.1) !important;
}

.alert-danger {
    background-color: #FFF5F8;
    border: 1px solid #F1416C;
    border-radius: 0.625rem;
    color: #F1416C;
}

/* Rating wrapper states */
.rating-input-wrapper.has-selection {
    border-color: #50CD89;
    background-color: #E8FFF3;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .comment_container {
        padding: 1rem;
    }
    
    .comment_container .d-flex {
        flex-direction: column;
    }
    
    .comment_container .symbol {
        margin-bottom: 1rem;
    }
    
    #review_form {
        padding: 1.5rem;
    }
    
    .rating-stars {
        gap: 0.5rem !important;
    }
    
    .rating-star-icon {
        font-size: 2rem !important;
    }
}

/* Store Reviews Specific Styles */
.dokan-store-reviews .card {
    border: 1px solid #E4E6EF;
    border-radius: 0.625rem;
    transition: all 0.2s ease;
}

.dokan-store-reviews .card:hover {
    border-color: #009EF7;
    box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 158, 247, 0.075);
}

.dokan-store-reviews .symbol {
    flex-shrink: 0;
}

/* Alert Styling */
.alert-info {
    background-color: #F1FAFF;
    border: 1px solid #B7E1FA;
    border-radius: 0.625rem;
}

.alert-info .text-info {
    color: #009EF7 !important;
}

/* Pagination for Store Reviews */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #F5F8FA;
    border-radius: 0.425rem;
    color: #3F4254;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #E4E6EF;
}

.pagination .page-link:hover {
    background-color: #009EF7;
    color: #ffffff;
    border-color: #009EF7;
}

.pagination .page-item.active .page-link {
    background-color: #009EF7;
    color: #ffffff;
    border-color: #009EF7;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Product Rating Display */
.woocommerce-product-rating {
    margin-bottom: 1.5rem;
}

.woocommerce-product-rating .rating {
    display: inline-flex;
}

.woocommerce-review-link {
    color: #7E8299;
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-review-link:hover {
    color: #009EF7;
}
