/**
 * Star Rating System Styles
 */

.rating-widget {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 2px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.2rem;
    color: #ddd;
    transition: all 0.2s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #ffc107;
}

.star-rating label:active {
    transform: scale(0.9);
}

/* Read-only rating display */
.rating-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    display: inline-flex;
    gap: 2px;
}

.rating-stars .star {
    color: #ddd;
    font-size: 14px;
}

.rating-stars .star.filled {
    color: #ffc107;
}

.rating-stars .star.half {
    position: relative;
    color: #ddd;
}

.rating-stars .star.half::before {
    content: '\f005';
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    color: #ffc107;
    width: 50%;
    overflow: hidden;
}

.rating-value {
    font-weight: 600;
    color: #333;
}

.dark-mode .rating-value {
    color: #f0f6fc;
}

.rating-count {
    font-size: 12px;
    color: #6c757d;
}

/* Large rating for song page */
.rating-large {
    padding: 15px;
    background: var(--card-bg-color, #f8f9fa);
    border-radius: 12px;
    text-align: center;
}

.dark-mode .rating-large {
    background: var(--bg-card, #21262d);
}

.rating-large .star-rating label {
    font-size: 2rem;
}

.rating-large .rating-info {
    margin-top: 10px;
}

.rating-large .avg-rating {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color, #667eea);
}

.rating-large .total-ratings {
    font-size: 14px;
    color: #6c757d;
}

/* Compact rating for cards */
.rating-compact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.rating-compact .star {
    color: #ffc107;
    font-size: 10px;
}

.rating-compact .value {
    font-weight: 600;
}

/* Rating breakdown */
.rating-breakdown {
    margin-top: 15px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 12px;
}

.rating-bar-label {
    width: 20px;
    text-align: right;
}

.rating-bar-progress {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.dark-mode .rating-bar-progress {
    background: #30363d;
}

.rating-bar-fill {
    height: 100%;
    background: #ffc107;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-bar-count {
    width: 30px;
    text-align: left;
    color: #6c757d;
}
