/* Custom CSS for Rating and Review System */

/* Star Rating Styles */
.rating .star {
    cursor: pointer;
    transition: color 0.2s ease;
}

.rating .star:hover,
.rating .star.hover {
    color: #ffba00;
}

.rating .star.active {
    color: #ffba00;
}

/* Rating Summary Styles */
.rating-overview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.average-rating .rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #309255;
    margin-bottom: 10px;
}

.rating-breakdown .single-rating {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.rating-breakdown .rating-star {
    width: 80px;
    flex-shrink: 0;
}

.rating-breakdown .rating-progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.rating-breakdown .rating-line {
    height: 100%;
    background: #309255;
    transition: width 0.3s ease;
}

.rating-breakdown .rating-count {
    width: 30px;
    text-align: right;
    font-size: 14px;
    color: #6c757d;
}

/* Course Rating Summary in Sidebar */
.course-rating-summary {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-text {
    font-size: 14px;
    color: #6c757d;
}

/* Review Styles */
.review-title {
    font-size: 18px;
    font-weight: 600;
    margin: 15px 0 10px 0;
    color: #212832;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.review-date {
    font-size: 12px;
    color: #6c757d;
}

.review-actions {
    display: flex;
    gap: 10px;
}

.helpful-btn,
.unhelpful-btn {
    background: none;
    border: 1px solid #dee2e6;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.helpful-btn:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.unhelpful-btn:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Verified Purchase Badge */
.verified-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

/* No Reviews State */
.no-reviews {
    color: #6c757d;
}

.no-reviews i {
    margin-bottom: 20px;
}

/* Rating Form Styles */
.reviews-form label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #212832;
}

.reviews-form .single-form {
    margin-bottom: 20px;
}

.reviews-form input,
.reviews-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.reviews-form input:focus,
.reviews-form textarea:focus {
    outline: none;
    border-color: #309255;
    box-shadow: 0 0 0 2px rgba(48, 146, 85, 0.1);
}

.reviews-form textarea {
    resize: vertical;
    min-height: 100px;
}

.reviews-form .text-muted {
    font-size: 12px;
    margin-top: 5px;
}

/* Rating Stars in Form */
.reviews-rating .rating {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 10px 0;
    gap: 5px;
}

.reviews-rating .rating li {
    font-size: 24px;
    color: #dee2e6;
    cursor: pointer;
    transition: color 0.2s ease;
}

.reviews-rating .rating li:hover,
.reviews-rating .rating li.hover,
.reviews-rating .rating li.active {
    color: #ffba00;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rating-overview {
        padding: 15px;
    }
    
    .average-rating .rating-number {
        font-size: 2.5rem;
    }
    
    .review-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .review-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .rating-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Additional Rating Star Fixes */
.rating-star {
    position: relative;
    display: inline-block;
}

.rating-star::before {
    content: "\f000\f000\f000\f000\f000";
    font-family: IcoFont;
    color: #d0d0d0;
    font-size: 14px;
    letter-spacing: 2px;
}

.rating-star .rating-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    display: inline-block;
}

.rating-star .rating-bar::before {
    content: "\f000\f000\f000\f000\f000";
    font-family: IcoFont;
    color: #ffba00;
    font-size: 14px;
    letter-spacing: 2px;
}

.rating-number {
    margin-left: 8px;
    font-size: 14px;
    color: #6c757d;
}