/* Customer Reviews and Rating System Styles */

/* Star Rating Styles */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 16px;
}

.star-full {
    color: #ffd700;
}

.star-half {
    color: #ffd700;
}

.star-small .star {
    font-size: 14px;
}

.star-medium .star {
    font-size: 18px;
}

.star-large .star {
    font-size: 24px;
}

/* Review Summary Styles */
.review-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.rating-overview {
    display: flex;
    gap: 30px;
    align-items: center;
}

.average-rating {
    text-align: center;
    min-width: 150px;
}

.rating-number {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.total-reviews {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.verified-count {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.rating-breakdown {
    flex: 1;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rating-label {
    min-width: 50px;
    font-size: 14px;
    color: #666;
}

.rating-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: #ffd700;
    transition: width 0.3s ease;
}

.rating-count {
    min-width: 30px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* Review Filters and Sorting */
.review-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.review-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.write-review-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.write-review-btn:hover {
    background: #005a87;
}

/* Review List Styles */
.reviews-list {
    margin-top: 20px;
}

.review-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: white;
}

.review-header {
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007cba;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.reviewer-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.verified-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.review-date {
    color: #888;
}

.review-content {
    margin-bottom: 15px;
}

.review-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.review-text {
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.review-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.helpful-count {
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.helpful-count:hover {
    color: #007cba;
}

/* Review Submission Form */
.review-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 30px;
}

.review-form h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.rating-input {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.rating-input input[type="radio"]:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #ffd700;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-review-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.submit-review-btn:hover {
    background: #218838;
}

.submit-review-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Load More Button */
.load-more-btn {
    display: block;
    width: 200px;
    margin: 20px auto;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease;
}

.load-more-btn:hover {
    background: #e9ecef;
}

/* No Reviews Message */
.no-reviews {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rating-overview {
        flex-direction: column;
        gap: 20px;
    }
    
    .review-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .review-filters {
        justify-content: space-between;
    }
    
    .reviewer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .review-meta {
        flex-wrap: wrap;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading::after {
    content: '...';
    animation: loading 1s infinite;
}

@keyframes loading {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}