.header-search {
  position: relative;
  flex: 0 1 260px;
  min-width: 210px;
  color: #dce5ee;
}
.header-search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #334151;
  border-radius: 10px;
  background: #15202c;
  transition:
    border-color 150ms,
    box-shadow 150ms;
}
.header-search-field:focus-within {
  border-color: #b8a26f;
  box-shadow: 0 0 0 3px #dbbe8212;
}
.header-search-field > .icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #a6b4c5;
}
.header-search-field input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: #eef2f6;
  font-size: 12px;
}
.header-search-field input::placeholder {
  color: #96a6b8;
}
.header-search-region {
  padding: 3px 5px;
  border: 1px solid #3b4859;
  border-radius: 4px;
  color: #b8c8d8;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.06em;
}
.header-search-clear {
  flex-shrink: 0;
  padding: 0;
  width: 24px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #bac7d5;
  font-size: 20px;
}
.header-search-popup {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: min(570px, calc(100dvh - var(--topbar-height, 74px) - 20px));
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 8px;
  background: #101a26;
  border: 1px solid #3c4b5e;
  border-radius: 14px;
  box-shadow:
    0 18px 48px #0009,
    0 1px 0 #ffffff06 inset;
}
.header-search-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 7px 12px;
}
#header-search-results {
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
.header-search-heading,
.header-search-all,
#header-search-status {
  flex-shrink: 0;
}
.header-search-heading strong {
  color: #b5c4d5;
  font-size: 11px;
  font-weight: 500;
}
.header-search-heading .custom-select {
  width: auto;
  max-width: 65%;
  min-width: 0;
  margin-top: 0;
}
.header-search-heading .select-trigger {
  min-height: 32px;
  padding: 5px 10px 5px 9px;
  font-size: 11px;
  background-color: #172331;
}
.header-search-heading .select-chevron {
  margin-right: 0;
}
.header-search-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-decoration: none;
}
.header-search-result:hover,
.header-search-result[aria-selected="true"] {
  background: #dbbe820c;
  border-color: #dbbe8245;
}
.header-search-result > .icon {
  width: 16px;
  flex-shrink: 0;
  color: #b6a581;
}
.header-search-result .player-choice {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
}
.header-search-result .player-choice-avatar {
  width: 40px;
  height: 48px;
  grid-row: auto;
}
.header-search-result .player-choice-name {
  font-size: 14px;
}
.header-search-result .player-choice-scores {
  grid-column: 3;
  display: grid;
  gap: 5px;
}
.header-search-result .player-choice-score strong {
  font-size: 11px;
  font-weight: 500;
}
.header-search-result .player-choice-score .icon {
  width: 13px;
  height: 13px;
}
.header-search-result .player-choice-meta,
.header-search-result .player-choice-location {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#header-search-status {
  margin: 0;
  padding: 10px 9px;
  font-size: 11px;
  line-height: 1.6;
  color: #a4b5c7;
}
#header-search-status:empty {
  display: none;
}
#header-search-status.is-error {
  color: #edc17d;
}
.header-search-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 9px 7px;
  border-top: 1px solid #2d3949;
  color: #ddc592;
  font-size: 12px;
  text-decoration: none;
}
.header-search-all:hover {
  color: #f5e4ba;
}
.header-search-all > .icon {
  width: 16px;
  height: 16px;
}
.header-search-skeleton {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px;
}
.header-search-skeleton .skeleton-portrait {
  width: 40px;
  height: 48px;
}
.header-search [hidden] {
  display: none;
}
@media (max-width: 1400px) and (min-width: 761px) {
  .topbar {
    height: auto;
    min-height: 74px;
    flex-wrap: wrap;
    padding-block: 10px;
  }
  .header-search {
    margin-left: auto;
    flex-basis: 300px;
  }
  .header-status {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    border-top: 1px solid #273340;
    padding-top: 8px;
  }
}
@media (max-width: 760px) {
  .header-search {
    order: 2;
    flex: 1 0 100%;
    min-width: 0;
  }
  .header-search-field {
    min-height: 44px;
  }
  .header-search-field input {
    font-size: 16px;
  }
  .header-search-clear {
    width: 30px;
    min-height: 40px;
  }
  .header-search-popup {
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
  }
  .header-search-heading {
    gap: 6px;
  }
  .header-search-heading .select-trigger {
    min-height: 40px;
    font-size: 12px;
  }
  .header-search-result {
    padding: 9px 6px;
  }
  .header-search-result > .icon {
    display: none;
  }
  .header-search-result .player-choice {
    gap: 8px;
  }
  .header-search-result .player-choice-name {
    font-size: 13px;
  }
  .header-search-all {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .header-search-field {
    transition: none;
  }
}
