.search-page {
  max-width: 1180px;
  --search-rule: var(--fc-rule);
}

.search-hero {
  padding: 32px 0 8px;
}

.search-hero h1 {
  max-width: 980px;
  margin: 0;
  font-family: var(--fc-font-display);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: .95;
}

.search-hero h1 em {
  color: var(--fc-bubblegum);
  font-style: normal;
}

.search-hero p {
  margin: 10px 0 0;
  color: rgba(0, 0, 0, .55);
  font-family: var(--fc-font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 24px 0 12px;
  padding: 8px 8px 8px 20px;
  border: 1.5px solid #d8d6d0;
  border-radius: 999px;
  background: #fff;
}

.search-input-label {
  display: block;
  margin: 24px 0 -12px;
  color: rgba(0, 0, 0, .55);
  font-family: var(--fc-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-input-row:focus-within {
  border-color: var(--fc-electric);
}

.search-input-row__icon {
  display: grid;
  color: rgba(0, 0, 0, .35);
  place-items: center;
}

.search-input-row input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: #000;
  font-family: var(--fc-font-display);
  font-size: 22px;
  font-weight: 600;
  outline: none;
}

.search-input-row input::placeholder {
  color: rgba(0, 0, 0, .35);
}

.search-input-row__clear {
  padding: 6px 12px;
  color: rgba(0, 0, 0, .55);
  font-family: var(--fc-font-mono);
  font-size: 13px;
  text-decoration: none;
}

.search-input-row__clear:hover {
  color: var(--fc-bubblegum);
}

.search-input-row__cta {
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-family: var(--fc-font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* FAN-581 (A11Y-M07): inherited white text on bubblegum was 2.57:1, fails
   AA 4.5:1 — ink reaches 8.16:1. */
.search-input-row__cta:hover {
  background: var(--fc-bubblegum);
  color: var(--fc-black);
}

.search-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 24px;
}

.search-filter-row .lbl {
  margin-right: 8px;
  color: rgba(0, 0, 0, .5);
  font-family: var(--fc-font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-filter-row .pg-pill {
  border: 0;
  background: var(--fc-fog);
  box-shadow: inset 0 0 0 1px var(--search-rule);
}

.search-filter-row .pg-pill:hover,
.search-filter-row .pg-pill.active {
  box-shadow: none;
}

.search-results {
  display: grid;
  gap: 24px;
}

.search-section {
  margin-top: 4px;
}

.search-section--top {
  margin-top: 28px;
}

.search-section__hd {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 12px;
}

.search-section__hd h2 {
  margin: 0;
  font-family: var(--fc-font-display);
  font-size: 22px;
  font-weight: 700;
}

.search-section__hd p {
  margin: 4px 0 0;
  color: rgba(0, 0, 0, .55);
  font-size: 13px;
}

.search-team-list,
.search-chant-list,
.search-top-list {
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--search-rule);
}

.res-team {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--search-rule);
  color: inherit;
  text-decoration: none;
}

.res-team:last-child {
  border-bottom: 0;
}

.res-team:hover {
  background: #faf9f5;
}

.res-team .league-dot {
  width: 48px;
  height: 48px;
}

.res-team__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.res-team__nm {
  display: block;
  overflow: hidden;
  color: #000;
  font-family: var(--fc-font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.res-team__sub {
  margin-top: 4px;
  color: rgba(0, 0, 0, .55);
  font-family: var(--fc-font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.res-team__cta {
  color: var(--fc-bubblegum);
  font-family: var(--fc-font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.search-empty {
  margin-top: 22px;
  padding: 20px 22px;
  border: 0;
  background: var(--fc-fog);
  box-shadow: inset 0 0 0 1px var(--search-rule);
}

.search-section--popular {
  margin-top: 28px;
}

.search-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.search-popular-card {
  display: grid;
  min-height: 188px;
  min-width: 0;
  grid-template-rows: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--search-rule);
  color: inherit;
  text-decoration: none;
}

.search-popular-card:hover {
  background: #faf9f5;
}

.search-popular-card__avatar,
.search-popular-card .league-dot {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
}

.search-popular-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.search-popular-card__name {
  display: -webkit-box;
  overflow: hidden;
  color: #000;
  font-family: var(--fc-font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-popular-card__league {
  overflow: hidden;
  margin-top: 4px;
  color: rgba(0, 0, 0, .55);
  font-family: var(--fc-font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.search-pagination {
  margin-top: 24px;
}

@media (max-width: 760px) {
  .search-hero h1 {
    font-size: 42px;
  }

  .search-input-row {
    flex-wrap: wrap;
    border-radius: 18px;
    padding: 12px;
  }

  .search-input-row input {
    flex-basis: calc(100% - 34px);
    font-size: 19px;
  }

  .search-input-row__cta {
    flex: 1;
  }

  .res-team {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .res-team__cta {
    display: none;
  }

  .search-popular-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-popular-card {
    min-height: 164px;
    grid-template-rows: 76px minmax(0, 1fr);
  }

  .search-popular-card__avatar,
  .search-popular-card .league-dot {
    width: 76px;
    height: 76px;
  }
}

/* FAN-419: keyboard focus must stay visible where outlines are reset */
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--fc-electric, #5000FF);
  outline-offset: 2px;
}
