/* Dynamic Rating System Styles for Salon Style Switch */

.rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.rating .fas,
.rating .far {
    font-size: 1rem;
    color: #ffc107;
    transition: color 0.2s ease;
}

.rating .fas:hover,
.rating .far:hover {
    color: #ffb300;
}

/* Rating size variations */
.rating-large {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.rating-large .fas,
.rating-large .far {
    font-size: 1.25rem;
}

.rating-small {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.rating-small .fas,
.rating-small .far {
    font-size: 0.875rem;
}

.rating-extra-small {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.rating-extra-small .fas,
.rating-extra-small .far {
    font-size: 0.75rem;
}

/* Rating context variations */
.rating-card {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-card .fas,
.rating-card .far {
    font-size: 1rem;
}

.rating-hero {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-hero .fas,
.rating-hero .far {
    font-size: 1.1rem;
    color: #ffc107;
}

.rating-list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-list .fas,
.rating-list .far {
    font-size: 0.9rem;
}

/* Rating text styles */
.rating span {
    font-weight: 600;
    color: #333;
    margin-left: 4px;
}

.rating-card span {
    font-weight: 600;
    color: #333;
}

.rating-hero span {
    font-weight: 600;
    color: #fff;
}

.rating-list span {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

/* Review count styles */
.rating .text-muted {
    font-size: 0.875rem;
    font-weight: 400;
}

.rating-hero .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Interactive rating styles (for forms) */
.rating-interactive {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.rating-interactive .fas,
.rating-interactive .far {
    font-size: 1.5rem;
    color: #ddd;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rating-interactive .fas:hover,
.rating-interactive .far:hover,
.rating-interactive .fas.active,
.rating-interactive .far.active {
    color: #ffc107;
    transform: scale(1.1);
}

/* Rating in different themes */
.theme-her .rating .fas,
.theme-her .rating .far {
    color: #e91e63;
}

.theme-her .rating-interactive .fas:hover,
.theme-her .rating-interactive .far:hover,
.theme-her .rating-interactive .fas.active,
.theme-her .rating-interactive .far.active {
    color: #e91e63;
}

.theme-him .rating .fas,
.theme-him .rating .far {
    color: #2196f3;
}

.theme-him .rating-interactive .fas:hover,
.theme-him .rating-interactive .far:hover,
.theme-him .rating-interactive .fas.active,
.theme-him .rating-interactive .far.active {
    color: #2196f3;
}

/* Rating in dark mode */
@media (prefers-color-scheme: dark) {
    .rating span {
        color: #fff;
    }
    
    .rating-card span {
        color: #fff;
    }
    
    .rating-list span {
        color: #ccc;
    }
}

/* Responsive rating styles */
@media (max-width: 768px) {
    .rating-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .rating-hero .fas,
    .rating-hero .far {
        font-size: 1rem;
    }
    
    .rating-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 576px) {
    .rating .fas,
    .rating .far {
        font-size: 0.875rem;
    }
    
    .rating-large .fas,
    .rating-large .far {
        font-size: 1rem;
    }
    
    .rating span {
        font-size: 0.875rem;
    }
}

/* Animation for rating updates */
.rating-updating {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.rating-updated {
    animation: ratingPulse 0.6s ease-in-out;
}

@keyframes ratingPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Accessibility improvements */
.rating[role="img"] {
    display: inline-flex;
    align-items: center;
}

.rating .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Rating tooltip styles */
.rating-tooltip {
    position: relative;
    display: inline-block;
}

.rating-tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 0.75rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.rating-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

