/* KickOff 2027 - Caca-Termos e Quebra-Cabeca do HERA Z20 (public/jogos-palavras.js) */

/* ---------- Caca-Termos ---------- */
.ws-wrap { display: grid; gap: 14px; }
.ws-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ws-grid {
  display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px;
  width: 100%; max-width: 460px; align-self: center;
  padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.ws-cell {
  aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--text); cursor: pointer;
  font-family: var(--mono); font-weight: 700; font-size: clamp(13px, 3.9vw, 18px); line-height: 1;
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.ws-cell.found { background: var(--blue-tint); color: var(--cyan); }
.ws-cell.sel { background: var(--orange); color: var(--bg); }
.ws-cell.start { border-color: var(--orange); }
.ws-cell.miss { border-color: var(--orange); border-style: dashed; color: var(--orange); }
.ws-cell.egg { background: var(--ok-tint); color: var(--ok); }
.ws-cell:focus-visible { outline-offset: -2px; }

.ws-clues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ws-clue {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.ws-word { grid-column: 1; font-size: 13px; letter-spacing: 0.22em; color: var(--text); }
.ws-word small { margin-left: 6px; letter-spacing: 0.04em; color: var(--muted); font-size: 11px; text-transform: none; }
.ws-dica { grid-column: 1; font-size: 13px; color: var(--muted); line-height: 1.4; }
.ws-peek {
  grid-column: 2; grid-row: 1 / span 2; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted); font: 600 12px var(--sans); cursor: pointer; white-space: nowrap;
}
.ws-peek:hover { border-color: var(--cyan); color: var(--text); }
.ws-clue.ok { border-color: var(--cyan); background: var(--blue-tint); }
.ws-clue.ok .ws-word { color: var(--cyan); letter-spacing: 0.02em; font-family: var(--sans); font-size: 15px; font-weight: 800; text-transform: none; }
.ws-clue.shown:not(.ok) .ws-word { color: var(--orange); }
@media (min-width: 760px) {
  .ws-wrap { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); align-items: start; }
}

/* easter egg: cartao que aparece ao achar um codigo de produto */
.egg-card {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  border: 1px solid var(--ok); border-radius: var(--radius); background: var(--ok-tint);
}
.egg-card .mono { color: var(--ok); }
.egg-card h3 { font-size: 17px; }
.egg-card p { font-size: 14px; }

/* ---------- Quebra-Cabeca ---------- */
.pz-board {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px;
  width: 100%; max-width: 440px; justify-self: center; aspect-ratio: 4 / 5;
  padding: 3px; background: var(--surface-2); border-radius: var(--radius); overflow: hidden;
  transition: gap 700ms cubic-bezier(0.16, 1, 0.3, 1), padding 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pz-tile {
  min-width: 0; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
  background-image: var(--pz-img); background-size: 400% 500%; background-color: #E9EDF1;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1), border-radius 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pz-tile:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(11, 12, 14, 0.18); }
.pz-tile.sel { transform: scale(0.92); box-shadow: 0 0 0 3px var(--orange); }
.pz-tile:disabled { cursor: default; }
.pz-tile.ok { box-shadow: inset 0 0 0 2px var(--blue); }
.pz-tile.snap { animation: pz-snap 420ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pz-snap { 0% { transform: scale(0.9); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
.pz-full {
  position: absolute; inset: 3px; border-radius: 12px; pointer-events: none;
  background: var(--pz-img) center / cover; opacity: 0; transition: opacity 260ms ease-out;
}
.pz-board.peek .pz-full { opacity: 1; }
.pz-board.peek .pz-tile { pointer-events: none; }
.pz-board.done { gap: 0; padding: 0; }
.pz-board.done .pz-tile { border-radius: 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .pz-board, .pz-tile, .pz-full, .ws-cell { transition: none; }
  .pz-tile.snap { animation: none; }
}
