/* ============================================================
   EltonCalc Widget — v1.2.0
   Fontes: DM Sans (corpo) | Libre Baskerville (títulos)
   Paleta: #152c2d | #FFB743 | #FFD38D | #C00000 | #375623
   ============================================================ */

/* ---- Reset interno ---- */
#eltoncalc-widget *,
#eltoncalc-widget *::before,
#eltoncalc-widget *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#eltoncalc-widget {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1a;
    max-width: 680px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

/* ---- Header do widget ---- */
#eltoncalc-widget .ec-step {
    padding: 36px 40px 32px;
}

@media (max-width: 520px) {
    #eltoncalc-widget .ec-step { padding: 24px 20px 20px; }
}

/* ---- Utilitários ---- */
.ec-hidden { display: none !important; }

/* ---- Tipografia ---- */
#eltoncalc-widget .ec-titulo {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.5em;
    font-weight: 700;
    color: #152c2d;
    line-height: 1.3;
    margin-bottom: 10px;
}

#eltoncalc-widget .ec-subtitulo {
    font-size: 0.97em;
    color: #555;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ================================================================
   STEP 1 — FORMULÁRIO
   ================================================================ */

/* Grid de 2 colunas */
#eltoncalc-widget .ec-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    margin-bottom: 24px;
}

#eltoncalc-widget .ec-campo-full {
    grid-column: span 2;
}

/* Cada campo é coluna flex para alinhar inputs na mesma linha horizontal */
#eltoncalc-widget .ec-campo {
    display: flex;
    flex-direction: column;
}

#eltoncalc-widget .ec-campo label:not(.ec-label-check) {
    flex: 1;
    display: flex;
    align-items: flex-end;
    font-size: 0.82em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #152c2d;
    padding-bottom: 6px;
}

#eltoncalc-widget .ec-campo input,
#eltoncalc-widget .ec-campo select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d4d4d4;
    border-radius: 7px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 0.97em;
    color: #1a1a1a;
    background: #fafafa;
    transition: border-color 0.18s, box-shadow 0.18s;
    appearance: auto;
}

#eltoncalc-widget .ec-campo input:focus,
#eltoncalc-widget .ec-campo select:focus {
    outline: none;
    border-color: #152c2d;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21, 44, 45, 0.09);
}

/* Remove setas de input number se existir em versões antigas */
#eltoncalc-widget input[type="number"]::-webkit-inner-spin-button,
#eltoncalc-widget input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#eltoncalc-widget input[type="number"] { -moz-appearance: textfield; }

/* Campo de moeda — destaca o R$ em foco */
#eltoncalc-widget .ec-moeda {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #152c2d;
}

/* ---- Disclaimer + ciente ---- */
#eltoncalc-widget .ec-disclaimer-wrap {
    background: #f7f5f0;
    border: 1px solid #e8e4d8;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 22px;
}

#eltoncalc-widget .ec-disclaimer {
    font-size: 0.8em;
    color: #777;
    line-height: 1.6;
    margin-bottom: 12px;
}

#eltoncalc-widget .ec-label-ciente {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.86em;
    font-weight: 600;
    color: #152c2d;
    cursor: pointer;
}

#eltoncalc-widget .ec-label-ciente input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: #152c2d;
    cursor: pointer;
}

/* ---- Botão calcular ---- */
#eltoncalc-widget .ec-btn-calcular {
    display: block;
    width: 100%;
    padding: 15px 24px;
    background: #FFB743;
    color: #152c2d;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s, opacity 0.18s;
}

#eltoncalc-widget .ec-btn-calcular:hover:not(:disabled) {
    background: #ffc55a;
    transform: translateY(-1px);
}

#eltoncalc-widget .ec-btn-calcular:disabled {
    background: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
    transform: none;
}

/* ================================================================
   STEP 2 — RESULTADO
   ================================================================ */

/* Caixas de alerta / ok */
#eltoncalc-widget .ec-resultado-alerta,
#eltoncalc-widget .ec-resultado-ok {
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 22px;
    line-height: 1.6;
}

#eltoncalc-widget .ec-resultado-alerta {
    background: #fff5f0;
    border-left: 4px solid #C00000;
}

#eltoncalc-widget .ec-alerta-titulo {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.05em;
    font-weight: 700;
    color: #C00000;
    margin-bottom: 8px;
}

#eltoncalc-widget .ec-resultado-ok {
    background: #f0f9f2;
    border-left: 4px solid #375623;
}

#eltoncalc-widget .ec-ok-titulo {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.05em;
    font-weight: 700;
    color: #375623;
    margin-bottom: 8px;
}

/* ---- Grid de cards ---- */
#eltoncalc-widget .ec-resultado-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

#eltoncalc-widget .ec-card {
    padding: 18px 16px 14px;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#eltoncalc-widget .ec-card-label {
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.4;
}

#eltoncalc-widget .ec-card-valor {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.3em;
    font-weight: 700;
    line-height: 1.2;
    margin: 2px 0 4px;
}

#eltoncalc-widget .ec-card-obs {
    font-size: 0.78em;
    line-height: 1.45;
    opacity: 0.82;
}

#eltoncalc-widget .ec-card-nota {
    font-size: 0.73em;
    line-height: 1.4;
    font-style: italic;
    opacity: 0.7;
    margin-top: 2px;
}

/* Verde — mensalidade correta */
#eltoncalc-widget .ec-card-verde {
    background: #eef8f0;
    border: 1.5px solid #a8d4b0;
}
#eltoncalc-widget .ec-card-verde .ec-card-label { color: #375623; }
#eltoncalc-widget .ec-card-verde .ec-card-valor { color: #2d4a22; }

/* Vermelho — excesso */
#eltoncalc-widget .ec-card-vermelho {
    background: #fff2ef;
    border: 1.5px solid #e8a898;
}
#eltoncalc-widget .ec-card-vermelho .ec-card-label { color: #C00000; }
#eltoncalc-widget .ec-card-vermelho .ec-card-valor { color: #C00000; }
#eltoncalc-widget .ec-card-vermelho .ec-card-obs   { color: #8b3333; }
#eltoncalc-widget .ec-card-vermelho .ec-card-nota  { color: #8b3333; }

/* Destaque — recuperável (largura total) */
#eltoncalc-widget .ec-card-destaque {
    grid-column: span 2;
    background: #152c2d;
    border: 1.5px solid #FFB743;
    border-radius: 9px;
}
#eltoncalc-widget .ec-card-destaque .ec-card-label { color: #FFD38D; }
#eltoncalc-widget .ec-card-destaque .ec-card-valor {
    color: #FFB743;
    font-size: 1.65em;
}
#eltoncalc-widget .ec-card-destaque .ec-card-obs { color: #9dbfbf; }

/* Prescrito (largura total) */
#eltoncalc-widget .ec-card-prescrito {
    grid-column: span 2;
    background: #f7f7f7;
    border: 1.5px solid #d4d4d4;
}
#eltoncalc-widget .ec-card-prescrito .ec-card-label { color: #666; }
#eltoncalc-widget .ec-card-prescrito .ec-card-valor { color: #555; }
#eltoncalc-widget .ec-card-prescrito .ec-card-obs   { color: #888; }

/* ---- CTA button (antes do form de lead) ---- */
#eltoncalc-widget .ec-cta-wrap {
    text-align: center;
    margin-bottom: 32px;
}

#eltoncalc-widget .ec-btn-cta {
    display: inline-block;
    padding: 16px 32px;
    background: #152c2d;
    color: #FFB743;
    border: 2px solid #FFB743;
    border-radius: 8px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.12s;
}

#eltoncalc-widget .ec-btn-cta:hover {
    background: #FFB743;
    color: #152c2d;
    transform: translateY(-2px);
}

/* ---- Caixa do formulário de lead ---- */
#eltoncalc-widget .ec-lead-box {
    background: #f7f5f0;
    border: 1px solid #e8e4d8;
    border-radius: 10px;
    padding: 28px 28px 24px;
    margin-top: 4px;
}

@media (max-width: 520px) {
    #eltoncalc-widget .ec-lead-box { padding: 20px 16px 18px; }
}

#eltoncalc-widget .ec-lead-titulo {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.1em;
    font-weight: 700;
    color: #152c2d;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #FFB743;
}

/* Checkbox de consentimento */
#eltoncalc-widget .ec-campo-check {
    margin: 18px 0 22px;
}

#eltoncalc-widget .ec-campo .ec-label-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.84em;
    font-weight: normal;
    letter-spacing: normal;
    color: #555;
    cursor: pointer;
    line-height: 1.55;
    text-transform: none;
}

#eltoncalc-widget .ec-label-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #152c2d;
}

/* Botão enviar lead */
#eltoncalc-widget .ec-btn-enviar {
    display: block;
    width: 100%;
    padding: 15px 24px;
    background: #152c2d;
    color: #FFB743;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s, opacity 0.18s;
}

#eltoncalc-widget .ec-btn-enviar:hover:not(:disabled) {
    background: #1e3d3e;
    transform: translateY(-1px);
}

#eltoncalc-widget .ec-btn-enviar:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ================================================================
   STEP 3 — SUCESSO
   ================================================================ */

#eltoncalc-widget .ec-sucesso-box {
    text-align: center;
    padding: 48px 32px 44px;
}

#eltoncalc-widget .ec-sucesso-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #eef8f0;
    border: 2px solid #375623;
    border-radius: 50%;
    font-size: 1.7em;
    color: #375623;
    margin-bottom: 20px;
}

#eltoncalc-widget .ec-titulo-sucesso {
    color: #152c2d;
    margin-bottom: 12px;
}

#eltoncalc-widget .ec-sucesso-msg {
    font-size: 1.02em;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.6;
}

#eltoncalc-widget .ec-sucesso-marca {
    font-size: 0.86em;
    color: #999;
    margin-bottom: 28px;
}

/* Botão WhatsApp */
#eltoncalc-widget .ec-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: #25d366;
    color: #fff;
    border-radius: 8px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 0.97em;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s, transform 0.12s;
}

#eltoncalc-widget .ec-btn-whatsapp:hover {
    background: #1ebe5a;
    transform: translateY(-1px);
    color: #fff;
}

/* ================================================================
   RESPONSIVO
   ================================================================ */

@media (max-width: 540px) {
    #eltoncalc-widget .ec-form-grid {
        grid-template-columns: 1fr;
    }
    #eltoncalc-widget .ec-campo-full {
        grid-column: span 1;
    }
    #eltoncalc-widget .ec-resultado-grid {
        grid-template-columns: 1fr;
    }
    #eltoncalc-widget .ec-card-destaque,
    #eltoncalc-widget .ec-card-prescrito {
        grid-column: span 1;
    }
    #eltoncalc-widget .ec-btn-cta {
        display: block;
        text-align: center;
    }
    #eltoncalc-widget .ec-titulo {
        font-size: 1.25em;
    }
    #eltoncalc-widget .ec-sucesso-box {
        padding: 32px 20px 28px;
    }
}
