/* Criador de influenciador (formato do "AI Influencer" do Higgsfield): lista à esquerda, prévia no meio,
   painel de escolhas à direita com fotos, amostras de cor e íris desenhadas. */
#aba-influencer.ativa { display: grid; grid-template-columns: 170px minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
#aba-influencer { --if-caixa: var(--fundo-2); --if-borda: var(--linha); --if-sel: var(--acento); }

/* ---------- lista ---------- */
.if-lista { position: sticky; top: 84px; display: grid; gap: 10px; padding: 10px; border: 1px solid var(--if-borda); border-radius: 18px; background: var(--if-caixa); max-height: calc(100vh - 110px); overflow: auto; }
.if-item { position: relative; border: 2px solid transparent; border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4; padding: 0; cursor: pointer; background: var(--fundo-3); color: var(--texto); }
.if-item.ativo { border-color: var(--if-sel); }
.if-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.if-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / 75%)); text-align: left; }
.if-novo { display: grid; place-items: center; align-content: center; gap: 8px; background: linear-gradient(160deg, var(--fundo-3), var(--fundo-2)); font-weight: 800; font-size: 13px; }
.if-novo i { font-style: normal; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgb(255 255 255 / 10%); font-size: 18px; }

/* ---------- prévia ---------- */
.if-centro { display: grid; justify-items: center; gap: 14px; padding-top: 4px; }
.if-previa { position: relative; width: min(100%, 380px); aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; background: var(--if-caixa); border: 1px solid var(--if-borda); display: grid; place-items: center; text-align: center; color: var(--texto-2); }
.if-previa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.if-previa .if-vazio { display: grid; gap: 12px; justify-items: center; padding: 30px; font-size: 14px; line-height: 1.45; }
.if-previa .if-vazio i { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--if-borda); display: grid; place-items: center; font-style: normal; }
.if-previa .if-gerando { display: grid; gap: 10px; justify-items: center; }
.if-previa .if-gerando b { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--if-borda); border-top-color: var(--if-sel); animation: if-gira 0.9s linear infinite; }
@keyframes if-gira { to { transform: rotate(360deg); } }
.if-acoes { width: min(100%, 380px); display: grid; gap: 8px; }
.if-gerar { width: 100%; border: 0; cursor: pointer; border-radius: 14px; padding: 15px; font-weight: 900; font-size: 16px; background: var(--if-sel); color: var(--acento-txt, #fff); display: flex; gap: 8px; align-items: center; justify-content: center; }
.if-gerar:disabled { opacity: 0.55; cursor: default; }
.if-linha { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.if-linha input { min-width: 0; }
.if-secundario { border: 1px solid var(--if-borda); background: var(--if-caixa); color: var(--texto); border-radius: 12px; padding: 11px 14px; font-weight: 800; cursor: pointer; }
.if-msg { font-size: 13px; color: var(--texto-2); text-align: center; min-height: 1em; margin: 0; }
.if-msg.erro { color: var(--erro); }
.if-msg.ok { color: var(--ok); }
.if-aviso { font-size: 12px; color: var(--texto-2); text-align: center; max-width: 380px; margin: 0; }

/* ---------- painel de escolhas ---------- */
.if-painel { border: 1px solid var(--if-borda); border-radius: 18px; background: var(--if-caixa); padding: 6px 14px 16px; max-height: calc(100vh - 110px); overflow: auto; position: sticky; top: 84px; }
.if-secao { border-bottom: 1px solid var(--if-borda); padding: 12px 0; }
.if-secao:last-child { border-bottom: 0; }
.if-secao > button.if-titulo { width: 100%; border: 0; background: none; color: var(--texto-2); display: flex; justify-content: space-between; align-items: center; padding: 2px 0 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.if-secao > button.if-titulo::after { content: "⌃"; transition: transform 0.2s; }
.if-secao.fechada > button.if-titulo::after { transform: rotate(180deg); }
.if-secao.fechada .if-grade { display: none; }
.if-grade { display: grid; gap: 8px; }
.if-g2 { grid-template-columns: 1fr 1fr; }
.if-g3 { grid-template-columns: repeat(3, 1fr); }
.if-g5 { grid-template-columns: repeat(5, 1fr); }
.if-op { position: relative; border: 2px solid transparent; background: var(--fundo-3); color: var(--texto); border-radius: 12px; padding: 12px 8px; font-weight: 700; font-size: 13px; cursor: pointer; text-align: center; }
.if-op.ativo { border-color: var(--if-sel); background: color-mix(in srgb, var(--if-sel) 12%, var(--fundo-3)); }
.if-op.foto { padding: 0; aspect-ratio: 1; overflow: hidden; }
.if-op.foto img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.if-op.foto span, .if-op.olho span { position: absolute; left: 6px; bottom: 5px; font-size: 11.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / 80%); text-align: left; }
.if-op.amostra { padding: 0; aspect-ratio: 1.15; }
.if-op.amostra.ativo::after, .if-op.foto.ativo::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--if-sel); color: #fff; font-size: 11px; display: grid; place-items: center; }
.if-op.genero { text-align: left; padding: 12px; min-height: 70px; display: flex; justify-content: space-between; align-items: flex-end; }
.if-op.genero small { font-size: 26px; line-height: 1; color: var(--texto-2); }
.if-op.olho { padding: 0; aspect-ratio: 1.15; overflow: hidden; background: radial-gradient(ellipse 70% 42% at 50% 50%, #f6efe9 0 60%, #e9c8b6 61% 100%); }
/* íris desenhada: cor de dentro, cor de fora, pupila e brilho */
.if-op.olho .iris { position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #050505 0 22%, var(--i1) 24%, var(--i2) 70%, #111 74% 100%); box-shadow: inset 0 0 6px rgb(0 0 0 / 50%); }
.if-op.olho .iris::after { content: ""; position: absolute; left: 30%; top: 24%; width: 18%; height: 18%; border-radius: 50%; background: rgb(255 255 255 / 85%); }
.if-op.olho::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(120 70 60 / 45%) 0 18%, transparent 30% 72%, rgb(120 70 60 / 35%) 84%); z-index: 1; pointer-events: none; }
.if-op.chip { padding: 8px 6px; font-size: 12.5px; }
.if-op.chip small { display: block; font-size: 11px; color: var(--texto-2); font-weight: 600; }
.if-detalhes { width: 100%; min-height: 70px; resize: vertical; font: inherit; font-size: 13px; color: var(--texto); background: var(--fundo-3); border: 1px solid var(--if-borda); border-radius: 12px; padding: 10px; }

@media (max-width: 1100px) {
  #aba-influencer.ativa { grid-template-columns: minmax(0, 1fr) 360px; }
  .if-lista { grid-column: 1 / -1; position: static; display: flex; overflow-x: auto; max-height: none; }
  .if-lista .if-item { flex: 0 0 110px; }
}
@media (max-width: 760px) {
  #aba-influencer.ativa { grid-template-columns: 1fr; }
  .if-painel { position: static; max-height: none; }
}
@media (prefers-reduced-motion: reduce) { .if-previa .if-gerando b { animation: none; } }
