/* 
 * style.css
 * Arquivo de estilos do formulário.
 * Contém todas as definições visuais e classes para o layout de múltiplas etapas.
 */

:root {
    /* Definição de cores e variáveis globais */
    --primary-color: #e84e0e;
    /* Cor laranja principal */
    --primary-hover: #ff550e;
    /* Cor ao passar o mouse (escurecida levemente) */
    --bg-color: #f3f4f6;
    /* Cor de fundo da página */
    --card-bg: #ffffff;
    /* Cor de fundo do cartão do formulário */
    --text-color: #29264a;
    /* Cor do texto principal */
    --text-secondary: #6b7280;
    /* Cor do texto secundário */
    --border-color: #e5e7eb;
    /* Cor das bordas dos inputs */
    --input-bg: #f9fafb;
    /* Cor de fundo dos inputs */
    --shadow: 0 10px 15px -3px rgba(184, 109, 109, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* Sombra suave */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    background-image: radial-gradient(#f3f4f6 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Estilos do Logo */
.logo-container {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.logo-container:hover {
    filter: brightness(110%);
    transform: translateY(-5px);    
}

.logo {
    width: 300px;
    max-width: 100%;
    /* Garante que não estoure em telas pequenas */
    height: auto;
    display: inline-block;
}

/* Container Principal do Formulário */
.container {
    background-color: var(--card-bg);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 500px;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

.container-flex {
    display: flex;
    justify-content: center; /* Centraliza horizontalmente */
    align-items: center;     /* Centraliza verticalmente */
    
    /* Apenas para visualização do exemplo: */
    width: flex;
    height: auto;
}

.container-flex img {
    /* Define o tamanho máximo para que a imagem não ultrapasse o contêiner */
    max-width: 100%; 
    max-height: 100%;
}


/* Fieldset Styling to match form-group */
fieldset.form-group {
    border: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

fieldset.form-group legend {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0;
    width: 100%;
}

.radio-group {
    display: flex;
    flex-direction: column;
    /* coloca um abaixo do outro */
    gap: 8px;
}

.radio-line {
    display: flex;
    flex-wrap: wrap;
    /* allow wrapping on small screens */
    align-items: center;
    /* faz o input alinhar certinho com texto quebrado */
    gap: 12px;
    max-width: 100%;
    /* mantém o texto organizado e evita que fique muito longo */
    line-height: 1.3;
}

.radio-line input {
    margin-top: 0;
    /* ajusta o alinhamento vertical da bolinha */
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    /* Uses theme color for radio */
}

.radio-line label {
    margin-bottom: 0;
    /* reset label bottom margin inside radio-line */
    display: inline-block;
}

.group-title {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}


.checkbox-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    /* afasta o checkbox do texto (igual Google Forms) */

    /* espaço vertical entre as opções */
}

.checkbox-line label {
    margin-right: 12px;
    margin-bottom: 5px;
}

.checkbox-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-bottom: 5px;
    accent-color: var(--primary-color);
}

h1 {
    color: var(--text-color);
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

p.subtitle {
    color: var(--text-secondary);
    text-align: justify;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

p {
    text-align: justify;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #29264a;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.2s;
}

textarea {
    resize: vertical;
    /* Permite redimensionar apenas verticalmente */
    min-height: 100px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(238, 117, 4, 0.1);
    /* Sombra laranja suave */
    background-color: #fff;
}

/* Estilos dos Botões */
button {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

button:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

button.secondary-btn {
    background-color: #e84e0e;
    /* Cinza para botão voltar */
    margin-top: 0.5rem;
}

button.secondary-btn:hover {
    background-color: #b43c0a;
}

/* Controle de Etapas (Steps) */
.step {
    display: none;
    /* Esconde todas as etapas por padrão */
    animation: fadeIn 0.5s;
}

.step.active {
    display: block;
    /* Mostra apenas a etapa ativa */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mensagens de Status */
.status-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    display: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.success {
    background-color: #ecfdf5;
    color: #047857;
    display: block;
}

.error {
    background-color: #fef2f2;
    color: #b91c1c;
    display: block;
}

/* Spinner de Carregamento */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
    display: none;
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ajustes Responsivos */
@media (max-width: 640px) {
    .container {
        padding: 2rem;
    }
}