/* ==========================================================================
   Modern Product Reviews Styling for Sparko Theme
   ========================================================================== */

/* -------------------------------------
   1. Comments List (Left Column)
   ------------------------------------- */

.woocommerce-Reviews-title {
    color: var(--secondary-color);
}

.commentlist {
    margin: 0;
    padding: 0;
}

.commentlist li.comment {
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
}

.commentlist .comment_container {
    display: flex;
    gap: 20px;
    background: #fdfdfd;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #eef0fb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease;
}

.commentlist .comment_container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

/* User Avatar */
.commentlist .avatar {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 3px solid #eef0fb;
    padding: 2px;
}

/* Comment Text Area */
.commentlist .comment-text {
    flex: 1;
}

/* Meta Data (Name & Date) */
.commentlist .meta {
    margin-bottom: 10px;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 10px;
}

.commentlist .meta strong.woocommerce-review__author {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 700;
}

.commentlist .meta time.woocommerce-review__published-date {
    color: #999;
    font-size: 0.85rem;
    margin-right: 10px;
    /* RTL spacing */
}

/* Star Rating in Comments */
.commentlist .star-rating {
    float: left;
    /* Pull to left in RTL */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #ffc107;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.commentlist .star-rating::before {
    content: "\f005\f005\f005\f005\f005";
    color: #eef0fb;
}

.commentlist .star-rating span {
    position: absolute;
    top: 0;
    right: 0;
    overflow: hidden;
}

.commentlist .star-rating span::before {
    content: "\f005\f005\f005\f005\f005";
}

/* Comment Description */
.commentlist .description p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0;
}


/* -------------------------------------
   2. Review Form (Right Column Sticky)
   ------------------------------------- */

/* Interactive Star Rating Selection */
p.stars {
    display: inline-block;
    margin-bottom: 20px;
}

p.stars a {
    position: relative;
    display: inline-block;
    text-indent: -999em;
    width: 28px;
    height: 28px;
    text-decoration: none;
}

p.stars a::before {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    content: "\f005";
    color: #eef0fb;
    font-size: 24px;
    text-indent: 0;
    transition: color 0.2s ease;
}

p.stars a:hover~a::before {
    color: #eef0fb;
    /* un-highlight right side in RTL */
}

p.stars:hover a::before {
    color: #ffc107;
}

p.stars.selected a.active~a::before {
    color: #eef0fb;
}

p.stars.selected a:not(.active)::before {
    color: #ffc107;
}

p.stars.selected a.active::before {
    color: #ffc107;
}


/* Form Inputs Hover/Focus */
#review_form input[type="text"]:focus,
#review_form input[type="email"]:focus,
#review_form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(90, 111, 220, 0.1);
}

/* Submit Button Gradient */
#review_form input[type="submit"] {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #9333ea 100%);
    border: none;
    transition: all 0.3s ease;
}

#review_form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90, 111, 220, 0.3);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .commentlist .comment_container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .commentlist .star-rating {
        float: none;
        margin-top: 10px;
    }

    .commentlist .meta time.woocommerce-review__published-date {
        display: block;
        margin: 5px 0 0 0;
    }
}

/* ==========================================================================
   CAPTCHA & REVIEW FORM LUXURY POLISH
   ========================================================================== */
.comment-captcha-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.3s ease;
}

.comment-captcha-wrapper:focus-within {
    border-color: var(--primary-color, #5A6FDC) !important;
    box-shadow: 0 4px 15px rgba(90, 111, 220, 0.1) !important;
}

.captcha-badge {
    background: #ffffff !important;
    border: 2px solid var(--primary-color, #5A6FDC) !important;
    color: var(--primary-color, #5A6FDC) !important;
    box-shadow: 0 4px 12px rgba(90, 111, 220, 0.15) !important;
    font-family: Tahoma, Arial, sans-serif !important;
}

#review_form {
    border-radius: 28px !important;
    padding: 32px !important;
    box-shadow: 0 15px 40px rgba(90, 111, 220, 0.08) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    background: #ffffff !important;
}

#review_form input[type="text"],
#review_form input[type="email"],
#review_form textarea,
#review_form select {
    border: 2px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 14px 18px !important;
    transition: all 0.3s ease !important;
    font-size: 0.95rem !important;
}

#review_form input[type="text"]:focus,
#review_form input[type="email"]:focus,
#review_form textarea:focus,
#review_form select:focus {
    border-color: var(--primary-color, #5A6FDC) !important;
    box-shadow: 0 0 0 4px rgba(90, 111, 220, 0.12) !important;
    outline: none !important;
}

.commentlist .comment_container {
    border-radius: 24px !important;
    padding: 28px !important;
    border: 1px solid rgba(226, 232, 240, 0.7) !important;
    background: #ffffff !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.03) !important;
}

.commentlist .avatar {
    border-radius: 50% !important;
    width: 64px !important;
    height: 64px !important;
    border: 3px solid #f0f4ff !important;
    box-shadow: 0 4px 12px rgba(90, 111, 220, 0.1) !important;
}