/* ==================================================================
   GERADOR DE FOTOS — estilos da aba
   Carregado só em gerador.html, depois de styles.css. Usa as mesmas
   variáveis, a mesma tipografia e os mesmos acentos do site;
   nada aqui alcança as outras páginas.
================================================================== */

.gerador-passo[hidden] { display: none; }

.gerador-acoes { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.gerador-nota { max-width: 470px; margin: 26px 0 0; color: rgba(255, 255, 255, .62); font-size: 14px; line-height: 1.65; }

/* Botões extras: o site só tem amarelo e contorno. */
.button-green { color: white; background: var(--green); box-shadow: 0 16px 34px rgba(8, 122, 77, .22); }
.button-white { color: var(--green-dark); background: white; border-color: var(--line); }

/* ---------------- Trilha de etapas ---------------- */
.trilha { display: flex; align-items: center; gap: 14px; margin: 42px 0 0; padding: 0; list-style: none; }
.trilha__item { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .52); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.trilha__item + .trilha__item::before { content: ""; width: clamp(18px, 5vw, 56px); height: 1px; margin-right: 4px; background: rgba(255, 255, 255, .3); }
.trilha__item span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255, 255, 255, .34); border-radius: 50%; font-size: 12px; }
.trilha__item.is-ativo { color: white; }
.trilha__item.is-ativo span { color: var(--green-dark); background: var(--yellow); border-color: var(--yellow); }

/* ---------------- Passo 2: editor ----------------
   O topo generoso existe porque esta seção fica logo abaixo do
   cabeçalho fixo quando o passo muda. */
.editor { padding: clamp(130px, 14vw, 170px) 0 clamp(80px, 9vw, 120px); background: var(--paper); }
.editor__cabeca { margin-bottom: clamp(30px, 4vw, 48px); }
.editor__cabeca h2 { margin: 0; color: var(--green-dark); font-size: clamp(50px, 6.4vw, 86px); }

.editor__grade { display: grid; gap: clamp(26px, 4vw, 52px); align-items: start; }
.editor__coluna { display: grid; gap: 18px; }

.palco { padding: clamp(10px, 2vw, 16px); background: white; border-radius: 4px; box-shadow: var(--shadow); }
.palco__canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: min(62vh, 720px); margin: 0 auto; border-radius: 3px; background: var(--green-dark); touch-action: none; cursor: grab; }
.palco__canvas:active { cursor: grabbing; }

.palco__dica { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; color: var(--green-dark); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.palco__dica svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.zoom { display: grid; grid-template-columns: 76px 1fr 76px; gap: 12px; }
.zoom__botao, .zoom__centro { min-height: 58px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: white; color: var(--green-dark); font: inherit; font-weight: 900; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.zoom__botao { font-size: 22px; line-height: 1; }
.zoom__centro { font-size: 13px; letter-spacing: .14em; }
.zoom__botao:hover, .zoom__centro:hover { border-color: var(--green); background: #e7eff5; }
.zoom__botao:active, .zoom__centro:active { transform: translateY(2px); }

.bloco { display: grid; gap: 14px; }
.bloco__cabeca { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bloco__titulo { margin: 0; color: var(--green-dark); font: 26px/1 "Anton", Impact, sans-serif; letter-spacing: .01em; text-transform: uppercase; }
.bloco__aviso { color: rgba(8, 44, 76, .45); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.bloco__aviso--ok { display: inline-flex; align-items: center; gap: 7px; color: var(--green); }
.bloco__aviso--ok svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

.formatos, .molduras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.molduras { grid-template-columns: repeat(4, 1fr); }

.formato { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px; border: 1px solid var(--line); border-radius: 3px; background: white; font: inherit; text-align: center; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.formato:hover { border-color: var(--green); transform: translateY(-3px); }
.formato.is-ativo { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(53, 223, 47, .5); }
.formato__icone { flex: none; width: 24px; border: 2px solid var(--green); border-radius: 2px; }
.formato__icone[data-proporcao="quadrado"] { height: 24px; }
.formato__icone[data-proporcao="feed"] { height: 30px; }
.formato__icone[data-proporcao="story"] { height: 36px; }
.formato__texto { display: grid; gap: 2px; justify-items: center; }
.formato__nome { color: var(--green-dark); font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.formato__medida { color: rgba(8, 44, 76, .46); font-size: 12px; font-weight: 600; white-space: nowrap; }

.moldura { position: relative; display: grid; gap: 10px; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: white; font: inherit; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.moldura:hover { border-color: var(--green); transform: translateY(-3px); }
.moldura.is-ativo { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(53, 223, 47, .5); }
.moldura canvas { display: block; width: 100%; height: auto; border-radius: 2px; background: var(--green-dark); }
.moldura__nome { color: var(--green-dark); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-align: center; }

.formato__check, .moldura__check { position: absolute; top: -9px; right: -9px; display: none; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--green-dark); background: var(--yellow); }
.formato__check svg, .moldura__check svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.formato.is-ativo .formato__check, .moldura.is-ativo .moldura__check { display: grid; }

.editor__rodape { display: grid; justify-items: center; gap: 6px; margin-top: 4px; }
.editor__rodape .button { width: 100%; min-height: 64px; font-size: 15px; }
.link-discreto { padding: 10px 0; border: 0; background: none; color: var(--green-dark); font: inherit; font-size: 14px; font-weight: 800; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; opacity: .7; }
.link-discreto:hover { opacity: 1; }

/* ---------------- Passo 3: resultado ---------------- */
.final { position: relative; padding: clamp(130px, 14vw, 170px) 0 clamp(80px, 9vw, 120px); overflow: hidden; color: white; background: linear-gradient(130deg, var(--green-dark), var(--green) 62%, #1a7ad8); }
.final__fundo { position: absolute; inset: 0; opacity: .14; background-image: linear-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .18) 1px, transparent 1px); background-size: 52px 52px; }
.final__grade { position: relative; z-index: 1; display: grid; gap: clamp(28px, 5vw, 62px); align-items: center; }
.final__arte { padding: 12px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 4px; background: rgba(255, 255, 255, .1); }
.final__arte img { display: block; width: 100%; max-height: min(64vh, 760px); margin: 0 auto; border-radius: 3px; object-fit: contain; }
.final__copy h2 { margin: 0 0 26px; font-size: clamp(50px, 6.4vw, 92px); }
.final__copy > p { max-width: 560px; margin: 0; color: rgba(255, 255, 255, .78); font-size: 18px; }
.final__links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 26px; }
.final__links .link-discreto { color: rgba(255, 255, 255, .84); }

/* ---------------- Aviso flutuante ---------------- */
.gerador-aviso { position: fixed; right: 20px; bottom: 20px; z-index: 500; max-width: 380px; padding: 16px 20px; color: white; background: var(--green-dark); border-left: 4px solid var(--yellow); border-radius: 3px; box-shadow: 0 20px 50px rgba(3, 30, 60, .34); font-size: 14px; font-weight: 700; line-height: 1.55; opacity: 0; transform: translateY(16px); transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.gerador-aviso.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------- Responsivo ---------------- */
@media (min-width: 960px) {
  .editor__grade { grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); }
  .editor__coluna--opcoes { position: sticky; top: 120px; gap: 28px; }
  .final__grade { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 959px) {
  .palco__canvas { max-height: 54vh; }

  /* Mesma ordem do fluxo no celular: formato, foto, ajuste, molduras */
  .editor__grade { display: flex; flex-direction: column; gap: 20px; }
  .editor__coluna { display: contents; }
  .bloco--formatos { order: 1; }
  .palco { order: 2; }
  .palco__dica { order: 3; }
  .zoom { order: 4; }
  .bloco--molduras { order: 5; }
  .editor__rodape { order: 6; margin-top: 8px; }
}

@media (max-width: 560px) {
  .gerador-acoes .button { width: 100%; }
  .molduras { grid-template-columns: repeat(2, 1fr); }
  .formato { padding: 13px 6px; }
  .formato__nome { font-size: 12px; }
  .formato__medida { font-size: 11px; }
  .formato__check, .moldura__check { top: -8px; right: -8px; width: 22px; height: 22px; }
  .zoom { grid-template-columns: 60px 1fr 60px; }
  .trilha { gap: 8px; }
  .trilha__item { font-size: 10px; letter-spacing: .1em; }
  .trilha__item + .trilha__item::before { width: 14px; }
  .gerador-aviso { right: 14px; left: 14px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .formato, .moldura, .zoom__botao, .zoom__centro { transition: none; }
}

/* ------------------------------------------------------------------
   Botões de <button> no passo 1
   O <button> não herda a fonte da página e ainda recebe o fundo cinza
   do sistema quando a regra não define um. O "Escolher da galeria"
   saía cinza-claro com o texto branco do .button-outline por cima, ou
   seja, invisível. Aqui ele vira um botão branco de tipografia preta.
------------------------------------------------------------------ */
.gerador-acoes button.button { font-family: inherit; cursor: pointer; }
.gerador-acoes .button-outline {
  color: #10151b;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 16px 34px rgba(4, 26, 58, .18);
}
.gerador-acoes .button-outline:hover { background: #eef3f7; }
