/* Utilweb: Estilos para a Calculadora de IMC v1.2 (Gráfico SVG) */

.imc-container {
    display: flex;
    gap: 40px;
    padding: 10px;
}

.imc-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.imc-resultado-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 280px;
}

#imc-form .form-group {
    margin-bottom: 20px;
}

.resultado-contexto {
    margin-top: auto;
    padding: 15px;
    background-color: var(--background-light);
    border-radius: 8px;
    text-align: center;
}

.resultado-contexto p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary-light);
}

.faixa-destaque {
    font-weight: 600;
    font-size: 1.2rem !important;
    color: var(--primary-color) !important;
    margin-top: 5px !important;
}

.disclaimer-importante {
    margin-top: 20px;
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-secondary-light);
}

.resultado-label {
    font-size: 1.1rem;
    color: var(--text-secondary-light);
    margin-bottom: 0;
}

.resultado-valor {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-primary-light);
    line-height: 1;
    margin: 10px 0;
}

/* --- ESTILOS DO NOVO GRÁFICO SVG --- */
.grafico-imc-container {
    position: relative;
    width: 250px;
    height: 125px;
    margin-bottom: 15px;
}

.grafico-imc {
    width: 100%;
    height: 100%;
}

.imc-segmento {
    transition: opacity 0.4s ease;
    opacity: 0.3; /* Todos os segmentos começam apagados */
}

.imc-segmento.active {
    opacity: 1; /* Segmento ativo fica com a cor vibrante */
    stroke: var(--card-background-light); /* Borda para destacar */
    stroke-width: 0.2;
}
body.dark-mode .imc-segmento.active {
    stroke: var(--card-background-dark);
}

.imc-categoria-texto-grafico {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 20px;
    text-align: center;
    color: #fff;
    transition: background-color 0.4s ease;
}

/* --- LEGENDA --- */
.legenda-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 15px;
    margin-top: 10px;
}

.legenda-item {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary-light);
}

.legenda-cor {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 5px;
}

.legenda-cor.magreza { background-color: #3498db; }
.legenda-cor.normal { background-color: #2ecc71; }
.legenda-cor.sobrepeso { background-color: #f1c40f; }
.legenda-cor.obesidade { background-color: #e67e22; }

/* Classes de Categoria para o texto */
.cat-preencha { background-color: var(--border-color); color: var(--text-secondary-light); }
.cat-magreza { background-color: #3498db; }
.cat-normal { background-color: #2ecc71; }
.cat-sobrepeso { background-color: #f1c40f; }
.cat-obesidade { background-color: #e67e22; }
.cat-obesidade-grave { background-color: #c0392b; }


/* Estilos da Tabela de Conteúdo */
.content-section table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.9rem; text-align: center;}
.content-section th, .content-section td { border: 1px solid var(--border-color); padding: 12px; }
.content-section th { background-color: var(--background-light); font-weight: 600; }
.content-section tbody tr:nth-child(2) td { background-color: #2ecc7130;} /* Destaque na faixa normal */


/* Responsividade */
@media (max-width: 768px) {
    .imc-container {
        flex-direction: column;
        gap: 20px;
    }
    .imc-resultado-section {
        order: -1; /* Joga o resultado para cima */
        padding-bottom: 20px;
        border-bottom: 1px solid var(--border-color);
    }
}
