/* Rating System CSS */

/* Star Rating Interactive Styles */
.rating-stars .star {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

/* Modal Rating Stars - Make them larger */
#ratingModal .rating-stars .star {
    font-size: 3rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    margin: 0 0.25rem;
}

.rating-stars .star:hover,
#ratingModal .rating-stars .star:hover {
    color: #ffc107;
    transform: scale(1.1);
}

.rating-stars .star.active,
#ratingModal .rating-stars .star.active {
    color: #ffc107;
}

.rating-stars .star.hover,
#ratingModal .rating-stars .star.hover {
    color: #ffb300;
    transform: scale(1.1);
}

.rating-stars .star:focus,
#ratingModal .rating-stars .star:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Star Display Component Styles */
.stars-display {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.stars-display.small {
    font-size: 0.875rem;
}

.stars-display.large {
    font-size: 1.25rem;
}

.stars-display .star {
    color: #ddd;
    transition: color 0.2s ease;
}

.stars-display .star.filled {
    color: #ffc107;
}

.stars-display .star.half {
    background: linear-gradient(90deg, #ffc107 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Rating Button Styles */
.rating-btn {
    border: 2px solid #ffd700 !important;
    color: #6f42c1 !important;
    background-color: transparent !important;
    font-weight: 600;
    transition: all 0.2s ease, transform 0.2s ease;
}

.rating-btn:hover {
    background-color: #6f42c1 !important;
    color: white !important;
    border-color: #ffd700 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
}

.rating-btn:focus {
    border-color: #ffd700 !important;
    color: #6f42c1 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

/* Rating Modal Specific Styles */
#ratingModal .modal-dialog {
    max-width: 1000px;
}

#ratingModal .rating-content-image img {
    max-width: 200px;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#ratingModal .rating-content-info {
    flex: 1;
}

#ratingModal .rating-stars-container {
    margin: 20px 0;
    text-align: center;
}

#ratingModal .rating-description {
    max-height: none;
    overflow: visible;
    line-height: 1.6;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#ratingModal .modal-body {
    padding: 2rem;
    min-height: 400px;
}

#ratingModal .modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem 2rem 1rem;
}

#ratingModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 2rem 1.5rem;
}

/* Status message styling */
#rating-status .alert {
    margin-bottom: 0;
}

/* Comment counter styling */
.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Rating labels */
#rating-label {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #ratingModal .modal-dialog {
        max-width: 95%;
        margin: 1rem;
    }
    
    #ratingModal .rating-stars .star {
        font-size: 2.5rem;
        margin: 0 0.1rem;
    }
    
    #ratingModal .modal-body {
        padding: 1.5rem;
        min-height: 300px;
    }
    
    #ratingModal .rating-content-image img {
        max-width: 150px;
    }
}

/* Accessibility improvements */
.rating-stars .star[tabindex="0"]:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stars-display .star.filled {
        color: #000;
    }
    
    .rating-stars .star.active {
        color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .rating-stars .star,
    .stars-display .star,
    .rating-btn {
        transition: none;
    }
    
    #ratingModal .rating-stars .star:hover {
        transform: none;
    }
    
    @keyframes starPulse {
        0%, 100% { transform: scale(1); }
    }
}

/* Animation for star updates */
@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.stars-display.updating .star {
    animation: starPulse 0.3s ease-in-out;
}

/* Existing Rating Info Styles */
#existing-rating-info {
    background-color: #e7f3ff;
    border-color: #b3d7ff;
    color: #0c5460;
}

#existing-rating-stars {
    color: #ffc107;
    margin-right: 0.5rem;
} 