/* =========================================================
   PITCH. / FRIENDS
   ========================================================= */

.friends-page {
  min-height: 100vh;
}

.friends-shell {
  min-height: calc(100vh - 80px);
  padding: 108px 0 72px;
}

.friends-container {
  width: min(1180px, calc(100% - 40px));
}

.friends-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
}

.friends-hero__copy {
  max-width: 720px;
}

.friends-kicker,
.friends-section-kicker {
  display: block;
  margin-bottom: 10px;
  color: #00ff66;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.friends-hero h1 {
  margin: 0;
  color: #f4f7f8;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.98;
  font-weight: 720;
  letter-spacing: -0.045em;
}

.friends-hero p {
  max-width: 650px;
  margin: 14px 0 0;
  color: rgba(222, 229, 233, 0.56);
  font-size: 14px;
  line-height: 1.65;
}

.friends-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(126px, 1fr));
  gap: 8px;
}

.friends-stat {
  min-width: 126px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}

.friends-stat span {
  display: block;
  margin-bottom: 5px;
  color: rgba(225,232,236,.43);
  font-size: 12px;
  font-weight: 620;
}

.friends-stat strong {
  color: rgba(244,248,250,.96);
  font-size: 23px;
  line-height: 1;
  font-weight: 680;
}

.friends-stat--accent {
  border-color: rgba(0,255,102,.14);
  background: linear-gradient(180deg, rgba(0,255,102,.055), rgba(0,255,102,.02));
}

.friends-stat--accent strong {
  color: #00ff66;
}

.friends-panel {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 0%, rgba(0,255,102,.035), transparent 27%),
    rgba(6,10,13,.82);
  box-shadow: 0 26px 70px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.025);
}

.friends-panel__head {
  padding: 18px;
  border-bottom: 1px solid rgba(255,255,255,.065);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.friends-search-wrap {
  flex: 1 1 420px;
  max-width: 520px;
}

.friends-search {
  min-height: 48px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: rgba(255,255,255,.027);
  transition: 160ms ease;
}

.friends-search:focus-within {
  border-color: rgba(0,255,102,.24);
  background: rgba(0,255,102,.025);
  box-shadow: 0 0 0 3px rgba(0,255,102,.04);
}

.friends-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: rgba(228,234,238,.4);
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.friends-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f1f5f7;
  font: inherit;
  font-size: 13px;
}

.friends-search input::placeholder {
  color: rgba(222,229,233,.3);
}

.friends-search__hint {
  color: rgba(222,229,233,.34);
  font-size: 12px;
  white-space: nowrap;
}

.friends-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 13px;
  background: rgba(0,0,0,.16);
}

.friends-tab {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: rgba(223,230,234,.54);
  font: inherit;
  font-size: 12px;
  font-weight: 620;
  cursor: pointer;
  transition: 150ms ease;
}

.friends-tab:hover {
  color: rgba(245,248,250,.8);
  background: rgba(255,255,255,.035);
}

.friends-tab.is-active {
  color: #f4f8f6;
  background: rgba(255,255,255,.065);
  box-shadow: inset 0 1px rgba(255,255,255,.03);
}

.friends-tab b {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255,255,255,.055);
  color: rgba(236,242,244,.66);
  font-size: 12px;
  font-weight: 720;
}

.friends-tab[data-friends-tab="requests"] b:not(:empty) {
  color: #00ff66;
}

.friends-content {
  padding: 22px 22px 26px;
}

.friends-section-head {
  min-height: 44px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.friends-section-kicker {
  margin-bottom: 4px;
  color: rgba(0,255,102,.78);
  font-size: 12px;
}

.friends-section-head h2 {
  margin: 0;
  color: rgba(244,248,250,.94);
  font-size: 18px;
  font-weight: 660;
  letter-spacing: -0.025em;
}

.friends-section-meta {
  color: rgba(220,227,231,.34);
  font-size: 12px;
}

.friends-list {
  display: grid;
  gap: 8px;
}

.friend-card {
  min-height: 80px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 16px;
  background: rgba(255,255,255,.018);
  transition: 150ms ease;
}

.friend-card:hover {
  border-color: rgba(255,255,255,.095);
  background: rgba(255,255,255,.028);
}

.friend-card--incoming {
  border-color: rgba(0,255,102,.11);
  background: linear-gradient(90deg, rgba(0,255,102,.035), rgba(255,255,255,.015) 34%);
}

.friend-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.friend-avatar {
  width: 48px;
  height: 48px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(0,255,102,.14), transparent 55%),
    rgba(255,255,255,.035);
  color: rgba(238,244,241,.82);
  font-size: 13px;
  font-weight: 690;
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border: 2px solid #070b0e;
  border-radius: 50%;
  background: #3b4246;
}

.friend-presence.is-online {
  background: #00ff66;
  box-shadow: 0 0 12px rgba(0,255,102,.35);
}

.friend-card__identity {
  min-width: 0;
  flex: 1;
}

.friend-card__identity strong,
.friend-card__identity a {
  display: block;
  overflow: hidden;
  color: rgba(244,248,250,.96);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card__identity a:hover {
  color: #fff;
}

.friend-card__identity small {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: rgba(220,227,231,.42);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card__identity small .is-online {
  color: rgba(0,255,102,.7);
}

.friend-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.friend-action {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255,255,255,.028);
  color: rgba(231,237,240,.64);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: 150ms ease;
}

.friend-action:hover {
  color: #fff;
  border-color: rgba(255,255,255,.13);
  background: rgba(255,255,255,.05);
}

.friend-action svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.friend-action--primary {
  border-color: rgba(0,255,102,.18);
  background: rgba(0,255,102,.075);
  color: rgba(211,255,229,.9);
}

.friend-action--primary:hover {
  border-color: rgba(0,255,102,.3);
  background: rgba(0,255,102,.12);
  color: #fff;
}

.friend-action--danger:hover {
  border-color: rgba(255,91,113,.2);
  background: rgba(255,91,113,.07);
  color: #ff96a5;
}

.friend-action--icon {
  width: 38px;
  padding: 0;
}

.friend-action[disabled] {
  opacity: .55;
  cursor: default;
  pointer-events: none;
}

.friends-state {
  min-height: 280px;
  padding: 36px 20px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.friends-state__icon {
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0,255,102,.12);
  border-radius: 17px;
  background: rgba(0,255,102,.035);
  color: rgba(0,255,102,.7);
}

.friends-state__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.friends-state strong {
  color: rgba(241,246,248,.88);
  font-size: 14px;
  font-weight: 650;
}

.friends-state p {
  max-width: 430px;
  margin: 7px auto 0;
  color: rgba(220,227,231,.46);
  font-size: 12px;
  line-height: 1.6;
}

.friends-state--loading {
  min-height: 300px;
  color: rgba(220,227,231,.46);
  font-size: 12px;
  gap: 10px;
}

.friends-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.08);
  border-top-color: rgba(0,255,102,.75);
  border-radius: 50%;
  animation: friends-spin .7s linear infinite;
}

@keyframes friends-spin {
  to { transform: rotate(360deg); }
}

.friends-toast {
  position: fixed;
  z-index: 10100;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 14px;
  border: 1px solid rgba(0,255,102,.18);
  border-radius: 12px;
  background: rgba(8,14,12,.94);
  color: rgba(236,244,240,.9);
  box-shadow: 0 18px 55px rgba(0,0,0,.4);
  backdrop-filter: blur(16px);
  font-size: 12px;
}

.friends-toast.is-error {
  border-color: rgba(255,91,113,.22);
  background: rgba(19,9,12,.95);
}

.friends-modal[hidden],
.friends-toast[hidden] {
  display: none !important;
}

.friends-modal {
  position: fixed;
  inset: 0;
  z-index: 10120;
  display: grid;
  place-items: center;
  padding: 18px;
}

.friends-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(1,4,7,.78);
  backdrop-filter: blur(11px);
}

.friends-modal__card {
  position: relative;
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  background: rgba(8,12,15,.97);
  box-shadow: 0 28px 90px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.025);
}

.friends-modal__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,91,113,.16);
  border-radius: 15px;
  background: rgba(255,91,113,.045);
  color: #ff8295;
}

.friends-modal__icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.friends-modal__copy {
  margin-top: 18px;
}

.friends-modal__copy > span {
  color: rgba(255,91,113,.72);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .14em;
}

.friends-modal__copy h2 {
  margin: 5px 0 0;
  color: rgba(245,248,250,.96);
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -.025em;
}

.friends-modal__copy p {
  margin: 8px 0 0;
  color: rgba(220,227,231,.5);
  font-size: 12px;
  line-height: 1.6;
}

.friends-modal__actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.friends-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: rgba(235,240,243,.68);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.friends-button--danger {
  border-color: rgba(255,91,113,.18);
  background: rgba(255,91,113,.075);
  color: #ff9baa;
}

@media (max-width: 880px) {
  .friends-shell {
    padding-top: 92px;
  }

  .friends-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .friends-hero__stats {
    align-self: flex-start;
  }

  .friends-panel__head {
    align-items: stretch;
    flex-direction: column;
  }

  .friends-search-wrap {
    max-width: none;
    flex-basis: auto;
  }

  .friends-tabs {
    align-self: flex-start;
  }
}

@media (max-width: 640px) {
  .friends-shell {
    padding: 82px 0 48px;
  }

  .friends-container {
    width: min(100% - 20px, 1180px);
  }

  .friends-hero {
    gap: 18px;
    margin-bottom: 16px;
  }

  .friends-hero h1 {
    font-size: 36px;
  }

  .friends-hero p {
    font-size: 13px;
  }

  .friends-hero__stats {
    width: 100%;
  }

  .friends-stat {
    min-width: 0;
  }

  .friends-panel {
    border-radius: 19px;
  }

  .friends-panel__head {
    padding: 12px;
  }

  .friends-search__hint {
    display: none;
  }

  .friends-tabs {
    width: 100%;
  }

  .friends-tab {
    min-width: 0;
    flex: 1;
    padding-inline: 7px;
    justify-content: center;
  }

  .friends-content {
    padding: 16px 12px 18px;
  }

  .friend-card {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 11px;
  }

  .friend-card__identity {
    padding-top: 3px;
  }

  .friend-card__actions {
    width: 100%;
    padding-left: 60px;
    justify-content: flex-start;
  }

  .friend-action:not(.friend-action--icon) {
    flex: 1;
  }

  .friends-modal__card {
    padding: 20px;
    border-radius: 17px;
  }
}

/* =========================================================
   BLACKLIST
   ========================================================= */

.friend-card--blocked {
  border-color: rgba(255, 91, 113, 0.095);
  background: linear-gradient(90deg, rgba(255, 91, 113, 0.03), rgba(255,255,255,.014) 36%);
}

.friend-card--blocked .friend-presence {
  display: none;
}

.friends-tab[data-friends-tab="blocked"].is-active {
  color: rgba(255, 223, 228, 0.94);
  background: rgba(255, 91, 113, 0.07);
}

.friends-tab[data-friends-tab="blocked"] b {
  color: rgba(255, 145, 161, 0.82);
}

@media (max-width: 720px) {
  .friends-tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .friends-tabs::-webkit-scrollbar {
    display: none;
  }

  .friends-tab {
    flex: 0 0 auto;
  }
}
