/**
 * Rating System Fixes
 * This CSS ensures the rating system works properly in reviews
 */

/* Fix star rating appearance */
.rating-select {
    margin: 10px 0;
}

.rating-select .stars {
    display: flex;
    flex-direction: row-reverse; /* To make the stars go from 5 to 1 from left to right */
    justify-content: flex-end;
}

.rating-select input[type="radio"] {
    display: none;
}

.rating-select label {
    cursor: pointer;
    font-size: 24px;
    padding: 0 2px;
}

.rating-select label i {
    color: #ccc;
    transition: color 0.2s ease;
}

.rating-select label i.active,
.rating-select label:hover i,
.rating-select label:hover ~ label i {
    color: #3f51b5;
}

/* Form highlight effect for the review form */
#write-review.highlight {
    animation: pulse 1.5s ease;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(63, 81, 181, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(63, 81, 181, 0); }
    100% { box-shadow: 0 0 0 0 rgba(63, 81, 181, 0); }
}

/* Make sure the review form is always visible when inside the reviews tab */
#reviews #write-review {
    display: block !important;
}

/* Make the reviews tab content look better */
#reviews .review-list {
    margin-bottom: 30px;
}

#reviews .review-item {
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #3f51b5;
}

#reviews .review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

#reviews .reviewer-avatar img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

#reviews .reviewer-details {
    flex: 1;
}

#reviews .reviewer-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

#reviews .review-date {
    font-size: 14px;
    color: #666;
    margin: 0;
}

#reviews .review-rating {
    display: flex;
    align-items: center;
}

#reviews .review-rating .stars {
    display: flex;
    gap: 2px;
}

#reviews .review-rating .stars i {
    color: #3f51b5;
    font-size: 16px;
}

#reviews .review-content {
    margin-top: 10px;
}

#reviews .review-content p {
    margin: 0;
    line-height: 1.6;
    color: #333;
    font-size: 15px;
}

#reviews .no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Comment form in reviews tab */
#reviews #respond {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-top: 30px;
}

/* Structure the reviews tab content properly */
#reviews {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

#reviews h2 {
    order: 1 !important;
    margin-bottom: 20px !important;
}

#reviews .review-list {
    order: 2 !important;
    margin-bottom: 30px !important;
}

#reviews .no-reviews {
    order: 2 !important;
    margin-bottom: 30px !important;
}

#reviews #write-review {
    order: 3 !important;
    margin-top: 20px !important;
    margin-bottom: 30px !important;
    display: block !important;
}

#reviews .reviews-divider {
    order: 4 !important;
    width: 100% !important;
}

#reviews h3.comments-title {
    order: 5 !important;
    margin-top: 30px !important;
    margin-bottom: 15px !important;
}

#reviews #comments {
    order: 6 !important;
    margin-top: 20px !important;
    display: block !important;
}

/* Style the reviews tab container */
.reviews-tab-container {
    width: 100% !important;
}

/* Add title for comments section */
#reviews #comments:before {
    content: 'Customer Comments';
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
}
