/* Estilo geral */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.option-container {
    margin-bottom: 10px;
    position: relative;
}

.option-container input[type="radio"] {
    display: none; /* Ocultar o botão de rádio padrão */
}

.option-container input[type="radio"] + label {
    display: block;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding-left: 50px; /* Adiciona espaço para o botão de rádio customizado */
    position: relative;
}

.option-container input[type="radio"] + label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.option-container input[type="radio"]:checked + label::before {
    background-color: #4caf50;
    border-color: #4caf50;
}

.option-container input[type="radio"]:checked + label {
    background-color: #d1e7dd;
    border-color: #4caf50;
}

h1 {
    color: #444;
    margin-bottom: 20px;
}

.buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}

.buttons button {
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.buttons button:hover {
    background-color: #45a049;
}

button {
    padding: 10px 20px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* Barra de progresso */
#progress-bar {
    width: 100%;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

#progress {
    height: 20px;
    background-color: #4caf50;
    width: 0%;
}

canvas {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 500px;
    width: 100%;
}
#grafico-comparacao {
    margin: 20px auto;
    max-width: 600px;
}

/* Estilização do texto explicativo */
.result-text {
    font-size: 18px;
    margin-top: 20px;
    color: #333;
}
.porcentagens-container {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.porcentagem-item {
    font-size: 18px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .porcentagens-container {
        flex-direction: column;
        align-items: center;
    }
    .porcentagem-item {
        margin-bottom: 10px;
    }
}
/* Estilo para ocultar o botão imprimir no mobile */
@media (max-width: 768px) {
    #print-button {
        display: none; /* Oculta o botão no mobile */
    }
}

/* Exibir o botão de impressão apenas em desktops */
@media (min-width: 769px) {
    #print-button {
        display: inline-block; /* Exibe o botão no desktop */
    }
}



/* Estilos para o PDF */
.pdf-layout {
    width: 210mm; /* Largura A4 */
    height: 297mm; /* Altura A4 */
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    font-size: 12pt; /* Ajustar o tamanho da fonte */
    background-color: white;
}

.pdf-layout h1, .pdf-layout h2 {
    text-align: center;
    margin-bottom: 20px;
}

.pdf-layout canvas {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 100%; /* Ajustar o gráfico ao tamanho A4 */
}

.pdf-layout .result-text {
    text-align: center;
    margin: 20px 0;
}

.pdf-layout .buttons {
    display: none; /* Ocultar botões no PDF */
}

/* Estilo geral para o PDF */
.pdf-layout {
    width: 210mm;   /* Largura A4 */
    height: 297mm;  /* Altura A4 */
    padding: 20mm;  /* Margem */
    background-color: white; /* Fundo branco para o PDF */
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.pdf-layout h1, .pdf-layout h2 {
    text-align: center;  /* Centralizar títulos */
    color: #333;         /* Cor padrão do texto */
    margin-top: 0;
    margin-bottom: 10mm;
}

.pdf-layout h1 {
    font-size: 24px;
    font-weight: bold;
}

.pdf-layout h2 {
    font-size: 18px;
    font-weight: normal;
}

/* Estilo do gráfico */
.pdf-layout canvas {
    display: block;
    margin: 0 auto;  /* Centralizar o gráfico */
}

/* Estilo do texto explicativo */
.pdf-layout #result-text {
    font-size: 17px;
    line-height: 1.6;
    text-align: justify;  /* Justificar o texto explicativo */
    margin-top: 20mm;
}

/* Parágrafos do texto extra */
.pdf-layout p {
    font-size: 12px;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    margin-bottom: 5mm;
}

/* Centralizar todos os conteúdos */
.pdf-layout .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Garantir espaçamento adequado */
.pdf-layout .buttons {
    display: none;  /* Esconder os botões no PDF */
}

.pdf-layout .porcentagens-container {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.pdf-layout .porcentagem-item {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

/* Garantir que o conteúdo ocupe a largura adequada */
.pdf-layout .container {
    width: 100%;
    max-width: 200mm; /* Garantir que o conteúdo não ultrapasse os limites do A4 */
    margin: 0 auto;
}

/* Estilo para ocultar o botão imprimir no mobile */
@media (max-width: 768px) {
    #print-button {
        display: none; /* Oculta o botão no mobile */
    }
}