/* rating.css */

/* ===== БАЗОВЫЕ СТИЛИ ===== */
.rating-container {
    display: inline-block;
    margin: 8px 0;
}

.rating-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== ЗВЁЗДЫ (SVG) ===== */
.stars {
    display: flex;
    gap: 4px;
    line-height: 1;
}

.star {
    display: inline-block;
    width: 1em;
    height: 1em;
    transition: transform 0.2s ease;
    position: relative;
}

.star svg {
    width: 100%;
    height: 100%;
    display: block;
}

.star:hover {
    transform: scale(1.15);
}

/* Пустые звёзды */
.star-empty {
    opacity: 0.35;
}

/* Половина звезды */
.half-star {
    position: relative;
    overflow: hidden;
}

.half-star .half-star-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    overflow: hidden;
}

/* ===== ТЕКСТ РЕЙТИНГА ===== */
.rating-text {
    font-size: 0.9rem;
    color: var(--text-secondary, #4a5a72);
}

.rating-text strong {
    color: var(--text, #0a1929);
    font-weight: 700;
}

/* ===== АНИМАЦИЯ ПРИ ЗАГРУЗКЕ ===== */
.rating-container:not(.rating-initialized) .stars {
    opacity: 0;
    transform: translateY(-6px);
    animation: ratingFadeIn 0.4s ease forwards;
}

@keyframes ratingFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   FOOTER BOTTOM С РЕЙТИНГОМ
   ============================================================ */

.footer-bottom-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    border-top: 1px solid var(--border, #e4e9f2);
    padding-top: 20px;
}

.footer-bottom-wrapper .footer-bottom {
    border-top: none;
    padding-top: 0;
    margin: 0;
    text-align: right;
}

.footer-bottom-wrapper .rating-container {
    margin: 0;
    flex-shrink: 0;
}

/* Стили для звёзд в футере (чуть меньше) */
.footer-bottom-wrapper .stars {
    font-size: 1.0rem !important;
}

.footer-bottom-wrapper .rating-text {
    font-size: 0.9rem !important;
}

/* ===== АДАПТИВ ДЛЯ ТЕЛЕФОНОВ ===== */
@media (max-width: 640px) {
    .footer-bottom-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    
    .footer-bottom-wrapper .footer-bottom {
        text-align: center;
    }
    
    .footer-bottom-wrapper .stars {
        font-size: 1rem !important;
    }
    
    .footer-bottom-wrapper .rating-text {
        font-size: 0.75rem !important;
    }
}

/* ===== АДАПТИВ ДЛЯ ТЕЛЕФОНОВ (общие) ===== */
@media (max-width: 480px) {
    .stars {
        font-size: 1.1rem !important;
        gap: 3px;
    }
    
    .rating-text {
        font-size: 0.8rem;
    }
    
    .rating-wrapper {
        gap: 8px;
    }
}