/* Estilos principais do formulário */
.rcg-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.form-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    position: relative;
}

/* Estilo da tela de CPF */
#cpf-screen {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

#cpf-screen .form-group {
    margin-bottom: 25px;
}

#cpf-screen .form-control {
    text-align: center;
    font-size: 18px;
    padding: 12px 15px;
}

#cpf-screen .form-text {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

#btn-verificar-cpf {
    width: 200px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #2c3e50;
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 700;
}

.header h3 {
    color: #e74c3c;
    margin: 10px 0 5px;
    font-size: 24px;
    font-weight: 600;
}

.header p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* Estilos do stepper */
.stepper {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 0 auto 40px auto;
    max-width: 600px;
    padding: 0 20px;
    counter-reset: step;
}

.stepper-line {
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 1;
}

.stepper-progress {
    position: absolute;
    top: 15px;
    left: 20px;
    height: 2px;
    background-color: #e74c3c;
    z-index: 2;
    transition: width 0.3s ease;
    width: 0%;
}

.step {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
    padding: 0 5px;
}

.step:last-child {
    width: auto;
}

.step-number {
    width: 32px;
    height: 32px;
    background-color: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: #fff;
    font-weight: 700;
    position: relative;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.step.active .step-number,
.step.completed .step-number {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.step.completed .step-number:after {
    content: '✓';
    font-size: 16px;
    line-height: 1;
}

.step-title {
    font-size: 14px;
    color: #95a5a6;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step.active .step-title,
.step.completed .step-title {
    color: #2c3e50;
    font-weight: 600;
}

/* Estilos do formulário */
.form-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    width: 100%;
}

.form-step.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Estilos da navegação do formulário */
.form-navigation {
    margin-top: 40px;
    display: flex !important;
    justify-content: space-between;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
    flex-wrap: wrap;
    gap: 15px;
}

.form-navigation .btn-prev,
.form-navigation .btn-next {
    padding: 12px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    text-align: center;
    line-height: normal;
    border: none !important;
}

.form-navigation .btn-prev {
    background-color: #95a5a6 !important;
    color: white !important;
    margin-right: auto;
}

.form-navigation .btn-prev:hover {
    background-color: #7f8c8d !important;
}

.form-navigation .btn-next,
#step1-navigation .btn-next {
    background-color: #e74c3c !important;
    color: white !important;
    margin-left: auto;
}

.form-navigation .btn-next:hover,
#step1-navigation .btn-next:hover {
    background-color: #c0392b !important;
}

/* Garantir que o botão de navegação do passo 1 fique visível */
#step1-navigation {
    display: flex !important;
    justify-content: flex-end;
    margin-top: 30px;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100%;
}

/* Estilo para o botão de loading */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-right-color: transparent;
    border-top-color: transparent;
    animation: btn-loading 0.6s linear infinite;
}

@keyframes btn-loading {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Estilo do botão Próximo */
.btn-next, #step1-navigation .btn-next {
    background-color: #e74c3c !important;
    color: white !important;
    border: none !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: background-color 0.3s !important;
    display: inline-block !important; /* Alterado para inline-block */
    opacity: 1 !important;
    visibility: visible !important;
    margin-left: auto; /* Alinha à direita */
    text-decoration: none !important;
    text-align: center;
    line-height: normal;
    max-width: 200px;
}

.btn-next:hover, #step1-navigation .btn-next:hover {
    background-color: #c0392b !important;
    color: white !important;
}

/* Garantir que a navegação do passo 1 fique visível */
#step1-navigation {
    display: flex !important;
    justify-content: flex-end;
    margin-top: 30px;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Sobrescrever qualquer estilo que possa estar escondendo o botão */
#step-1 .form-navigation,
#step-2 .form-navigation,
.form-navigation {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px 20px;
}

.form-col {
    flex: 1;
    padding: 0 15px;
    min-width: 200px;
    margin-bottom: 15px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-label.required:after {
    content: ' *';
    color: #e74c3c;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: #e74c3c;
    outline: none;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    margin-right: 8px;
}

/* Navegação do formulário */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-prev, .btn-next, .btn-submit {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-prev {
    background-color: #e0e0e0;
    color: #2c3e50;
}

.btn-prev:hover {
    background-color: #d0d0d0;
}

.btn-next, .btn-submit {
    background-color: #e74c3c;
    color: white;
}

.btn-next:hover, .btn-submit:hover {
    background-color: #c0392b;
}

/* Mensagens de erro/sucesso */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    display: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsividade */
@media (max-width: 768px) {
    .form-col {
        flex: 100%;
    }
    
    .stepper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .step {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .step-number {
        margin: 0 10px 0 0;
    }
    
    .step-title {
        margin: 0;
    }
    
    .stepper-line, .stepper-progress {
        display: none;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-prev, .btn-next, .btn-submit {
        width: 100%;
    }
}
