/* Viventa — Formulario de asesoría (lead) · v1.0
   Todas las clases van prefijadas con .vvlf- para no chocar con el sitio. */

/* Integración en el tema Viventa.Theme.Comercial:
   - LT Wave 700 ya la declara chrome.css (mismo archivo), así que aquí no se repite.
   - PP Pangram Sans 400 (Light) NO existe en el sitio: declararla con el nombre
     "PP Pangram Sans" pasaría a Light todo el texto 400 del sitio (hoy se pinta en
     Medium). Por eso el formulario usa una familia propia, "VVLF Pangram Sans",
     con la Light en 400 y los mismos archivos Medium/Semibold del tema en 500/600
     (misma URL: el navegador los descarga una sola vez). */
@font-face { font-family: "VVLF Pangram Sans"; font-weight: 400; src: url("fonts/PPPangramSans-Light.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "VVLF Pangram Sans"; font-weight: 500; src: url("fonts/PPPangramSans-Medium.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "VVLF Pangram Sans"; font-weight: 600; src: url("fonts/PPPangramSans-Semibold.otf") format("opentype"); font-display: swap; }

.vvlf {
  --pink: #E60D6F; --pink-hover: #C70A60; --pink-50: #FFEDF4; --pink-sub: #B4517E; --pink-disabled: #E9A0C0;
  --navy: #2A2D52; --muted: #7A7C90; --muted-2: #5C5E73; --border: #ECECF1; --border-input: #E4E4EA; --border-strong: #C7C8D2;
  --field: #FCFCFD; --bg-alt: #F7F7FA; --ok: #00A98C; --ok-bg: #E9FBF3;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  font-family: "VVLF Pangram Sans", system-ui, sans-serif; color: var(--navy);
  display: flex; flex-direction: column; min-height: 440px; margin: 0; box-sizing: border-box;
}
.vvlf *, .vvlf *::before, .vvlf *::after { box-sizing: border-box; }
.vvlf a { color: var(--pink); font-weight: 600; }
.vvlf a:hover { color: var(--pink-hover); }

/* header */
.vvlf-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; min-height: 28px; }
.vvlf-step { font-weight: 600; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); white-space: nowrap; }
.vvlf-back { display: flex; align-items: center; gap: 6px; font: 600 13.5px/1 "VVLF Pangram Sans", system-ui; color: var(--muted); background: none; border: 0; padding: 6px 0; cursor: pointer; }
.vvlf-back:hover { color: var(--navy); }
.vvlf-bar { height: 5px; background: var(--border); border-radius: 999px; overflow: hidden; margin-bottom: 30px; }
.vvlf-bar > span { display: block; height: 100%; background: var(--pink); border-radius: 999px; transition: width 320ms var(--ease); }
.vvlf-q { font-family: "LT Wave", system-ui; font-weight: 700; font-size: 30px; line-height: 1.1; letter-spacing: -.028em; color: var(--navy); margin: 0 0 10px; text-wrap: balance; }
.vvlf-hint { font-size: 15px; color: var(--muted); line-height: 1.55; margin: 0 0 24px; text-wrap: pretty; }
.vvlf-nohint { height: 14px; }

/* fields */
.vvlf-stack { display: flex; flex-direction: column; gap: 12px; }
.vvlf-row { display: flex; gap: 10px; }
.vvlf-input, .vvlf-select {
  width: 100%; border: 1px solid var(--border-input); border-radius: 14px; padding: 17px 20px;
  font: 400 16px/1.2 "VVLF Pangram Sans", system-ui; color: var(--navy); background: var(--field); outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.vvlf-input::placeholder { color: #A8AAB8; }
.vvlf-input:focus, .vvlf-select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(230,13,111,.18); }
.vvlf-select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 48px;
  background: var(--field) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232A2D52' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 20px center; }
.vvlf-select.is-empty { color: #A8AAB8; }
.vvlf-dial { flex: 0 0 112px; padding-left: 14px; padding-right: 30px; background-position: right 12px center; }
.vvlf-row .vvlf-input { flex: 1; min-width: 0; }
.vvlf-sep { height: 1px; background: var(--border); margin: 6px 0 2px; }

/* checkboxes */
.vvlf-checks { display: flex; flex-direction: column; gap: 8px; }
.vvlf-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 4px 0; font-size: 13.5px; color: var(--muted-2); line-height: 1.5; }
.vvlf-check input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; flex-shrink: 0; border: 1.5px solid var(--border-strong); border-radius: 7px; background: #fff; cursor: pointer; display: grid; place-content: center; transition: background 120ms, border-color 120ms; }
.vvlf-check input::after { content: ""; width: 12px; height: 12px; opacity: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 13l4 4L19 7'/></svg>") center/contain no-repeat; }
.vvlf-check input:checked { background: var(--pink); border-color: var(--pink); }
.vvlf-check input:checked::after { opacity: 1; }
.vvlf-check input:focus-visible { box-shadow: 0 0 0 3px rgba(230,13,111,.35); }
.vvlf-check.is-invalid input { border-color: var(--pink); }
.vvlf-req { color: var(--pink); }
.vvlf-err { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--pink-hover); line-height: 1.45; }

/* options */
.vvlf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vvlf-grid.is-wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.vvlf-opt { text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 16px; padding: 15.5px 18.5px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; font-family: inherit; transition: border-color 120ms; }
.vvlf-opt:hover { border-color: var(--navy); }
.vvlf-opt:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(230,13,111,.35); }
.vvlf-opt-l { font-weight: 600; font-size: 15px; color: var(--navy); }
.vvlf-opt-s { font-size: 13px; color: var(--muted); line-height: 1.45; }
.vvlf-opt[aria-pressed="true"] { border: 1.5px solid var(--pink); background: var(--pink-50); padding: 15px 18px; }
.vvlf-opt[aria-pressed="true"] .vvlf-opt-l { color: var(--pink); }
.vvlf-opt[aria-pressed="true"] .vvlf-opt-s { color: var(--pink-sub); }
.vvlf-other { margin-top: 14px; }
.vvlf-last { font-size: 13px; color: var(--muted); margin: 18px 0 12px; line-height: 1.5; }

/* CTA */
.vvlf-cta { border: 0; border-radius: 999px; background: var(--pink); color: #fff; font: 600 16px/1 "VVLF Pangram Sans", system-ui; padding: 18px 30px; cursor: pointer;
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 2px; transition: background 120ms; }
.vvlf-cta:hover { background: var(--pink-hover); }
.vvlf-cta:disabled { background: var(--pink-disabled); cursor: not-allowed; }
.vvlf-cta:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(230,13,111,.35); }

/* states */
.vvlf-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; color: var(--muted); font-size: 15px; }
.vvlf-spin { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--pink-50); border-top-color: var(--pink); animation: vvlf-spin 800ms linear infinite; }
@keyframes vvlf-spin { to { transform: rotate(360deg); } }
.vvlf-okicon { width: 60px; height: 60px; border-radius: 50%; background: var(--ok-bg); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.vvlf-done p { font-size: 15.5px; color: var(--muted); line-height: 1.55; margin: 0 0 22px; }
.vvlf-sum { background: var(--bg-alt); border-radius: 16px; padding: 6px 18px; }
.vvlf-sum > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.vvlf-sum > div:last-child { border-bottom: 0; }
.vvlf-sum dt { color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.vvlf-sum dd { margin: 0; font-weight: 600; color: var(--navy); text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* modal */
.vvlf-backdrop { position: fixed; inset: 0; z-index: 9999; background: rgba(15,18,38,.68); display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; animation: vvlf-fade 200ms var(--ease, ease); }
.vvlf-sheet { position: relative; width: 520px; max-width: 100%; margin: auto; background: #fff; border-radius: 32px; padding: 72px 44px 44px; box-shadow: 0 40px 100px rgba(15,18,38,.35); }
.vvlf-close { position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #F7F7FA; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vvlf-close:hover { background: #ECECF1; }
.vvlf-handle { display: none; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 44px; height: 5px; border-radius: 999px; background: #E4E4EA; }
@keyframes vvlf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vvlf-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
html.vvlf-lock, html.vvlf-lock body { overflow: hidden; }

/* mobile */
@media (max-width: 600px) {
  .vvlf { min-height: 0; }
  .vvlf-bar { margin-bottom: 22px; }
  .vvlf-q { font-size: 24px; line-height: 1.15; }
  .vvlf-hint { font-size: 14px; margin-bottom: 18px; }
  .vvlf-grid { grid-template-columns: 1fr 1fr; }
  .vvlf-grid.is-wide { grid-template-columns: 1fr; }
  .vvlf-opt { min-height: 52px; justify-content: center; padding: 14px 16px; }
  .vvlf-opt[aria-pressed="true"] { padding: 13.5px 15.5px; }
  .vvlf-cta { position: sticky; bottom: 0; box-shadow: 0 -14px 18px 6px #fff; }
  .vvlf-backdrop { padding: 0; align-items: flex-end; }
  .vvlf-sheet { width: 100%; margin: 0; border-radius: 24px 24px 0 0; padding: 68px 20px calc(24px + env(safe-area-inset-bottom));
    max-height: 94dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; animation: vvlf-up 320ms cubic-bezier(.22,.61,.36,1); }
  .vvlf-handle { display: block; }
  .vvlf-close { top: 16px; right: 14px; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .vvlf-sheet, .vvlf-backdrop, .vvlf-bar > span { animation: none !important; transition: none !important; }
}

/* Integración en el tema: aislamiento frente al reset global de Theme.css
   (`*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }`) y
   del line-height/color que hereda del <body>. Sin esto la hoja quedaba en
   border-box y el contenido se estrechaba de 520 a 432 px, y todo el texto sin
   line-height propio tomaba los 24px del sitio. Devuelve los valores con los que
   se diseñó el formulario (demo de la entrega). */
.vvlf-backdrop { line-height: normal; color: #2A2D52; }
.vvlf-sheet { box-sizing: content-box; }
.vvlf-close { padding: 1px 6px; }
