/* Paleta de Cores - Azul para SNAP-IV */
:root {
    --primary-color: #2196F3; 
    --primary-dark: #1565C0;  
    --background-light: #f7f7f7; 
    --card-background: #ffffff; 
    --border-radius: 12px;   
    --shadow: rgba(0, 0, 0, 0.08); 
}

/* Estilo Básico do Corpo */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 40px 20px;
    background-color: var(--background-light);
    line-height: 1.6;
    color: #333;
}

/* Estilo das Seções */
section {
    max-width: 700px; 
    margin: 0 auto 30px auto;
    background: var(--card-background);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px var(--shadow); 
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s;
}
section:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Títulos */
h2, h3 {
    color: var(--primary-dark);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}
h3 {
    margin-top: 20px;
}
.instrucoes {
    font-weight: bold;
    color: #777;
    margin-bottom: 20px;
}

/* Estilo para Inputs e Selects */
#parteInicial form label:not(.inline-radio-group label) {
    width: 100%;
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
}
#parteInicial form input:not([type="radio"]), 
#parteInicial form select,
#parteInicial form textarea {
    width: 100%;
    padding: 12px;
    margin: 5px 0 10px 0;
    display: block;
    border: 1px solid #ccc;
    border-radius: 8px; 
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    font-size: inherit;
}
.inline-radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* Foco */
input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2); 
    outline: none;
}
label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

/* Estilo para Botões */
button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px; 
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%; 
    transition: background-color 0.3s, transform 0.1s;
}
button:hover {
    background-color: var(--primary-dark);
}
button:active {
    transform: translateY(1px); 
}

/* Cabeçalho de Subescala */
.subescala-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 25px 0 15px 0;
}
.subescala-header h3 {
    color: white;
    border-bottom: none;
    margin: 0;
    padding: 0;
}
.subescala-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 0.9em;
}

/* Estilo das Perguntas */
.pergunta {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px; 
    background-color: #ffffff;
}
.pergunta p {
    font-weight: bold;
    margin-bottom: 10px;
    color: #444;
}

/* Estilo das Opções de Resposta */
.pergunta label {
    margin-right: 20px;
    display: inline-flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.pergunta label:hover {
    background-color: #f0f7ff;
}
.pergunta input[type="radio"] {
    margin-right: 5px;
}

/* Estilo para o resultado final */
#respostasExibicao {
    white-space: pre-wrap; 
    word-wrap: break-word;
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
}

/* Versão do formulário */
.version-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 14px 0;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    background: rgba(255,255,255,.6);
}
.version-banner strong {
    font-weight: 600;
}
.cache-warning {
    color: #b00020;
    font-weight: 600;
}
.btn-clear-version {
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    color: #333;
    width: auto;
}
.btn-clear-version:hover {
    background: rgba(0,0,0,.04);
}

/* Responsividade para opções de resposta */
@media (max-width: 768px) {
    .pergunta label {
        display: block;
        margin-right: 0;
        margin-bottom: 8px;
        padding: 10px;
        background-color: #f9f9f9;
        border-radius: 6px;
    }
    .pergunta label:hover {
        background-color: #e3f2fd;
    }
}
