/* Teams page: header, one toolbar (search, men / women, sort, league chips) and a grid of team cards.
   The cards are the shared team card (partials/teamCard.php, css/pages/team-cards.css).
   Plain CSS served as-is (not part of the gulp site.min.css bundle). */

.tp {
  --tp-glass: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  --tp-line: rgba(255, 255, 255, 0.1);
  --tp-fg-2: rgba(255, 255, 255, 0.78);
  --tp-fg-3: rgba(255, 255, 255, 0.5);
  --tp-accent: #5cf8db;
  --tp-ink: #0b1d1a;
  --tp-display: "DINPro-Cond-Bold", "DINPro-Cond", "Barlow Condensed", "Arial Narrow", sans-serif;
  display: grid;
  gap: 14px;
  padding-top: 16px;
  padding-bottom: 32px;
  color: #fff;
}

/* header */
.tp-head {
  position: relative;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.tp-head h1 {
  margin: 0;
  font-family: var(--tp-display);
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
}
.tp-head h1 small {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--tp-fg-3);
}
.tp-ad:empty {
  display: none;
}

/* menus (same component as the players list and player page) */
.tp .pl-menu {
  position: relative;
}
.tp .pl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  cursor: pointer;
}
.tp .pl-btn:hover,
.tp .pl-btn:focus-visible,
.tp .pl-menu.open .pl-btn {
  color: #fff;
  border-color: var(--tp-accent);
  outline: none;
}
.tp .pl-btn > i:first-child {
  color: var(--tp-accent);
}
.tp .pl-btn strong {
  font-weight: 700;
  color: #fff;
}
.tp .pl-caret {
  font-size: 9px;
  opacity: 0.6;
  transition: transform 0.15s;
}
.tp .pl-menu.open .pl-caret {
  transform: rotate(180deg);
}
.tp .pl-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000;
  display: none;
  min-width: 170px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  background: #1a1a40;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
.tp .pl-pop-right {
  right: 0;
  left: auto;
}
.site-dark-skin .tp .pl-pop {
  background: #1c1c1c;
}
.tp .pl-menu.open .pl-pop {
  display: block;
}
.tp .pl-opt {
  display: block;
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  text-align: left;
  color: #fff;
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.tp .pl-opt:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.tp .pl-opt.active {
  font-weight: 700;
  background: rgba(92, 248, 219, 0.12);
  box-shadow: inset 3px 0 0 var(--tp-accent);
}

/* toolbar */
.tp-bar {
  position: relative;
  z-index: 20;
  display: grid;
  gap: 12px;
  padding: 12px;
  background: var(--tp-glass);
  border: 1px solid var(--tp-line);
  border-radius: 14px;
}
.tp-bar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.tp-search {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin: 0;
  padding: 0 12px;
  color: var(--tp-fg-3);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
}
.tp-search:focus-within {
  border-color: var(--tp-accent);
}
.tp-search input {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #fff;
  background: none;
  border: 0;
  outline: none;
}
.tp-search input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.tp-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.tp-chips::-webkit-scrollbar {
  display: none;
}
.tp-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px 0 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--tp-fg-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  cursor: pointer;
}
.tp-chip[hidden] {
  display: none;
}
.tp-chip-all {
  padding-left: 12px;
}
.tp-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.tp-chip:hover {
  color: #fff;
  border-color: rgba(92, 248, 219, 0.45);
}
.tp-chip[aria-pressed="true"] {
  color: #fff;
  background: rgba(92, 248, 219, 0.14);
  border-color: var(--tp-accent);
}
.tp-count {
  padding: 0 4px;
  font-size: 13px;
  color: var(--tp-fg-3);
}
.tp-count b {
  color: #fff;
}

/* grid (team card styles: team-cards.css) */
.tp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.tp-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 30px 0;
  text-align: center;
  color: var(--tp-fg-3);
}
.tp-more {
  justify-self: center;
  padding: 0 22px !important;
}
.tp-more[hidden] {
  display: none !important;
}
@media (max-width: 1199.98px) {
  .tp-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 991.98px) {
  .tp-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 575.98px) {
  .tp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .tp-sort {
    flex: 1 1 auto;
  }
  .tp-sort .pl-btn {
    width: 100%;
    justify-content: center;
  }
}
