/* Gerador de logo — painel lateral compartilhado pelas páginas de marca (gerador.php + gerador.js).
   Usa os tokens da página: --bg, --bg-alt, --surface, --ink, --ink-2, --ink-3, --line, --line-2,
   --mono, --radius, --ease e, opcional, --acento. Botões e rótulos vêm das classes .btn e .rotulo da página. */

html.ger-aberto { overflow: hidden; }
.ger-fundo {
  position: fixed; inset: 0; z-index: 90; background: rgba(31, 26, 25, .36);
  opacity: 0; transition: opacity .35s;
}
.ger-fundo.on { opacity: 1; }
.ger {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91; width: min(1000px, 100vw);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--bg); box-shadow: -40px 0 90px -50px rgba(31, 26, 25, .6);
  transform: translateX(100%); transition: transform .42s var(--ease);
}
.ger.on { transform: none; }
.ger[hidden], .ger-fundo[hidden], .ger [hidden] { display: none !important; }

.ger__topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 16px 28px; border-bottom: 1px solid var(--line); }
.ger__topo h3 { margin-top: 4px; font-weight: 400; font-size: 22px; line-height: 1.25; }
.ger__fechar {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color .2s, transform .3s var(--ease);
}
.ger__fechar:hover { border-color: var(--ink); transform: rotate(90deg); }

.ger__corpo { display: grid; grid-template-columns: minmax(0, 1fr) 372px; min-height: 0; }
.ger__previa {
  --pad: 48px;
  position: relative; min-height: 0; margin: 20px 0 20px 20px;
  border-radius: var(--radius); overflow: hidden;
  background-color: #f6f2ef;
  background-image: conic-gradient(#ebe4e0 25%, transparent 0 50%, #ebe4e0 0 75%, transparent 0);
  background-size: 22px 22px;
  transition: background-color .3s;
}
.ger__previa--escura {
  background-color: #2b2321;
  background-image: conic-gradient(#362d2b 25%, transparent 0 50%, #362d2b 0 75%, transparent 0);
}
.ger__previa--cheia { background-color: var(--bg-alt); background-image: none; }
.ger__previa img { position: absolute; inset: var(--pad); width: calc(100% - 2 * var(--pad)); height: calc(100% - 2 * var(--pad)); object-fit: contain; }
.ger__previa--cheia img { filter: drop-shadow(0 22px 34px rgba(31, 26, 25, .18)); }
.ger__dim {
  position: absolute; left: 16px; bottom: 16px; padding: 6px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); color: var(--ink-2); letter-spacing: .08em; text-transform: none;
}

.ger__opcoes { overflow-y: auto; padding: 20px 28px 28px 24px; overscroll-behavior: contain; }
.ger__grupo { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.ger__grupo legend { display: flex; justify-content: space-between; width: 100%; padding: 0; margin-bottom: 10px; }
.ger__grupo legend output { color: var(--ink); }

.ger__logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ger__logo {
  display: grid; place-items: center; min-width: 0; aspect-ratio: 16 / 10; padding: 10px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--prev, var(--surface));
  transition: box-shadow .2s, transform .25s var(--ease);
}
.ger__logo img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.ger__logo:hover { transform: translateY(-1px); }
.ger__logo[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }

.ger__seg { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--bg-alt); }
.ger__seg button {
  flex: 1; min-width: 0; height: 34px; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--ink-2);
  transition: background-color .2s, color .2s;
}
.ger__seg button:hover { color: var(--ink); }
.ger__seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.ger__seg--props { border-radius: 16px; }
.ger__seg--props button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 46px; border-radius: 12px; }
.ger__seg--props small { font-size: 9.5px; font-weight: 500; letter-spacing: .02em; opacity: .7; }

.ger__cores { display: flex; flex-wrap: wrap; gap: 10px; }
.sw {
  position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--c); box-shadow: inset 0 0 0 1px rgba(31, 26, 25, .14);
  transition: box-shadow .2s, transform .25s var(--ease);
}
.sw:hover { transform: scale(1.08); }
.sw[aria-pressed="true"], .sw--livre.on { box-shadow: inset 0 0 0 1px rgba(31, 26, 25, .14), 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.sw--original { background: linear-gradient(135deg, var(--ink) 50%, var(--acento-2, var(--line-2)) 50%); }
.sw--transp {
  background-color: #fff;
  background-image: conic-gradient(#ddd5d1 25%, transparent 0 50%, #ddd5d1 0 75%, transparent 0);
  background-size: 10px 10px;
}
.sw--livre { display: block; background: conic-gradient(#e85d5d, #f2c94c, #6fcf97, #56ccf2, #9b51e0, #e85d5d); }
.sw--livre.on { background: var(--c); }
.sw--livre input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.ger__nota { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }

/* Digital × Impressão (só aparece quando a página define $ger_cmyk) */
.ger__usos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ger__uso {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0;
  padding: 13px 14px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface);
  text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.ger__uso:hover { border-color: var(--ink-3); }
.ger__uso strong { font-size: 16px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.ger__uso span { font-size: 12.5px; line-height: 1.35; color: var(--ink-3); }
.ger__uso em {
  position: absolute; top: 12px; right: 12px; font-style: normal;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--ink-3);
}
.ger__uso[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ger__uso[aria-pressed="true"] em { color: var(--ink); }

.ger__impressao { padding: 16px; border-radius: 14px; background: var(--bg-alt); }
.ger__impressao-txt { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ger__impressao-txt strong { color: var(--ink); font-weight: 600; }
.ger__cmyk { list-style: none; margin: 12px 0 0; padding: 0; }
.ger__cmyk li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.ger__cmyk li:first-child { border-top: 0; }
.ger__cmyk i { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(31, 26, 25, .18); }
.ger__cmyk span { flex: 1; min-width: 0; color: var(--ink-2); }
.ger__cmyk code { font-family: var(--mono); font-size: 12px; color: var(--ink); white-space: nowrap; }

.ger__range { width: 100%; accent-color: var(--acento, var(--ink)); }
.ger__tam { display: flex; flex-direction: column; gap: 10px; }
.ger__px { display: flex; align-items: center; gap: 8px; align-self: flex-start; }
.ger__px input {
  width: 120px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  font-family: var(--mono); font-size: 14px;
}
.ger__px span { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

.ger__rodape { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px 14px 28px; border-top: 1px solid var(--line); background: var(--surface); }
.ger__arquivo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.ger__acoes { display: flex; gap: 8px; flex: none; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

@media (max-width: 760px) {
  .ger__topo { padding: 12px 12px 12px 16px; }
  .ger__topo h3 { font-size: 19px; }
  .ger__corpo { grid-template-columns: 1fr; align-content: start; overflow-y: auto; overscroll-behavior: contain; }
  .ger__previa { --pad: 22px; position: sticky; top: 0; z-index: 1; height: 34vh; margin: 12px; box-shadow: 0 -12px 0 12px var(--bg); }
  .ger__opcoes { overflow: visible; padding: 8px 16px 24px; }
  .ger__rodape { padding: 12px 16px; }
  .ger__arquivo { display: none; }
  .ger__acoes { flex: 1; }
  .ger__acoes .btn { flex: 1; }
}
