/* Search & Discovery V2 — fast visual portal search */
.discovery-shell{
  position:relative;
  z-index:24;
}
.discovery-search{
  position:relative;
  margin-top:18px;
}
.discovery-search input{
  min-height:54px;
  padding-right:18px;
  border-radius:16px!important;
  font-size:16px!important;
  box-shadow:0 12px 30px rgba(30,43,82,.08)!important;
}
.discovery-search .primary{
  min-width:118px;
  border-radius:14px!important;
}
.search-discovery{
  position:absolute;
  top:calc(100% - 4px);
  right:0;
  left:0;
  z-index:45;
  max-height:min(68vh,620px);
  overflow:auto;
  padding:10px;
  border:1px solid rgba(23,32,61,.13);
  border-radius:18px;
  background:rgba(255,253,248,.985);
  box-shadow:0 24px 58px rgba(35,47,86,.18);
  backdrop-filter:blur(14px);
}
.search-discovery[hidden]{display:none!important}
.discovery-section-label{
  padding:7px 8px 5px;
  color:#7c879d;
  font-size:10px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.discovery-platforms{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-bottom:8px;
}
.discovery-platform{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  grid-template-rows:auto auto;
  align-items:center;
  gap:1px 9px;
  min-height:58px;
  padding:8px 10px;
  border:1px solid rgba(49,92,246,.12);
  border-radius:12px;
  background:linear-gradient(145deg,#f6f8ff,#fff);
  color:#1e2a48;
  text-align:left;
  cursor:pointer;
}
.discovery-platform>span{
  grid-row:1/3;
  display:grid;
  width:38px;
  height:38px;
  place-items:center;
  border-radius:10px;
  background:#eaf0ff;
  color:#315cf6;
  font-size:11px;
  font-weight:950;
}
.discovery-platform strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}
.discovery-platform small{
  overflow:hidden;
  color:#78839b;
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.discovery-games{
  display:grid;
  gap:5px;
}
.discovery-game{
  display:grid;
  grid-template-columns:54px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  min-height:70px;
  padding:7px 9px;
  border:1px solid transparent;
  border-radius:12px;
  color:#1e2a48;
  text-decoration:none;
}
.discovery-cover{
  display:grid;
  width:48px;
  height:58px;
  place-items:center;
  overflow:hidden;
  border:1px solid rgba(23,32,61,.11);
  border-radius:8px;
  background:#eef2f8;
}
.discovery-cover img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:3px;
}
.discovery-cover-fallback{
  display:grid;
  width:100%;
  height:100%;
  place-items:center;
  background:linear-gradient(145deg,#edf2fa,#f9f2e9);
  color:#315cf6;
  font-size:10px;
  font-weight:950;
}
.discovery-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:4px;
}
.discovery-copy strong{
  overflow:hidden;
  color:#17203d;
  font-size:13px;
  line-height:1.22;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.discovery-copy small{
  overflow:hidden;
  color:#748098;
  font-size:10.5px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.discovery-quote{
  display:flex;
  min-width:88px;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
  text-align:right;
}
.discovery-quote small{
  color:#7c879c;
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
}
.discovery-quote strong{
  font-size:12px;
  white-space:nowrap;
}
.discovery-game:hover,
.discovery-platform:hover,
.discovery-game.is-active,
.discovery-platform.is-active,
.discovery-all.is-active{
  border-color:rgba(49,92,246,.24);
  background:#eef3ff;
  outline:none;
}
.discovery-all{
  width:100%;
  min-height:42px;
  margin-top:7px;
  border:0;
  border-radius:11px;
  background:#f4f6fb;
  color:#315cf6;
  font-weight:850;
  cursor:pointer;
}
.discovery-loading,
.discovery-empty{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:16px;
  color:#66718a;
}
.discovery-empty strong{color:#263451}

.catalog-tools-v2{
  grid-template-columns:minmax(170px,1fr) minmax(135px,.7fr) minmax(220px,1.4fr) minmax(130px,.7fr) auto!important;
  gap:8px!important;
}
.catalog-tools-v2 select,
.catalog-tools-v2 input,
.catalog-tools-v2 button{
  min-height:44px;
}
.catalog-confidence{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  margin:-2px 0 9px;
  padding:4px 7px;
  border:1px solid rgba(49,92,246,.13);
  border-radius:999px;
  background:#eef3ff;
  color:#53617b;
  font-size:9px;
  font-weight:800;
}

@media(max-width:900px){
  .catalog-tools-v2{
    grid-template-columns:1fr 1fr!important;
  }
  .catalog-tools-v2 #catalogQ{
    grid-column:1/-1;
  }
  .catalog-tools-v2 #catalogLoad{
    grid-column:1/-1;
  }
}
@media(max-width:650px){
  .discovery-search{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    gap:7px!important;
  }
  .discovery-search input{
    min-width:0;
    min-height:50px;
    font-size:15px!important;
  }
  .discovery-search .primary{
    min-width:0;
    padding-inline:13px;
  }
  .search-discovery{
    top:calc(100% + 3px);
    max-height:70dvh;
    padding:7px;
    border-radius:14px;
  }
  .discovery-platforms{
    grid-template-columns:1fr;
  }
  .discovery-game{
    grid-template-columns:48px minmax(0,1fr);
    min-height:64px;
  }
  .discovery-cover{
    width:44px;
    height:54px;
  }
  .discovery-quote{
    grid-column:2;
    min-width:0;
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
    gap:7px;
    text-align:left;
  }
  .discovery-quote small{display:none}
  .catalog-tools-v2{
    grid-template-columns:1fr!important;
  }
  .catalog-tools-v2 #catalogQ,
  .catalog-tools-v2 #catalogLoad{
    grid-column:auto;
  }
}
@media(max-width:390px){
  .discovery-search{
    grid-template-columns:1fr!important;
  }
  .discovery-search .primary{
    min-height:44px;
  }
}
