/* Neo Crefaz - estilos do widget de pré-análise
   Paleta alinhada à identidade visual do site (seção "Crédito na sua
   conta de luz"): azul-marinho escuro + laranja, sempre nesse padrão
   (não depende de modo claro/escuro do navegador/sistema). */

.neo-crefaz-widget {
    --neo-bg: #141b4d;
    --neo-bg-campo: #ffffff;
    --neo-texto-campo: #141b4d;
    --neo-borda-campo: #d7dbf0;
    --neo-laranja: #f2691f;
    --neo-laranja-hover: #d85a15;
    --neo-texto: #ffffff;
    --neo-texto-secundario: #b3bce0;

    max-width: 520px;
    margin: 0 auto;
    padding: 32px 28px;
    border-radius: 16px;
    background: var(--neo-bg);
    box-shadow: 0 8px 30px rgba(10, 15, 50, 0.35);
    font-family: inherit;
}

.neo-crefaz-step {
    display: none;
}

.neo-crefaz-step--active {
    display: block;
}

.neo-crefaz-titulo {
    margin: 0 0 8px;
    font-size: 1.35em;
    font-weight: 800;
    color: var(--neo-texto);
    line-height: 1.25;
}

.neo-crefaz-subtitulo {
    margin: 0 0 22px;
    color: var(--neo-texto-secundario);
    font-size: 0.95em;
    line-height: 1.5;
}

.neo-crefaz-campo {
    margin-bottom: 16px;
    flex: 1;
}

.neo-crefaz-campo label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85em;
    font-weight: 700;
    color: var(--neo-texto-secundario);
}

.neo-crefaz-campo input,
.neo-crefaz-campo select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--neo-borda-campo);
    border-radius: 8px;
    background: var(--neo-bg-campo);
    color: var(--neo-texto-campo);
    font-size: 1em;
}

.neo-crefaz-campo input::placeholder {
    color: #9096b8;
}

.neo-crefaz-campo select option {
    background: var(--neo-bg-campo);
    color: var(--neo-texto-campo);
}

.neo-crefaz-campo input:focus,
.neo-crefaz-campo select:focus {
    outline: none;
    border-color: var(--neo-laranja);
    box-shadow: 0 0 0 3px rgba(242, 105, 31, 0.25);
}

.neo-crefaz-linha {
    display: flex;
    gap: 14px;
}

.neo-crefaz-linha .neo-crefaz-campo {
    flex: 1;
    min-width: 0;
}

.neo-crefaz-widget .neo-crefaz-botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 17px 20px;
    border: 2px solid #f2691f !important;
    border-radius: 999px !important;
    background: #f2691f !important;
    background-color: #f2691f !important;
    color: #ffffff !important;
    font-size: 1.05em;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(242, 105, 31, 0.35);
    transition: background 0.2s ease, transform 0.1s ease;
}

.neo-crefaz-widget .neo-crefaz-botao:hover {
    background: #d85a15 !important;
    background-color: #d85a15 !important;
    color: #ffffff !important;
    border-color: #d85a15 !important;
}

.neo-crefaz-botao:active {
    transform: scale(0.98);
}

/* Tooltip com a mensagem sobre uso dos dados, só ao passar o mouse */
.neo-crefaz-botao--com-dica {
    position: relative;
}

.neo-crefaz-botao--com-dica::after {
    content: attr(data-dica);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    width: 240px;
    max-width: 80vw;
    padding: 10px 12px;
    border-radius: 8px;
    background: #0c1030;
    color: var(--neo-texto-secundario);
    font-size: 0.78em;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
}

.neo-crefaz-botao--com-dica::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0c1030;
    margin-bottom: -1px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    z-index: 5;
}

.neo-crefaz-botao--com-dica:hover::after,
.neo-crefaz-botao--com-dica:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.neo-crefaz-botao--com-dica:hover::before,
.neo-crefaz-botao--com-dica:focus-visible::before {
    opacity: 1;
    visibility: visible;
}

.neo-crefaz-botao:disabled {
    background: #5a5f82;
    cursor: not-allowed;
}

.neo-crefaz-botao--whatsapp {
    background: #25d366;
    gap: 10px;
}

.neo-crefaz-botao--whatsapp:hover {
    background: #1ebe5b;
}

.neo-crefaz-icone-whatsapp {
    flex-shrink: 0;
}

/* Pontinhos de progresso (topo das telas de resultado) */
.neo-crefaz-pontos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.neo-crefaz-ponto {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--neo-laranja);
    opacity: 0.35;
}

.neo-crefaz-ponto--ativo {
    width: 22px;
    opacity: 1;
}

/* Destaque de texto em laranja dentro dos títulos */
.neo-crefaz-destaque {
    color: var(--neo-laranja);
}

.neo-crefaz-botao--secundario {
    background: transparent;
    border: 1px solid #4a5391;
    color: var(--neo-texto);
}

/* Consentimento LGPD */
.neo-crefaz-consentimento {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 18px;
}

.neo-crefaz-consentimento input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--neo-laranja);
    cursor: pointer;
}

.neo-crefaz-consentimento label {
    font-size: 0.82em;
    line-height: 1.5;
    color: var(--neo-texto-secundario);
    cursor: pointer;
}

.neo-crefaz-consentimento a {
    color: var(--neo-texto);
    text-decoration: underline;
}

/* Selo de segurança abaixo do botão */
.neo-crefaz-selo {
    margin: 16px 0 0;
    text-align: center;
    font-size: 0.78em;
    color: var(--neo-texto-secundario);
    line-height: 1.5;
}

.neo-crefaz-botao--secundario:hover {
    background: var(--neo-bg-campo);
}

.neo-crefaz-aviso {
    margin: 16px 0 0;
    font-size: 0.78em;
    color: var(--neo-texto-secundario);
    text-align: center;
}

.neo-crefaz-erro {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(242, 105, 31, 0.15);
    border: 1px solid rgba(242, 105, 31, 0.4);
    color: #ffb88a;
    font-size: 0.88em;
}

/* Loading */
#neo-crefaz-step-loading {
    text-align: center;
    padding: 20px 0;
}

.neo-crefaz-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 20px;
    border: 4px solid var(--neo-bg-campo);
    border-top-color: var(--neo-laranja);
    border-radius: 50%;
    animation: neo-crefaz-spin 0.9s linear infinite;
}

@keyframes neo-crefaz-spin {
    to { transform: rotate(360deg); }
}

/* Resultado */
#neo-crefaz-step-aprovado,
#neo-crefaz-step-reprovado,
#neo-crefaz-step-erro {
    text-align: center;
    padding: 10px 0;
}

.neo-crefaz-icone {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.6em;
    font-weight: 800;
    background: rgba(242, 105, 31, 0.15);
    color: var(--neo-laranja);
}

.neo-crefaz-icone--sucesso {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
}

.neo-crefaz-icone--info {
    background: rgba(242, 105, 31, 0.15);
    color: var(--neo-laranja);
}

.neo-crefaz-icone--erro {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b7a;
}

@media (max-width: 480px) {
    .neo-crefaz-linha {
        flex-direction: column;
        gap: 0;
    }
    .neo-crefaz-widget {
        padding: 24px 20px;
    }
}
