/* ==========================================================================
   DataFlex Leads - Gate de captura. Identidade DataFlex, isolado .dfx-lead-*
   ========================================================================== */

.dfx-lead-wrap {
    --dfx-red: #E52B1E;
    --dfx-red-dark: #C12015;
    --dfx-wine: #3B0016;
    --dfx-wine-dark: #2A000F;
    --dfx-sand: #C1B9AE;
    --dfx-gray-200: #EDEDED;
    --dfx-gray-300: #D4D4D8;
    --dfx-gray-500: #71717A;
    --dfx-gray-700: #3F3F46;
    --dfx-gray-900: #18181B;
    --dfx-white: #FFFFFF;
    --dfx-success: #16A34A;
    --dfx-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    box-sizing: border-box;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 20px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(229,43,30,0.18) 0%, transparent 60%),
        linear-gradient(135deg, var(--dfx-wine-dark) 0%, #0A0A0A 55%, #1A000A 100%);
    font-family: var(--dfx-font);
}
.dfx-lead-wrap *, .dfx-lead-wrap *::before, .dfx-lead-wrap *::after { box-sizing: border-box; }

.dfx-lead-glow {
    position: absolute;
    top: -30%;
    right: -20%;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(229,43,30,0.25) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.dfx-lead-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    background: rgba(20,8,12,0.72);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 40px 36px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 32px 80px rgba(0,0,0,0.55);
    text-align: center;
}

.dfx-lead-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 28px;
    line-height: 1;
}
.dfx-lead-brand-data { color: var(--dfx-white); }
.dfx-lead-brand-flex { color: var(--dfx-red); }
.dfx-lead-brand-r { font-size: 9px; vertical-align: super; color: var(--dfx-sand); margin-left: -2px; }
.dfx-lead-brand-by { font-size: 9px; font-weight: 500; color: var(--dfx-sand); letter-spacing: 0.2em; text-transform: uppercase; }
.dfx-lead-brand-by strong { color: var(--dfx-white); font-weight: 700; }

.dfx-lead-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--dfx-white);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.dfx-lead-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 24px;
    line-height: 1.55;
}

/* Etapas (form / code / done) -------------------------------------- */
.dfx-lead-step { display: none; }
.dfx-lead-step.is-active { display: block; }

/* Campos ----------------------------------------------------------- */
.dfx-lead-field { text-align: left; margin-bottom: 14px; }
.dfx-lead-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
/* Seletores duplicados com ID para vencer regras !important do Flatsome
   que usam especificidade mais alta (body .x input, etc.).
   IDs sempre vencem qualquer seletor de classe, mesmo com !important de
   ambos os lados no mesmo nivel de especificidade. */
.dfx-lead-wrap input[type="text"],
.dfx-lead-wrap input[type="tel"],
.dfx-lead-wrap input[type="email"],
.dfx-lead-wrap #dfx-lead-name,
.dfx-lead-wrap #dfx-lead-phone,
.dfx-lead-wrap #dfx-lead-email,
.dfx-lead-wrap #dfx-lead-code {
    display: block !important;
    width: 100% !important;
    height: 48px !important;
    padding: 0 16px !important;
    margin: 0 !important;
    background: rgba(255,255,255,0.06) !important;
    background-color: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    caret-color: #E52B1E !important;
    font-size: 15px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 48px !important;
    text-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: border-color .15s, background .15s;
}
/* Placeholder */
.dfx-lead-wrap input::placeholder,
.dfx-lead-wrap #dfx-lead-name::placeholder,
.dfx-lead-wrap #dfx-lead-phone::placeholder,
.dfx-lead-wrap #dfx-lead-email::placeholder,
.dfx-lead-wrap #dfx-lead-code::placeholder { color: rgba(255,255,255,0.35) !important; opacity: 1 !important; }
/* Foco */
.dfx-lead-wrap input[type="text"]:focus,
.dfx-lead-wrap input[type="tel"]:focus,
.dfx-lead-wrap input[type="email"]:focus,
.dfx-lead-wrap #dfx-lead-name:focus,
.dfx-lead-wrap #dfx-lead-phone:focus,
.dfx-lead-wrap #dfx-lead-email:focus,
.dfx-lead-wrap #dfx-lead-code:focus {
    border-color: #E52B1E !important;
    background: rgba(255,255,255,0.1) !important;
    background-color: rgba(255,255,255,0.1) !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    outline: none !important;
    box-shadow: none !important;
}
/* Autofill do Chrome/Edge: cancela fundo amarelo e texto escuro */
.dfx-lead-wrap input:-webkit-autofill,
.dfx-lead-wrap input:-webkit-autofill:hover,
.dfx-lead-wrap input:-webkit-autofill:focus,
.dfx-lead-wrap input:-webkit-autofill:active {
    -webkit-text-fill-color: #FFFFFF !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(30,10,18,0.95) inset !important;
    box-shadow: 0 0 0 1000px rgba(30,10,18,0.95) inset !important;
    caret-color: #E52B1E !important;
}

.dfx-lead-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    text-align: left;
    margin: 18px 0 20px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    cursor: pointer;
}
.dfx-lead-consent input { margin-top: 2px; flex-shrink: 0; accent-color: var(--dfx-red); width: 16px; height: 16px; }
.dfx-lead-consent a { color: var(--dfx-red); text-decoration: underline; }

.dfx-lead-error {
    background: rgba(229,43,30,0.12);
    border: 1px solid rgba(229,43,30,0.4);
    color: #ff8a80;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    text-align: left;
}
.dfx-lead-alert {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
}
.dfx-lead-alert.is-error {
    background: rgba(229,43,30,0.12);
    border: 1px solid rgba(229,43,30,0.4);
    color: #ff8a80;
}

/* Botao ------------------------------------------------------------ */
.dfx-lead-wrap .dfx-lead-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--dfx-red) 0%, var(--dfx-red-dark) 100%) !important;
    color: var(--dfx-white) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: var(--dfx-font) !important;
    cursor: pointer;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: 0 10px 26px rgba(229,43,30,0.4), inset 0 1px 0 rgba(255,255,255,0.18) !important;
    transition: filter .15s, transform .15s;
    line-height: 1 !important;
}
.dfx-lead-wrap .dfx-lead-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.dfx-lead-wrap .dfx-lead-btn:disabled { opacity: 0.65; cursor: wait; transform: none; }

.dfx-lead-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dfx-lead-spin .7s linear infinite;
}
@keyframes dfx-lead-spin { to { transform: rotate(360deg); } }

.dfx-lead-note {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin: 14px 0 0;
    line-height: 1.5;
}
.dfx-lead-note a { color: var(--dfx-sand); }

/* Etapa codigo ----------------------------------------------------- */
.dfx-lead-mail-icon, .dfx-lead-check-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.dfx-lead-mail-icon {
    background: rgba(229,43,30,0.14);
    color: var(--dfx-red);
}
.dfx-lead-mail-icon svg { width: 28px; height: 28px; }
.dfx-lead-check-icon {
    background: rgba(22,163,74,0.16);
    color: var(--dfx-success);
}
.dfx-lead-check-icon svg { width: 30px; height: 30px; }

#dfx-lead-code {
    text-align: center !important;
    font-size: 26px !important;
    letter-spacing: 12px !important;
    font-weight: 800 !important;
    padding-left: 28px !important;
}

/* Responsivo ------------------------------------------------------- */
@media (max-width: 520px) {
    .dfx-lead-card { padding: 32px 24px; border-radius: 16px; }
    .dfx-lead-wrap { padding: 40px 14px; }
    .dfx-lead-title { font-size: 21px; }
}

.dfx-lead-wrap a:focus-visible,
.dfx-lead-wrap button:focus-visible,
.dfx-lead-wrap input:focus-visible {
    outline: 2px solid var(--dfx-red);
    outline-offset: 2px;
}
