/* Demo "form-fill" (/formularios). Base: fl-phone.css.
   data-state: start | name | phone | radio | file | sent (cada uno conserva lo anterior) */

.lla-fm { --lla-brand: #0d9488; --lla-cursor-ring: rgba(13, 148, 136, .55); }

.lla-fm__chip--types { left: 6px; top: 110px; }
.lla-fm__chip--types .bi { color: #0d9488; }
.lla-fm__chip--brand { left: 20px; top: 440px; animation-delay: -2.5s; }
.lla-fm__chip--brand .bi { color: #db2777; }

.lla-fm__notify { left: 320px; top: 70px; width: 235px; }
.lla-fm[data-state="sent"] .lla-fm__notify { opacity: 1; transform: none; }

/* Encabezado con la marca del negocio */
.lla-fm__head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--lla-brand); color: #fff; font-size: 12px; }
.lla-fm__logo { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: #fff; color: var(--lla-brand); font-weight: 800; font-size: 11px; }

.lla-fm__body { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; }
.lla-fm__title { font-size: 14px !important; font-weight: 800; }
.lla-fm__sub { color: var(--lla-muted); font-size: 10px; margin-bottom: 4px !important; }
.lla-fm__label { margin: 4px 0 0; font-size: 10.5px; font-weight: 600; }
.lla-fm__label i { color: #dc2626; }

.lla-fm__input {
  display: flex; align-items: center; height: 28px; padding: 0 9px; border: 1px solid var(--lla-border); border-radius: 8px;
  font-size: 11px; transition: border-color .3s var(--lla-ease), box-shadow .3s var(--lla-ease);
}
/* "Escribir": el texto se descubre de izquierda a derecha */
.lla-fm__type { display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .9s steps(12, end); }
.lla-fm:not([data-state="start"]) .lla-fm__input--name .lla-fm__type,
.lla-fm:is([data-state="phone"], [data-state="radio"], [data-state="file"], [data-state="sent"]) .lla-fm__input--phone .lla-fm__type { max-width: 200px; }
.lla-fm[data-state="name"] .lla-fm__input--name,
.lla-fm[data-state="phone"] .lla-fm__input--phone { border-color: var(--lla-brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, .15); }

.lla-fm__radio { display: flex; align-items: center; gap: 7px; font-size: 10.5px; }
.lla-fm__radio i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--lla-border); transition: border .25s var(--lla-ease); }
.lla-fm:is([data-state="radio"], [data-state="file"], [data-state="sent"]) .lla-fm__radio--a i { border: 4px solid var(--lla-brand); }

.lla-fm__file { display: grid; }
.lla-fm__file > span { grid-area: 1 / 1; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 10.5px; transition: opacity .3s var(--lla-ease); }
.lla-fm__file-btn { border: 1.5px dashed var(--lla-border); color: var(--lla-muted); justify-content: center; }
.lla-fm__file-val { background: #fef2f2; color: #991b1b; font-weight: 600; opacity: 0; }
.lla-fm__file-val .bi { color: #dc2626; }
.lla-fm:is([data-state="file"], [data-state="sent"]) .lla-fm__file-btn { opacity: 0; }
.lla-fm:is([data-state="file"], [data-state="sent"]) .lla-fm__file-val { opacity: 1; }

.lla-fm__send { margin-top: 8px; }

/* Pantalla de gracias */
.lla-fm__thanks {
  position: absolute; inset: 70px 0 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--lla-bg); text-align: center; opacity: 0; pointer-events: none; transition: opacity .4s var(--lla-ease);
}
.lla-fm__thanks b { font-size: 16px; font-weight: 800; }
.lla-fm__thanks small { color: var(--lla-muted); font-size: 11px; }
.lla-fm__check { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--lla-brand); color: #fff; font-size: 24px; }
.lla-fm[data-state="sent"] .lla-fm__thanks { opacity: 1; }
.lla-fm[data-state="sent"] .lla-fm__check { animation: lla-fl-pop .5s var(--lla-ease); }

@media (prefers-reduced-motion: reduce) {
  .lla-fm__type, .lla-fm__file > span, .lla-fm__thanks { transition: none; }
}
