/* ===== Formulário de avaliação de serviços ===== */

#serviceEvaluationForm {
    max-width: 760px;
    margin: 30px auto;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 13, 48, 0.08);
    color: #009fee;
    font-family: inherit;
}

/* Espaçamento dos campos */
#serviceEvaluationForm .mb-3 {
    margin-bottom: 24px !important;
}

/* Labels */
#serviceEvaluationForm label,
#serviceEvaluationForm legend {
    display: block;
    margin-bottom: 9px;
    color: #000000;
    font-size: 15px;
    font-weight: 400;
}
#req span {
    color: #FF0000;
}

/* Campos de texto e seleção */
#serviceEvaluationForm .form-control {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid #d5dce6;
    border-radius: 8px;
    background-color: #fff;
    color: #000000;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

/* Foco nos campos */
#serviceEvaluationForm .form-control:focus {
    border-color: #009fee;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 159, 238, 0.14);
}

/* Área de comentário */
#serviceEvaluationForm textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Grupo da classificação */
#serviceEvaluationForm fieldset {
    margin: 0 0 24px;
    padding: 20px;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
}

#serviceEvaluationForm legend {
    float: none;
    width: auto;
    padding: 0 6px;
    font-size: 16px;
}

/* Opções de classificação de 1 a 10 */
#evaluation_rating_options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px !important;
}

#evaluation_rating_options label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0;
    border: 1px solid #d5dce6;
    border-radius: 25px;
    background: #fff;
    color: #000000;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#evaluation_rating_options input[type="radio"] {
    position: absolute;
    /*width: 1px;*/
    /*height: 1px;*/
    opacity: 0;
}

#evaluation_rating_options label:has(input[type="radio"]:checked) {
    border-color: #009fee;
    background: #009fee;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 159, 238, 0.25); 
}
/* Highlight the selected option */
#evaluation_rating_options label:has(input:checked) {
    border-color: #009fee;
    background: #009fee;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 159, 238, 0.25);
}
.rating-label {
    width: 58px;
    height: 58px;
    border: 1px solid #d5deeb;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
    position: relative;
}

#rating-label input {
    position: absolute;
    opacity: 0;
}

#rating-label span {
    font-size: 18px;
}

.rating-label:has(input:checked) {
    border: 2px solid #009fee;
    background-color: #f0f8ff;
}

#rating-description {
    margin-top: 8px;
    white-space: nowrap;
    font-size: 14px;
}

#rating-bad {
    color: #ff3333;
}

#rating-good {
    color: #00a650;
}
/* Highlight every option before the selected one */
#evaluation_rating_options label:has(input:checked) ~ label {
       /* Reset later options to their default state */
    /*background: #fff;*/
    /*border-color: #d5dce6;*/
    /*color: #000D30;*/
     border-color: #d5dce6;
    background: #fff;
    color: #000D30;
    box-shadow: none; 
}

#evaluation_rating_options label:has(input[type="radio"]:focus-visible) {
    outline: 3px solid rgba(0, 159, 238, 0.3);
    outline-offset: 3px;
}

#evaluation_rating_options label:hover {
    border-color: #009fee;
    /*transform: translateY(-2px);*/
}


/* Botão de submissão */
#evaluation_submit_button {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 13px 20px;
    border: none;
    border-radius: 9px;
    background: #009fee;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#evaluation_submit_button:hover {
    background: #009fee;
    transform: translateY(-1px);
}

#evaluation_submit_button:focus-visible {
    outline: 3px solid rgba(0, 159, 238, 0.35);
    outline-offset: 3px;
}

/* Campos ocultos: respeitar o atributo hidden */
#serviceEvaluationForm [hidden] {
    display: none !important;
}

/* Responsividade para telemóveis */
@media (max-width: 576px) {
    #serviceEvaluationForm {
        margin: 20px 12px;
        padding: 20px 16px;
        border-radius: 12px;
    }

    #evaluation_rating_options {
        gap: 7px !important;
    }

    #evaluation_rating_options label {
        width: 39px;
        height: 42px;
        border-radius: 8px;
    }
}