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

.star-rating .star {
    font-size: 1rem;
    color: #d1d5db; /* Default gray */
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.star-rating .star:hover,
.star-rating .star.hovered {
    color: #fbbf24; /* Yellow on hover */
}

.star-rating .star.selected {
    color: #f59e0b; /* Selected yellow */
}

.star-rating .star.fas {
    color: #f59e0b; /* Solid yellow for filled stars */
}

.star-rating .star.far {
    color: #d1d5db; /* Empty gray for unfilled stars */
}

/* Review form specific styles */
.review-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
}

.review-stars .star {
    font-size: 1.5rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.review-stars .star:hover,
.review-stars .star.hovered {
    color: #fbbf24;
}

.review-stars .star.selected {
    color: #f59e0b;
}

/* Compact rating display for cards */
.contractor-card-rating .star-rating .star {
    font-size: 0.875rem;
}

.star-rating[data-rating="0"] .star {
    color: #d1d5db;
}

.star-rating[data-rating="1"] .star:nth-child(-n+1),
.star-rating[data-rating="1.5"] .star:nth-child(-n+1),
.star-rating[data-rating="1.5"] .star:nth-child(2) {
    color: #f59e0b;
}

.star-rating[data-rating="2"] .star:nth-child(-n+2),
.star-rating[data-rating="2.5"] .star:nth-child(-n+2),
.star-rating[data-rating="2.5"] .star:nth-child(3) {
    color: #f59e0b;
}

.star-rating[data-rating="3"] .star:nth-child(-n+3),
.star-rating[data-rating="3.5"] .star:nth-child(-n+3),
.star-rating[data-rating="3.5"] .star:nth-child(4) {
    color: #f59e0b;
}

.star-rating[data-rating="4"] .star:nth-child(-n+4),
.star-rating[data-rating="4.5"] .star:nth-child(-n+4),
.star-rating[data-rating="4.5"] .star:nth-child(5) {
    color: #f59e0b;
}

.star-rating[data-rating="5"] .star {
    color: #f59e0b;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .star-rating .star {
        font-size: 0.875rem;
    }
    
    .review-stars .star {
        font-size: 1.25rem;
    }
}