/* === РЕЙТИНГ БЛОК === */
.emp-rating {
    background: #ffffff;
    color: #333333;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-width: 250px;
    margin: 18px auto 16px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid #e8e8e8;
}

.emp-rating__title {
    font-size: 1rem;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 0.03em;
    color: #333333;
}

.emp-rating__bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

/* --- Кнопка рейтинга --- */
.emp-rating__btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    background: #f8f9fa;
    margin: 0;
    border-radius: 8px;
    /* Принудительно задаём все 4 стороны рамки */
    border-top: 2px solid transparent !important;
    border-right: 2px solid transparent !important;
    border-bottom: 2px solid transparent !important;
    border-left: 2px solid transparent !important;
    outline: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    min-height: 40px;
    font-size: 1.2em;
    line-height: 1;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* Сброс всех состояний */
.emp-rating__btn,
.emp-rating__btn:link,
.emp-rating__btn:visited,
.emp-rating__btn:hover,
.emp-rating__btn:active,
.emp-rating__btn:focus,
.emp-rating__btn:focus-visible {
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Эффект нажатия */
.emp-rating__btn:active {
    transform: scale(0.97);
}

/* --- Кнопка ЛАЙК --- */
.emp-rating__btn--like {
    border-top-color: #d4edda !important;
    border-right-color: #d4edda !important;
    border-bottom-color: #d4edda !important;
    border-left-color: #d4edda !important;
    color: #28a745;
    background: #f0fff4;
}

.emp-rating__btn--like:hover,
.emp-rating__btn--like:focus {
    border-top-color: #28a745 !important;
    border-right-color: #28a745 !important;
    border-bottom-color: #28a745 !important;
    border-left-color: #28a745 !important;
    background: #e6f9ec;
    color: #1e7e34;
}

/* --- Кнопка ДИЗЛАЙК --- */
.emp-rating__btn--dislike {
    border-top-color: #f8d7da !important;
    border-right-color: #f8d7da !important;
    border-bottom-color: #f8d7da !important;
    border-left-color: #f8d7da !important;
    color: #dc3545;
    background: #fff5f5;
}

.emp-rating__btn--dislike:hover,
.emp-rating__btn--dislike:focus {
    border-top-color: #dc3545 !important;
    border-right-color: #dc3545 !important;
    border-bottom-color: #dc3545 !important;
    border-left-color: #dc3545 !important;
    background: #ffe8e8;
    color: #bd2130;
}

/* --- Иконки и содержимое кнопок --- */
.emp-rating__btn span,
.emp-rating__btn i,
.emp-rating__btn .fa,
.emp-rating__btn *,
.emp-rating__btn *:before,
.emp-rating__btn *:after {
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
}

/* --- Счётчик внутри кнопки --- */
.emp-rating__count {
    display: inline-block;
    margin-left: 6px;
    font-weight: 600;
    min-width: 18px;
    font-size: 0.95em;
    color: inherit !important;
    text-decoration: none !important;
    border: none !important;
}

/* --- Центральный счётчик --- */
.emp-rating__score {
    font-size: 1.15em;
    font-weight: 600;
    color: #333333;
    background: #f1f3f4;
    padding: 6px 14px;
    border-radius: 8px;
    min-width: 40px;
    text-align: center;
    border: 1px solid #e0e0e0;
    white-space: nowrap; /* запрет переносов */
    flex-shrink: 0;      /* не ужиматься в flex-строке */
    line-height: 1;
}

/* --- Адаптив --- */
@media (max-width: 480px) {
    .emp-rating {
        padding: 12px 10px;
        max-width: 100%;
        margin: 12px 8px;
    }
    
    .emp-rating__title {
        font-size: 0.95em;
        margin-bottom: 8px;
    }
    
    .emp-rating__bar {
        gap: 10px;
    }
    
    .emp-rating__score {
        padding: 5px 10px;
        min-width: 32px;
        font-size: 1em;
    }
    
    .emp-rating__btn {
        font-size: 1.05em;
        min-width: 60px;
        min-height: 36px;
        padding: 6px 10px;
    }
}