/*
 * Entrada de /jogos (inc/jogos-entrada.php): link do cabecalho e card da home.
 * So carrega quando o plugin shoptheo-jogos esta ativo e a pagina aberta
 * (ou para administrador). Sem JS. Animacao so em transform.
 */

/* ---------- Cabecalho ---------- */
.games-link {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  color: var(--ink);
  background: #fff6ea;
  box-shadow: inset 0 0 0 1px #efd9bd;
  font-size: .68rem;
  line-height: 1.2;
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.games-link:hover,
.games-link:focus-visible {
  box-shadow: inset 0 0 0 2px var(--orange);
  transform: translateY(-1px);
}
.games-link:focus-visible { outline: 3px solid rgba(226, 77, 0, .28); outline-offset: 2px; }
.games-link__selo { display: block; width: 40px; height: 40px; flex: 0 0 40px; transition: transform 240ms ease; }
.games-link:hover .games-link__selo { transform: rotate(-8deg) scale(1.06); }
.games-link__moeda { display: none; }
.games-link__texto { font-weight: 800; white-space: nowrap; }
.games-link__texto small { display: block; color: var(--orange-dark, #b83a00); font-weight: 800; }

@media (max-width: 780px) {
  .games-link {
    display: grid;
    width: 40px;
    height: 40px;
    min-height: 40px;
    flex: 0 0 40px;
    order: 2;
    place-items: center;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .games-link:hover, .games-link:focus-visible { box-shadow: none; transform: none; }
  .games-link__selo { display: none; }
  .games-link__moeda { display: block; width: 24px; height: 24px; }
  .games-link__texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* A Area do Cliente empurrava o grupo da direita com margin-left:auto; agora quem empurra e o link dos jogos. */
  .games-link { margin-left: auto; }
  .games-link + .account-link { margin-left: 0; }
}

@media (max-width: 420px) {
  .games-link { width: 36px; height: 36px; min-height: 36px; flex-basis: 36px; }
  .games-link__moeda { width: 22px; height: 22px; }
}

/* ---------- Card da home ---------- */
.home-jogos { padding-block: clamp(20px, 3.2vw, 36px); }
.home-jogos__card {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  min-height: 150px;
  border: 1px solid #efd9bd;
  border-radius: 16px;
  padding: 0 clamp(16px, 3vw, 40px) 0 clamp(12px, 2vw, 28px);
  background: linear-gradient(110deg, #fff8f1 0%, #fde7cc 100%);
  box-shadow: 0 6px 20px rgba(184, 58, 0, .12);
}
.home-jogos__theo { align-self: end; display: block; width: auto; height: 150px; margin-top: 12px; }
.home-jogos__texto h2 { margin: 0 0 6px; color: var(--ink); font-size: clamp(1.2rem, 2.2vw, 1.7rem); line-height: 1.15; letter-spacing: -.02em; }
.home-jogos__nowrap { white-space: nowrap; }
.home-jogos__texto p { margin: 0; color: #4b525c; font-size: .9rem; line-height: 1.45; }
.home-jogos__botao { white-space: nowrap; }

@media (max-width: 780px) {
  .home-jogos__card {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas: "theo texto" "theo botao";
    gap: 6px 12px;
    min-height: 0;
    padding: 14px 14px 0 4px;
  }
  .home-jogos__theo { grid-area: theo; width: 96px; height: auto; margin-top: 0; }
  .home-jogos__texto { grid-area: texto; }
  .home-jogos__texto p { font-size: .82rem; }
  .home-jogos__botao { grid-area: botao; justify-self: start; min-height: 44px; margin-bottom: 14px; padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .games-link, .games-link__selo { transition: none; }
  .games-link:hover, .games-link:hover .games-link__selo { transform: none; }
}
