﻿.rating-scale10 {
    display: flex;
    gap: 0.5rem;
    justify-content: left;
    align-items: center;
    font-size: 1.25rem;
    flex-direction: row;
}

    .rating-scale10 .btn-check {
        display: none;
    }

.scale10-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    min-width: 2.5rem;
    text-align: center;
    display: inline-block;
}

/* Cores graduais do vermelho ao verde */
.scale10-0 {
    background-color: #c0392b;
    color: white;
}

.scale10-1 {
    background-color: #e74c3c;
    color: white;
}

.scale10-2 {
    background-color: #ea6153;
    color: white;
}

.scale10-3 {
    background-color: #f39c12;
    color: black;
}

.scale10-4 {
    background-color: #f1c40f;
    color: black;
}

.scale10-5 {
    background-color: #f7dc6f;
    color: black;
}

.scale10-6 {
    background-color: #a9dfbf;
    color: black;
}

.scale10-7 {
    background-color: #7dcea0;
    color: black;
}

.scale10-8 {
    background-color: #52be80;
    color: white;
}

.scale10-9 {
    background-color: #27ae60;
    color: white;
}

.scale10-10 {
    background-color: #229954;
    color: white;
}

/* Hover: destaque */
.scale10-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

/* Selecionado: borda cinza */
.btn-check:checked + .scale10-btn {
    border: 3px solid #343a40;
    box-shadow: 0 0 5px 3px rgba(73, 80, 87, 0.5);
    filter: brightness(1.15);
}

    /* Corrige comportamento ao clicar */
    .scale10-btn:focus,
    .scale10-btn:active,
    .btn-check:checked + .scale10-btn:focus,
    .btn-check:checked + .scale10-btn:active {
        background-color: inherit;
        outline: none;
        box-shadow: none;
    }

.rating-scale5 {
    display: flex;
    gap: 0.5rem;
    justify-content: left;
    align-items: center;
    font-size: 1.25rem;
    flex-direction: row-reverse;
}

    .rating-scale5 .btn-check {
        display: none;
    }

.scale5-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    min-width: 2.5rem;
    text-align: center;
    display: inline-block;
    background-color: #e9ecef;
    color: #ddd;
}

/* Estiliza os botões anteriores no hover */
.rating-scale5:hover .scale5-btn {
    background-color: #e9ecef;
}

.rating-scale5 .btn-check:checked ~ .scale5-btn {
    background-color: #e9ecef;
}

/* Hover: destaca do início até o botão hover */
.rating-scale5 .btn-check:hover ~ .scale5-btn {
    background-color: #495057;
}

/* Aplica o destaque do início até o hover */
.rating-scale5 .btn-check:hover + .scale5-btn,
.rating-scale5 .btn-check:hover ~ label:hover,
.rating-scale5 label:hover,
.rating-scale5 label:hover ~ label {
    background-color: #495057;
    color: white;
}

/* Aplica o destaque do início até o botão selecionado */
.rating-scale5 .btn-check:checked + .scale5-btn,
.rating-scale5 .btn-check:checked + .scale5-btn ~ label {
    background-color: #495057;
    color: white;
}

@media (max-width: 576px) {
    .rating-scale10,
    .rating-scale5 {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 1rem;
        gap: 0.25rem;
    }

    .scale10-btn,
    .scale5-btn {
        padding: 0.4rem;
        font-size: 1rem;
        min-width: 3rem;
        flex: 1 1 15%;
    }
}