.pb-search { position:relative; width:max-content; max-width:100%; color:var(--pb-text); }
.pb-search [hidden] { display:none !important; }
.pb-search button {
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:40px;
  padding:0 12px;
  border:0;
  border-radius:var(--pb-control);
  background:var(--pb-soft);
  color:var(--pb-text);
  font:inherit;
  cursor:pointer;
}
.pb-search :is(button,a,input):focus-visible { outline:2px solid var(--pb-blue); outline-offset:2px; }
.pb-search-icon {
  position:relative;
  display:inline-block;
  width:13px;
  height:13px;
  margin-right:3px;
  border:1.75px solid currentColor;
  border-radius:50%;
  flex:none;
}
.pb-search-icon::after {
  content:"";
  position:absolute;
  width:6px;
  height:1.75px;
  bottom:-2px;
  right:-4px;
  background:currentColor;
  transform:rotate(45deg);
}
.pb-search-panel {
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  z-index:1050;
  width:min(400px,calc(100vw - 32px));
  padding:10px;
  border:1px solid var(--pb-border);
  border-radius:var(--pb-card);
  background:var(--pb-surface);
  box-shadow:0 10px 30px rgb(25 25 29 / 16%);
}
.pb-search-panel *, .pb-search-panel { box-sizing:border-box; }
.pb-search-form { display:flex; gap:6px; margin:0; }
.pb-search-form input[type=search] {
  flex:1;
  min-width:0;
  height:40px;
  padding:0 10px;
  border:1px solid var(--pb-border);
  border-radius:var(--pb-control);
  background:var(--pb-surface);
  color:var(--pb-text);
  font:inherit;
}
.pb-search-status { margin:8px 4px 0; color:var(--pb-muted); font-size:13px; }
.pb-search-status:empty { margin:0; }
.pb-search-results { margin:0; padding:0; list-style:none; max-height:min(56vh,380px); overflow:auto; }
.pb-search-results a {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:48px;
  padding:6px;
  color:var(--pb-text);
  border-radius:var(--pb-control);
  text-decoration:none;
}
.pb-search-results a:hover,.pb-search-results a:focus-visible { background:var(--pb-blue-soft); }
.pb-search-results img { width:36px; height:42px; flex:none; object-fit:contain; border-radius:4px; }
.pb-search-results strong { margin-left:auto; white-space:nowrap; font-size:13px; }
.constructor-topbar .pb-search { justify-self:end; margin-left:auto; }
.pb-header-search .pb-search-panel,.constructor-topbar .pb-search-panel,.profile-head .pb-search-panel { right:0; left:auto; }
@media(max-width:680px) {
  .head .pb-search,.profile-head .pb-search { order:1; flex:0 0 100%; }
  .profile-head .pb-search-panel { right:auto; left:0; }
  .constructor-topbar .pb-search-toggle { padding-inline:8px; gap:6px; font-size:13px; }
}
@media(max-width:440px) {
  .constructor-topbar { gap:6px; }
  .constructor-topbar .constructor-history { position:static; transform:none; gap:4px; margin-left:auto; }
  .constructor-topbar .constructor-history button { width:32px; height:32px; font-size:21px; }
}
