/* Blog Rating System Styles */
.blog-rating-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.rating-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.helpful-rating {
    margin-bottom: 25px;
}

.helpful-question {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
}

.helpful-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.helpful-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.helpful-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.helpful-btn.active {
    border-color: #28a745;
    background: #28a745;
    color: #fff;
}

.helpful-btn.not-helpful.active {
    border-color: #dc3545;
    background: #dc3545;
    color: #fff;
}

.feedback-form {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ddd;
    display: none;
}

.feedback-form.show {
    display: block;
}

.feedback-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

.feedback-submit {
    margin-top: 10px;
    padding: 8px 16px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.feedback-submit:hover {
    background: #0056b3;
}

.star-rating {
    margin-bottom: 15px;
}

.star-rating-question {
    font-size: 16px;
    color: #555;
    margin-bottom: 10px;
}

.stars {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.star {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star:hover,
.star.active {
    color: #ffc107;
}

.rating-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.rating-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.rating-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rating-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.rating-message.show {
    display: block;
}

/* Responsive design */
@media (max-width: 768px) {
    .blog-rating-section {
        margin: 20px 0;
        padding: 15px;
    }
    
    .helpful-buttons {
        flex-direction: column;
    }
    
    .helpful-btn {
        justify-content: center;
    }
    
    .rating-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stars {
        justify-content: center;
    }
}

/* Loading state */
.rating-loading {
    opacity: 0.6;
    pointer-events: none;
}

.rating-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
