/* Pantalla «Mi flyer» (doc/1-pantallas-desarrolladas/ESPECIFICACION-PANTALLAS.md, 4.4). Todo colgado de .v-flyer para no pisar otras pantallas. */
.v-flyer{display:flex;flex-direction:column;gap:20px;height:100%;min-height:0}
.v-flyer .encabezado{margin:0;flex:none}
.v-flyer .cuerpo{flex:1;min-height:0;display:flex;gap:20px}

/* Formulario de 520 px */
.v-flyer .formulario{flex:none;width:520px;display:flex;flex-direction:column;gap:13px;padding:22px 26px;overflow:auto}
.v-flyer .formulario label{margin:0 0 6px}
.v-flyer .campo{min-width:0}
.v-flyer .campo .error-campo{margin:6px 0 0}
.v-flyer #fl-desc{resize:none;line-height:1.5}
.v-flyer .par{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 14px;align-items:start}
.v-flyer fieldset{border:0;margin:0;padding:0}
.v-flyer legend{padding:0;margin:0 0 6px;font-family:var(--cp-font-head);font-weight:700;font-size:14px;color:var(--cp-text-2)}

/* Botón violeta «Pedir el texto a la IA» */
.v-flyer .ia{gap:6px;padding:0 14px;border:1.5px dashed #6D28D9;background:#F6F1FE;color:#4C1D95}
.v-flyer .ia:hover{background:#EDE3FD;color:#4C1D95}
.v-flyer .ia svg{flex:none;color:#6D28D9}
.v-flyer .ia:disabled{background:#F6F1FE;color:#4C1D95;border-color:#6D28D9;opacity:.7;cursor:wait}

/* Formato segmentado */
.v-flyer .segmentado{display:flex;height:46px;border:1.5px solid var(--cp-navy);border-radius:var(--cp-radius-input);overflow:hidden}
.v-flyer .segmentado button{flex:1;min-height:0;padding:0 6px;border-radius:0;background:#fff;color:var(--cp-navy);font-size:13px}
.v-flyer .segmentado button:hover{background:var(--cp-soft-blue);color:var(--cp-navy-dark)}
.v-flyer .segmentado button[aria-pressed=true]{background:var(--cp-navy);color:#fff}

/* Foto propia */
.v-flyer .foto{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid var(--cp-border);border-radius:var(--cp-radius-box)}
.v-flyer .foto-icono{flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:10px;background:var(--cp-soft-blue);color:var(--cp-navy)}
.v-flyer .foto-texto{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;font-size:13px;color:var(--cp-muted)}
.v-flyer .foto-texto strong{font-size:14px;color:var(--cp-navy);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v-flyer .foto button{min-height:44px;padding:0 16px;font-size:13px}

/* Descargar y publicar, abajo */
.v-flyer .acciones{margin-top:auto;display:flex;flex-direction:column;gap:10px}
.v-flyer .acciones .aviso{font-size:14px;font-weight:700;padding:12px 14px}
.v-flyer .acciones .botones{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}
.v-flyer .acciones .botones button{padding:0 10px;min-width:0}
.v-flyer .acciones .exito{grid-column:1/-1}   /* «Esto quiero publicar», abajo y a todo el ancho */

/* Vista previa: el flyer centrado y a la mayor medida que entre */
.v-flyer .vista-previa{flex:1;min-width:0;display:flex;flex-direction:column;gap:12px;padding:20px;border-radius:var(--cp-radius-card);background:#E3E7EE}
.v-flyer .lienzo-caja{position:relative;flex:1;min-height:0}
.v-flyer canvas{position:absolute;inset:0;margin:auto;max-width:100%;max-height:100%;border-radius:16px;box-shadow:0 16px 40px rgba(20,40,80,.25)}
.v-flyer .medidas{flex:none;text-align:center;font-size:13px;font-weight:700;color:var(--cp-off-fg)}

@media (max-width:900px){
  .v-flyer{height:auto}
  .v-flyer .cuerpo{flex-direction:column}
  .v-flyer .formulario{width:auto;overflow:visible;padding:20px 16px}
  .v-flyer .par{grid-template-columns:minmax(0,1fr)}
  .v-flyer .lienzo-caja{flex:none}
  /* En el celular el flyer va primero (es lo que se quiere ver) y más chico; el formulario sigue abajo */
  .v-flyer .lienzo-caja{order:-1}
  .v-flyer canvas{position:static;display:block;margin:0 auto;width:100%;max-width:320px;height:auto;max-height:none}
  .v-flyer .foto-texto strong{white-space:normal}
}

/* Perfil incompleto (no se puede armar) y flyer anterior cargado para modificar */
.v-flyer .fl-bloqueo{justify-content:space-between;margin-bottom:12px}
.v-flyer .fl-bloqueo .boton{flex:none}
.v-flyer .fl-anterior{margin:0 0 10px;padding:8px 12px;font-size:13px;line-height:1.4;max-width:100%}
.v-flyer.bloqueada .formulario{opacity:.55}

/* Fondo: paleta y degradados */
.v-flyer .fondo .segmentado button{flex:1}
.v-flyer .muestras{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.v-flyer .muestra-color{width:36px;height:36px;min-height:36px;padding:0;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px var(--cp-border)}
.v-flyer .muestra-color[aria-pressed=true]{box-shadow:0 0 0 3px var(--cp-yellow)}
.v-flyer .propios{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.v-flyer .propio{display:inline-flex;align-items:center;gap:8px;margin:0;padding:4px 12px 4px 4px;min-height:44px;border:1px solid var(--cp-border-input);border-radius:var(--cp-radius-pill);font-weight:600;font-size:13px;cursor:pointer}
.v-flyer .propio input[type=color]{width:34px;height:34px;min-height:34px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer}

/* Con un flyer publicado: primero se ve, y «Editar este flyer» abre el formulario con sus datos */
.v-flyer .fl-modo{flex-direction:column;gap:12px}
.v-flyer .fl-modo h2{margin:0}
.v-flyer .fl-modo p{margin:0}
.v-flyer.modo-ver .formulario>*:not(.fl-modo){display:none!important}
.v-flyer.modo-ver .fl-modo:not([hidden]){display:flex}
