/* Team directory sourced from the latest registration sheet. */

.directory {
  overflow: hidden;
  color: #111923;
  background:
    linear-gradient(115deg, transparent 62%, rgba(49, 95, 174, 0.025)),
    #f8f9f7;
}

.directory .section-description {
  color: #5a6670;
}

.directory-platform-row {
  display: flex;
  min-height: 58px;
  align-items: stretch;
  justify-content: space-between;
  margin-bottom: 18px;
  border: 1px solid rgba(17, 25, 35, 0.12);
  border-radius: 14px;
  overflow: hidden;
}

.directory-platform-label {
  display: flex;
  align-items: center;
  color: #68747d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.directory-platform-switch {
  display: grid;
  width: 300px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 1px solid rgba(17, 25, 35, 0.1);
  border-right: 1px solid rgba(17, 25, 35, 0.1);
}

.directory-platform-switch button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-left: 1px solid rgba(17, 25, 35, 0.1);
  color: #626d76;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.directory-platform-switch button:first-child {
  border-left: 0;
}

.directory-platform-switch button.active {
  color: #fff;
  background: #26313a;
}

.directory-platform-switch small {
  color: currentColor;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  opacity: 0.68;
}

.directory-platform-switch button:focus:not(:focus-visible) {
  outline: 0;
}

.directory-platform-switch button:focus-visible {
  outline: 1px solid #2b353e;
  outline-offset: -3px;
}

.directory-overview {
  display: grid;
  box-sizing: border-box;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(17, 25, 35, 0.14);
  border-right: 1px solid rgba(17, 25, 35, 0.14);
  border-bottom: 1px solid rgba(17, 25, 35, 0.14);
  border-left: 1px solid rgba(17, 25, 35, 0.14);
}

.directory-overview > div {
  display: grid;
  min-height: 104px;
  align-content: center;
  padding: 18px 28px;
  border-left: 1px solid rgba(17, 25, 35, 0.1);
}

.directory-overview > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.directory-overview span {
  color: #77828b;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
}

.directory-overview strong {
  margin-top: 7px;
  color: #17212a;
  font-family: var(--font-english);
  font-size: 32px;
  line-height: 1;
}

.directory-panel {
  margin-top: 36px;
  border: 1px solid rgba(17, 25, 35, 0.13);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(25, 39, 50, 0.06);
}

.directory-toolbar {
  display: flex;
  min-height: 58px;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid rgba(17, 25, 35, 0.13);
}

.directory-filters {
  display: flex;
  flex: 1;
  align-items: stretch;
}

.directory-filters button {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid rgba(17, 25, 35, 0.09);
  color: #59656e;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.directory-filters button::after {
  position: absolute;
  right: 50%;
  bottom: -1px;
  left: 50%;
  height: 2px;
  background: #315fae;
  content: "";
  transition: right 0.18s ease, left 0.18s ease;
}

.directory-filters button.active {
  color: #17212a;
  background: rgba(17, 25, 35, 0.04);
}

.directory-filters button.active::after {
  right: 22%;
  left: 22%;
}

.directory-filters button:focus:not(:focus-visible),
.directory-toggle:focus:not(:focus-visible) {
  outline: 0;
}

.directory-filters button:focus-visible,
.directory-toggle:focus-visible {
  outline: 1px solid #2b353e;
  outline-offset: -2px;
}

.directory-filters small {
  color: #8b959d;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  transition: color 0.18s ease;
}

.directory-filters button.active small {
  color: #59656e;
}

.directory-filters button:disabled {
  color: #a5adb3;
  background: transparent;
  cursor: default;
}

.directory-filters button:disabled::after {
  display: none;
}

.directory-status {
  display: flex;
  width: 150px;
  flex: 0 0 150px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-left: 1px solid rgba(17, 25, 35, 0.09);
  color: #7b868f;
  font-size: 10px;
  white-space: nowrap;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.directory-empty {
  display: flex;
  min-height: 132px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  color: #7b868f;
  font-size: 14px;
  letter-spacing: 0;
}

.directory-member {
  position: relative;
  z-index: 0;
  display: grid;
  overflow: hidden;
  min-width: 0;
  min-height: 64px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 0 17px;
  border-right: 1px solid rgba(17, 25, 35, 0.085);
  border-bottom: 1px solid rgba(17, 25, 35, 0.085);
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(0) saturate(1);
  transform: translateY(0);
  transition:
    color 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s cubic-bezier(0.2, 0.65, 0.2, 1);
}

.directory-member::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 255, 255, 0.18) 42%,
    rgba(204, 216, 225, 0.2) 100%
  );
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.directory-member > * {
  position: relative;
  z-index: 1;
}

.directory-member:nth-child(4n) {
  border-right: 0;
}

.directory-grid.is-filtered {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-grid.is-filtered .directory-member:nth-child(4n) {
  border-right: 1px solid rgba(17, 25, 35, 0.085);
}

.directory-grid.is-filtered .directory-member:nth-child(3n) {
  border-right: 0;
}

.directory-member strong {
  overflow: hidden;
  color: #25313a;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-member-role {
  color: #68747d;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 0.18s ease;
}

@media (min-width: 721px) and (hover: hover) and (pointer: fine) {
  .directory-platform-switch button:not(.active):hover {
    color: #202b34;
    background: rgba(17, 25, 35, 0.035);
  }

  .directory-filters button:hover {
    color: #1e2a34;
    background: rgba(17, 25, 35, 0.028);
  }

  .directory-filters button:hover::after {
    right: 34%;
    left: 34%;
  }

  .directory-filters button.active:hover::after {
    right: 22%;
    left: 22%;
  }

  .directory-filters button:hover small {
    color: #59656e;
  }

  .directory-member:hover {
    z-index: 2;
    border-color: rgba(255, 255, 255, 0.88);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(226, 234, 240, 0.58));
    backdrop-filter: blur(20px) saturate(1.35) contrast(1.04);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.96),
      inset 1px 0 0 rgba(255, 255, 255, 0.62),
      inset 0 -1px 0 rgba(112, 128, 140, 0.16),
      0 14px 34px rgba(21, 33, 43, 0.17),
      0 3px 10px rgba(21, 33, 43, 0.08);
    transform: translateY(-2px) scale(1.012);
  }

  .directory-member:hover::before {
    opacity: 1;
  }

  .directory-member:hover strong {
    color: #111923;
  }

  .directory-member:hover .directory-member-role {
    color: #3f4b54;
  }
}

.directory-toggle {
  display: none;
}

.directory-toggle[hidden] {
  display: none !important;
}

@media (min-width: 721px) and (max-width: 1100px) {
  .directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .directory-member:nth-child(4n) {
    border-right: 1px solid rgba(17, 25, 35, 0.085);
  }

  .directory-member:nth-child(3n) {
    border-right: 0;
  }

  .directory-filters button {
    min-width: 78px;
    padding-inline: 12px;
  }
}

@media (max-width: 720px) {
  .directory {
    padding-top: 56px;
    padding-bottom: 54px;
    background: #f8f9f7;
  }

  .directory .section-heading {
    margin-bottom: 30px;
  }

  .directory .section-heading-row {
    gap: 20px;
  }

  .directory .section-heading h2 {
    font-size: 36px;
    line-height: 1.12;
  }

  .directory .section-description {
    padding-top: 14px;
    border-top: 1px solid rgba(17, 25, 35, 0.12);
    font-size: 12px;
    line-height: 1.72;
  }

  .directory-platform-row {
    box-sizing: border-box;
    min-height: 52px;
    margin-bottom: 14px;
    padding-left: 0;
    padding-right: 0;
    border-radius: 14px;
  }

  .directory-platform-label {
    box-sizing: border-box;
    align-self: stretch;
    min-height: 100%;
    padding-left: 12px;
    border-left: 1px solid rgba(28, 45, 55, 0.16);
    font-size: 9px;
  }

  .directory-platform-switch {
    align-self: stretch;
    min-width: 0;
    width: min(72%, 236px);
  }

  .directory-platform-switch button {
    height: 100%;
    gap: 7px;
    padding: 0 10px;
    font-size: 11px;
  }

  .directory-overview > div {
    min-height: 78px;
    padding: 14px 12px;
    text-align: center;
  }

  .directory-overview > div:first-child {
    padding-left: 12px;
  }

  .directory-overview span {
    font-size: 9px;
  }

  .directory-overview strong {
    margin-top: 6px;
    font-size: 26px;
  }

  .directory-panel {
    margin-top: 24px;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .directory-toolbar {
    display: block;
  }

  .directory-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .directory-filters button {
    min-width: 0;
    min-height: 48px;
    gap: 7px;
    padding: 0 6px;
    border-right: 1px solid rgba(17, 25, 35, 0.085);
    border-bottom: 1px solid rgba(17, 25, 35, 0.085);
    font-size: 11px;
  }

  .directory-filters button:nth-child(3n) {
    border-right: 0;
  }

  .directory-filters button::after {
    bottom: -1px;
  }

  .directory-filters button.active::after {
    right: 28%;
    left: 28%;
  }

  .directory-status {
    width: auto;
    flex: none;
    min-height: 40px;
    justify-content: flex-end;
    padding: 0 14px;
    border-left: 0;
    font-size: 9px;
  }

  .directory-grid,
  .directory-grid.is-filtered {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-member,
  .directory-member:nth-child(3n),
  .directory-member:nth-child(4n) {
    min-height: 58px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 14px;
    border-right: 0;
  }

  .directory-member strong {
    font-size: 13px;
  }

  .directory-toggle {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border: 0;
    border-top: 1px solid rgba(17, 25, 35, 0.12);
    color: #28333c;
    background: #f3f5f5;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
  }

  .directory-toggle small {
    color: #7c8790;
    font-size: 9px;
    font-weight: 500;
  }
}

@media (prefers-reduced-motion: reduce) {
  .directory-filters button::after {
    transition: none;
  }
}

/* Match the upcoming-match board and player-card proportions. */
html body .directory-panel {
  overflow: hidden;
  border: 1px solid rgba(16, 23, 34, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 18px 44px rgba(24, 35, 44, 0.08),
    0 2px 8px rgba(24, 35, 44, 0.04);
}

@media (min-width: 721px) {
  html body .directory-grid,
  html body .directory-grid.is-filtered {
    gap: 10px;
    padding: 10px 24px 24px;
    background: #f7f8f7;
  }

  html body .directory-grid .directory-member,
  html body .directory-grid.is-filtered .directory-member,
  html body .directory-grid .directory-member:nth-child(3n),
  html body .directory-grid .directory-member:nth-child(4n),
  html body .directory-grid.is-filtered .directory-member:nth-child(3n),
  html body .directory-grid.is-filtered .directory-member:nth-child(4n) {
    min-height: 64px;
    padding: 0 16px;
    border: 1px solid rgba(16, 23, 34, 0.12);
    border-radius: 6px;
    background: rgba(248, 250, 250, 0.9);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.88),
      0 5px 16px rgba(25, 39, 50, 0.06);
  }

  html body .directory-grid .directory-member::before {
    border-radius: 5px;
  }
}

@media (max-width: 720px) {
  html body .directory-panel {
    border-radius: 14px;
    box-shadow:
      0 18px 44px rgba(24, 35, 44, 0.08),
      0 2px 8px rgba(24, 35, 44, 0.04);
  }

  html body .directory-grid,
  html body .directory-grid.is-filtered {
    gap: 8px;
    padding: 8px 10px 15px;
    background: #f1f3f2;
  }

  html body .directory-grid .directory-member,
  html body .directory-grid .directory-member:nth-child(3n),
  html body .directory-grid .directory-member:nth-child(4n),
  html body .directory-grid.is-filtered .directory-member:nth-child(3n),
  html body .directory-grid.is-filtered .directory-member:nth-child(4n) {
    min-height: 58px;
    padding: 0 14px;
    border: 1px solid rgba(16, 23, 34, 0.1);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(31, 48, 58, 0.08);
  }
}

/* Keep the mobile directory surface distinct from the warm section background. */
@media (max-width: 720px) {
  html body .directory {
    --directory-mobile-surface: #eef2f3;
  }

  html body .directory-platform-row {
    border-color: rgba(28, 45, 55, 0.12);
    background: var(--directory-mobile-surface);
  }

  html body .directory-panel {
    border-color: rgba(28, 45, 55, 0.13);
    background: var(--directory-mobile-surface);
  }

  html body .directory-grid,
  html body .directory-grid.is-filtered {
    background: var(--directory-mobile-surface);
  }

  html body .directory-toggle {
    background: var(--directory-mobile-surface);
  }

  html body .directory-grid .directory-member,
  html body .directory-grid .directory-member:nth-child(3n),
  html body .directory-grid .directory-member:nth-child(4n),
  html body .directory-grid.is-filtered .directory-member:nth-child(3n),
  html body .directory-grid.is-filtered .directory-member:nth-child(4n) {
    border-color: rgba(28, 45, 55, 0.1);
    background: #fff;
  }
}
