/* ==========================================================
   Gr.Est. pubblico - Home, ricerca, classifica, informazioni
   Tema 2026: Che Meraviglia! / Alice sottosopra
   ========================================================== */

body.grest-public-wonder{
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(139,92,246,.24), transparent 62%),
    radial-gradient(900px 520px at 95% 0%, rgba(14,165,233,.20), transparent 58%),
    radial-gradient(900px 520px at 55% 120%, rgba(34,197,94,.16), transparent 58%),
    linear-gradient(180deg, #fbfdff 0%, #f6f0ff 100%);
}

.gpHeroWonder{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  padding:22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,255,255,.74)),
    radial-gradient(circle at 12% 20%, rgba(139,92,246,.22), transparent 34%),
    radial-gradient(circle at 90% 18%, rgba(14,165,233,.20), transparent 34%);
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 24px 56px rgba(31,41,55,.12);
}
.gpHeroWonder:before{
  content:"";
  position:absolute;
  inset:auto -70px -100px auto;
  width:250px;
  height:250px;
  border-radius:999px;
  border:34px solid rgba(139,92,246,.10);
  transform:rotate(18deg);
}
.gpHeroKicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding:8px 12px;
  font-weight:900;
  background:rgba(139,92,246,.12);
  color:#5b21b6;
  border:1px solid rgba(139,92,246,.18);
}
.gpHeroTitle{
  position:relative;
  margin:12px 0 6px;
  font-size:clamp(2rem, 5.2vw, 4rem);
  line-height:.96;
  letter-spacing:-.05em;
  font-weight:1000;
  color:#0f172a;
}
.gpHeroTitle span{
  display:inline-block;
  transform:rotate(-2deg);
  color:#7c3aed;
}
.gpHeroSub{
  position:relative;
  max-width:780px;
  margin:0;
  font-size:1.06rem;
  line-height:1.55;
  color:rgba(15,23,42,.74);
}
.gpHeroActions{
  position:relative;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}
.gpPublicGrid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:14px;
}
@media (min-width:820px){
  .gpPublicGrid{grid-template-columns:repeat(3, minmax(0,1fr));}
}
.gpPublicCard{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:180px;
  padding:18px;
  border-radius:24px;
  text-decoration:none;
  background:rgba(255,255,255,.90);
  border:1px solid rgba(15,23,42,.11);
  box-shadow:0 16px 34px rgba(15,23,42,.09);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.gpPublicCard:hover{
  transform:translateY(-3px) rotate(-.35deg);
  box-shadow:0 22px 48px rgba(15,23,42,.14);
  border-color:rgba(124,58,237,.28);
}
.gpPublicIcon{
  width:54px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:18px;
  background:linear-gradient(135deg, rgba(124,58,237,.16), rgba(14,165,233,.12));
  font-size:1.35rem;
  color:#5b21b6;
}
.gpPublicTitle{
  font-weight:1000;
  font-size:1.24rem;
  line-height:1.08;
}
.gpPublicSub{
  color:rgba(15,23,42,.70);
  line-height:1.42;
}
.gpPublicArrow{
  margin-top:auto;
  font-weight:900;
  color:#6d28d9;
}

.gpSearchBox{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  align-items:end;
}
@media (min-width:720px){
  .gpSearchBox{grid-template-columns:minmax(0,1fr) auto;}
}
.gpSearchInput{
  width:100%;
  min-height:56px;
  border-radius:18px;
  border:1px solid rgba(15,23,42,.15);
  padding:0 16px;
  font-size:1.1rem;
  font-weight:800;
  background:rgba(255,255,255,.95);
  outline:none;
}
.gpSearchInput:focus{box-shadow:0 0 0 4px rgba(124,58,237,.16); border-color:rgba(124,58,237,.42);}
.gpResultList{display:grid; gap:12px;}
.gpResultCard{
  border-radius:24px;
  border:1px solid rgba(15,23,42,.10);
  background:rgba(255,255,255,.92);
  padding:16px;
  box-shadow:0 14px 32px rgba(15,23,42,.08);
}
.gpResultHead{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:flex-start;
  flex-wrap:wrap;
}
.gpChildName{font-weight:1000; font-size:1.28rem; line-height:1.1;}
.gpMeta{color:rgba(15,23,42,.68); margin-top:4px;}
.gpBadgeRow{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px;}
.gpBadge{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:.92rem;
  border:1px solid rgba(15,23,42,.10);
  background:rgba(15,23,42,.05);
}
.gpBadge.ok{background:rgba(34,197,94,.12); color:#166534; border-color:rgba(34,197,94,.22);}
.gpBadge.warn{background:rgba(245,158,11,.14); color:#92400e; border-color:rgba(245,158,11,.25);}
.gpBadge.bad{background:rgba(239,68,68,.12); color:#991b1b; border-color:rgba(239,68,68,.22);}
.gpBadge.primary{background:rgba(14,165,233,.12); color:#075985; border-color:rgba(14,165,233,.22);}
.gpTeamChip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 11px;
  border-radius:999px;
  font-weight:1000;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(15,23,42,.10);
}
.gpTeamChip:before{
  content:"";
  width:13px;
  height:13px;
  border-radius:999px;
  background:var(--team-color, #cbd5e1);
  box-shadow:0 0 0 3px rgba(15,23,42,.06);
}
.gpGamesGrid{display:grid; grid-template-columns:1fr; gap:8px; margin-top:12px;}
@media (min-width:760px){.gpGamesGrid{grid-template-columns:repeat(2,minmax(0,1fr));}}
.gpGameSlot{
  border-radius:18px;
  padding:12px;
  background:rgba(124,58,237,.06);
  border:1px solid rgba(124,58,237,.12);
}
.gpGameTop{display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; font-weight:1000;}
.gpGameSub{margin-top:5px; color:rgba(15,23,42,.70); line-height:1.35;}
.gpEmpty{
  padding:18px;
  border-radius:22px;
  background:rgba(255,255,255,.82);
  border:1px dashed rgba(15,23,42,.18);
  color:rgba(15,23,42,.70);
}
.gpInfoGrid{display:grid; grid-template-columns:1fr; gap:16px; align-items:start;}
@media (min-width:860px){.gpInfoGrid{grid-template-columns:minmax(0,1.35fr) 330px;}}
.gpInfoPoster{
  border-radius:28px;
  padding:22px;
  background:linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.76));
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 18px 42px rgba(15,23,42,.10);
}
.gpInfoPoster h2{margin:0 0 10px; font-size:clamp(1.8rem,4.2vw,3.2rem); line-height:.98; letter-spacing:-.04em;}
.gpInfoPoster h3{margin:18px 0 8px; font-size:1.15rem;}
.gpInfoPoster p{line-height:1.58; margin:8px 0; color:rgba(15,23,42,.78);}
.gpInfoCallout{
  margin:14px 0;
  padding:16px;
  border-radius:22px;
  background:rgba(245,158,11,.12);
  border:1px solid rgba(245,158,11,.22);
  font-weight:800;
  color:#78350f;
}
.gpQrBox{
  position:sticky;
  top:14px;
  border-radius:28px;
  padding:18px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 18px 42px rgba(15,23,42,.10);
  text-align:center;
}
.gpQrBox img{width:min(260px, 100%); height:auto; border-radius:20px; background:#fff; padding:10px; border:1px solid rgba(15,23,42,.08);}
.gpQrTitle{font-weight:1000; font-size:1.24rem; margin-bottom:8px;}
.gpInfoList{display:grid; gap:10px; margin-top:12px;}
.gpInfoItem{display:flex; gap:10px; align-items:flex-start; padding:12px; border-radius:18px; background:rgba(14,165,233,.07); border:1px solid rgba(14,165,233,.12);}
.gpInfoItem i{color:#0369a1; margin-top:3px;}

body.pub-ui.grest-ui .ggClassificaRowLink{text-decoration:none; color:inherit; cursor:pointer;}
body.pub-ui.grest-ui .ggClassificaRowLink:hover{transform:translateY(-2px); border-color:rgba(124,58,237,.26);}
body.pub-ui.grest-ui .ggClassificaRowLink.isSelected{outline:3px solid rgba(124,58,237,.18);}
.ggHistoryList{display:grid; gap:10px;}
.ggHistoryItem{
  border-radius:18px;
  padding:12px;
  border:1px solid rgba(15,23,42,.10);
  background:rgba(255,255,255,.88);
}
.ggHistoryTop{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; font-weight:1000;}
.ggHistorySub{margin-top:6px; color:rgba(15,23,42,.70); line-height:1.36;}
.ggHistoryPoints{font-weight:1000; color:#6d28d9;}

@media (max-width:640px){
  .gpHeroWonder{padding:18px; border-radius:24px;}
  .gpPublicCard{min-height:auto;}
  .gpInfoPoster, .gpQrBox{border-radius:24px; padding:16px;}
}


/* =========================================================
   FIX MOBILE PUBBLICO - 04/07/2026
   Area pubblica Gr.Est.
   ========================================================= */
@media (max-width:860px){
  .gpQrBox{
    position:static;
  }
}

@media (max-width:640px){
  .gpHeroActions,
  .grestInline,
  .ggFilterActions{
    width:100%;
  }

  .gpHeroActions .btn,
  .grestInline .btn,
  .ggFilterActions .btn{
    width:100%;
    min-height:44px;
    white-space:normal;
    line-height:1.18;
  }

  .gpSearchInput{
    font-size:1rem;
  }

  .gpBadge,
  .gpTeamChip{
    white-space:normal;
  }
}
