.zbd-social-profile-search {
  --zbd-social-search-gold: #f0b90b;
  --zbd-social-search-copy: #f4f7fa;
  --zbd-social-search-muted: #9da8b4;
  --zbd-social-search-surface: #0c1117;
  --zbd-social-search-panel: #171d24;
  --zbd-social-search-line: rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 20;
  width: min(100%, 780px);
  margin: 0.75rem auto 1rem;
  color-scheme: dark;
}

.zbd-social-profile-search--profile {
  /* Le composant est le premier enfant du <main class="pt-3"> : on compense
     ce padding pour reprendre exactement le rythme de la recherche du header. */
  margin-top: calc(
    var(--zbd-search-nav-gap, 0.36rem)
    + var(--zbd-search-bar-top-padding, 0.12rem)
    - 1rem
  );
}

.zbd-social-profile-search--relationships {
  width: 100%;
  margin: 0;
}

.zbd-social-profile-search__form,
.zbd-social-profile-search__field {
  position: relative;
  min-width: 0;
}

.zbd-social-profile-search__field > .bi-person {
  position: absolute;
  top: 50%;
  left: 0.92rem;
  z-index: 2;
  color: var(--zbd-social-search-muted);
  font-size: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.zbd-social-profile-search__field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.68rem 3.3rem 0.68rem 2.7rem;
  border: 1px solid var(--zbd-social-search-line);
  border-radius: 0.78rem;
  outline: 0;
  background: var(--zbd-social-search-surface);
  color: var(--zbd-social-search-copy);
  font-size: 0.88rem;
  font-weight: 700;
}

.zbd-social-profile-search__field input::placeholder {
  color: #75818d;
  font-weight: 650;
}

.zbd-social-profile-search__field input:focus {
  border-color: rgba(240, 185, 11, 0.68);
  box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.11);
}

.zbd-social-profile-search__field input:focus-visible,
.zbd-social-profile-search__submit:focus-visible,
.zbd-social-profile-search__option:focus-visible {
  outline: 3px solid rgba(240, 185, 11, 0.62);
  outline-offset: 2px;
}

.zbd-social-profile-search__submit {
  position: absolute;
  top: 50%;
  right: 0.38rem;
  z-index: 3;
  display: inline-grid;
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--zbd-social-search-gold);
  border-radius: 0.6rem;
  background: var(--zbd-social-search-gold);
  color: #101010;
  transform: translateY(-50%);
  touch-action: manipulation;
}

.zbd-social-profile-search__submit:hover {
  border-color: #ffd34e;
  background: #ffd34e;
  color: #090909;
}

.zbd-social-profile-search__status {
  min-height: 1.2rem;
  padding: 0.32rem 0.2rem 0;
  color: var(--zbd-social-search-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.zbd-social-profile-search__status.is-error {
  color: #ffaaaa;
}

.zbd-social-profile-search__list {
  position: absolute;
  top: calc(100% + 0.42rem);
  right: 0;
  left: 0;
  z-index: 50;
  max-height: min(60vh, 24rem);
  padding: 0.32rem;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.82rem;
  background: #11171e;
  box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, 0.42);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.zbd-social-profile-search__list[hidden] {
  display: none;
}

.zbd-social-profile-search__option {
  display: grid;
  min-height: 3.8rem;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.48rem 0.55rem;
  border-radius: 0.62rem;
  color: var(--zbd-social-search-copy);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.zbd-social-profile-search__option:hover,
.zbd-social-profile-search__option[aria-selected="true"] {
  background: rgba(240, 185, 11, 0.1);
  color: var(--zbd-social-search-copy);
}

.zbd-social-profile-search__avatar {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.25rem;
  border: 1px solid rgba(240, 185, 11, 0.28);
  border-radius: 50%;
  background: #050607;
  object-fit: contain;
}

.zbd-social-profile-search__identity {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.zbd-social-profile-search__identity strong,
.zbd-social-profile-search__identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zbd-social-profile-search__identity strong {
  font-size: 0.84rem;
  font-weight: 900;
}

.zbd-social-profile-search__identity span {
  color: var(--zbd-social-search-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.zbd-social-profile-search__identity .is-premium {
  color: var(--zbd-social-search-gold);
}

.zbd-social-profile-search__meta {
  display: inline-flex;
  max-width: 9.5rem;
  align-items: center;
  gap: 0.28rem;
  padding: 0.24rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #c3ccd5;
  font-size: 0.64rem;
  font-weight: 850;
  white-space: nowrap;
}

.zbd-social-profile-search__meta.is-relationship {
  background: rgba(240, 185, 11, 0.11);
  color: #f5d472;
}

@media (max-width: 420px) {
  .zbd-social-profile-search__option {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    gap: 0.55rem;
    padding-inline: 0.42rem;
  }

  .zbd-social-profile-search__avatar {
    width: 2.5rem;
    height: 2.5rem;
  }

  .zbd-social-profile-search__meta {
    max-width: 7.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 340px) {
  .zbd-social-profile-search__meta {
    display: none;
  }

  .zbd-social-profile-search__option {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .zbd-social-profile-search * {
    scroll-behavior: auto !important;
  }
}
