/* Formulário de lead padrão (LP enxuta, /landing-page e modal de lead) */
:root {
    --lf-blue: #0F7ADE;
    --lf-blue-hover: #0B68C0;
    --lf-ink: #2C3E50;
    --lf-ink-80: #3C4D60;
    --lf-ink-60: #5C6C80;
    --lf-border: #D8E0EC;
    --lf-red: #DD4B6B;
    --lf-font: 'DM Sans', 'Segoe UI', 'Helvetica Neue', system-ui, -apple-system, sans-serif;
}

.lf-form, .lf-form *, .lf-form *::before, .lf-form *::after { box-sizing: border-box; }
.lf-form input::placeholder { color: #8C98A8; opacity: 1; letter-spacing: -0.02em; }

.lf-progress { display: flex; align-items: center; gap: 14px; }
.lf-progress[hidden] { display: none; }
.lf-progress__pct { flex: none; min-width: 40px; font-size: 14px; font-weight: 700; letter-spacing: -0.02em; color: var(--lf-blue); }
.lf-progress__track { flex: 1; min-width: 0; height: 10px; border-radius: 999px; background: #EEF3F9; overflow: hidden; }
.lf-progress__bar {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0F7ADE 0%, #50CDF9 100%);
    transition: width 320ms cubic-bezier(0.2, 0, 0.2, 1);
}

.lf-form { margin: 0; }
.lf-step { display: flex; flex-direction: column; gap: 20px; }
.lf-step[hidden] { display: none; }
.lf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.lf-field { display: grid; gap: 8px; }
.lf-label { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--lf-ink-80); }
.lf-req { color: var(--lf-red); }

.lf-input {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    border: 1px solid var(--lf-border);
    border-radius: 12px;
    background: #FFFFFF;
    font-family: var(--lf-font);
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--lf-ink);
    outline: none;
    transition: border-color 120ms, box-shadow 120ms;
}
.lf-input:focus { border-color: var(--lf-blue); box-shadow: 0 0 0 4px rgba(15, 122, 222, 0.14); }
.lf-input.is-invalid { border-color: var(--lf-red); }

.lf-select { position: relative; display: block; }
.lf-input--select {
    padding: 0 48px 0 18px;
    background: #F9FBFD;
    appearance: none;
    -webkit-appearance: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Select customizado (mesmo padrão do LTV) */
.lf-input--select.lf-native-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lf-select { z-index: 3; }
.lf-select.is-open { z-index: 30; }
.lf-select__button {
    width: 100%;
    height: 56px;
    padding: 0 48px 0 18px;
    border: 1px solid var(--lf-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%);
    color: var(--lf-ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    text-align: left;
    font: 700 16px/1 var(--lf-font);
    letter-spacing: -0.02em;
    box-shadow: 0 1px 0 rgba(15, 122, 222, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.lf-select__button:hover,
.lf-select__button:focus-visible,
.lf-select.is-open .lf-select__button {
    border-color: var(--lf-blue);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(15, 122, 222, 0.14), 0 14px 28px rgba(15, 122, 222, 0.1);
    outline: none;
}
.lf-select__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-select:not(.has-value) .lf-select__value { color: #52637D; }
.lf-select__chevron {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid #718199;
    border-bottom: 2px solid #718199;
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.lf-select.is-open .lf-select__chevron { border-color: var(--lf-blue); transform: translateY(-30%) rotate(225deg); }
.lf-select__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    max-height: 260px;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 6px;
    border: 1px solid #C8D8EE;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 20px 45px rgba(14, 37, 64, 0.18), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.lf-select__menu[hidden] { display: none; }
.lf-select.is-up .lf-select__menu { top: auto; bottom: calc(100% + 8px); }
/* Rola sem mostrar a barra (o JS já limita a altura ao espaço visível) */
.lf-select__menu { scrollbar-width: none; }
.lf-select__menu::-webkit-scrollbar { display: none; }
.lf-select__option {
    width: 100%;
    min-height: 40px;
    padding: 0 34px 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #102A45;
    cursor: pointer;
    display: flex;
    align-items: center;
    text-align: left;
    font: 700 15px/1.2 var(--lf-font);
    letter-spacing: -0.01em;
    position: relative;
    transition: background 0.14s ease, color 0.14s ease;
}
.lf-select__option:hover { background: #EEF6FF; color: var(--lf-blue-hover); }
.lf-select__option.is-selected { background: var(--lf-blue); color: #FFFFFF; }
.lf-select__option.is-selected::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 7px;
    height: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-62%) rotate(45deg);
}

.lf-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.lf-actions { margin-top: 8px; display: grid; gap: 14px; }
.lf-actions--row { display: flex; gap: 14px; }

.lf-btn {
    height: 60px;
    border: 0;
    border-radius: 12px;
    font-family: var(--lf-font);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: background 120ms, transform 120ms, box-shadow 120ms;
}
.lf-btn:active:not(:disabled) { transform: scale(0.98); }
.lf-btn:disabled { cursor: not-allowed; box-shadow: none; }

.lf-btn--primary { width: 100%; background: var(--lf-blue); box-shadow: 0 10px 30px rgba(15, 122, 222, 0.22); }
.lf-btn--primary:hover:not(:disabled) { background: var(--lf-blue-hover); }
.lf-btn--primary:disabled { background: #93C4F1; }

.lf-btn--submit { flex: 1; min-width: 0; background: var(--lf-blue); box-shadow: 0 10px 30px rgba(15, 122, 222, 0.22); }
.lf-btn--submit:hover:not(:disabled) { background: var(--lf-blue-hover); }
.lf-btn--submit:disabled { background: #93C4F1; }
.lf-btn--submit.is-loading { cursor: progress; }

.lf-btn--ghost {
    flex: none;
    width: 60px;
    padding: 0;
    border: 1px solid var(--lf-border);
    background: #FFFFFF;
    color: var(--lf-ink);
}
.lf-btn--ghost:hover { background: #F5F5F7; }

.lf-error {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #FDECEF;
    color: #B3304E;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.lf-error[hidden] { display: none; }

.lf-done { min-height: 456px; display: grid; gap: 12px; align-content: center; justify-items: start; }
.lf-done[hidden] { display: none; }
.lf-done__icon { width: 56px; height: 56px; border-radius: 999px; background: #D8EFDF; color: #23AA58; display: flex; align-items: center; justify-content: center; }
.lf-done__title { margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--lf-ink); }
.lf-done__text { font-size: 18px; line-height: 1.5; letter-spacing: -0.02em; color: var(--lf-ink-60); text-wrap: pretty; }

.lf-field-error { margin-top: -2px; font-size: 13px; font-weight: 600; color: var(--lf-red); }
.lf-select.is-invalid .lf-select__button { border-color: var(--lf-red); }

/* Card do form fora da LP enxuta (/landing-page e modal) */
.lf-card {
    width: 100%;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 32px 72px rgba(6, 62, 119, 0.22);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    font-family: var(--lf-font);
    color: var(--lf-ink);
    text-align: left;
}

/* Mesma escala do desktop da LP enxuta (desenhada em 125%) */
@media (min-width: 641px) {
    .lf-compact { zoom: 0.8; }
}

@media (max-width: 640px) {
    .lf-card { padding: 22px 18px; gap: 22px; border-radius: 16px; }
    .lf-input, .lf-select__button { height: 52px; font-size: 16px; }
    .lf-btn { height: 56px; font-size: 18px; }
    .lf-btn--ghost { width: 56px; }
    .lf-grid-2 { grid-template-columns: 1fr; }
    .lf-done { min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
    .lf-progress__bar { transition: none; }
}

.lf-hint { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: var(--lf-ink-60); }
.lf-input[type="date"] { color: var(--lf-ink); cursor: pointer; }
.lf-input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.5; cursor: pointer; }

/* Campos com display próprio (grid/flex) também somem com o atributo hidden */
.lf-form [hidden] { display: none !important; }
