/**
 * Page Roster - Dark mode table layout
 * Unations FC
 */
.roster-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
}

/* Roster is always dark mode */
.roster-page[data-bs-theme="dark"] {
  background: #0f0f12;
}

.roster-header {
  margin-bottom: 1.25rem;
}

.roster-header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.roster-header__brand {
  flex: 1;
  min-width: 0;
}

.roster-search-wrap {
  position: relative;
  width: 100%;
  max-width: 280px;
  flex-shrink: 0;
}

.roster-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  font-size: 1rem;
  pointer-events: none;
}

.roster-search {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  font-size: 0.9rem;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #e8e8ea;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.roster-search::placeholder {
  color: #6b7280;
}

.roster-search:focus {
  outline: none;
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.15);
}

.roster-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.1rem 0;
  color: #fff;
}

.roster-subtitle {
  font-size: 0.9rem;
  color: #adb5bd;
  margin: 0;
}

.roster-table-wrap {
  background: #1a1a1e;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
}

.roster-th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #adb5bd;
  background: #25252a;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.roster-th--num {
  width: 48px;
  text-align: center;
}

.roster-th--player {
  min-width: 200px;
}

.roster-th--position {
  min-width: 160px;
}

.roster-th--nation {
  min-width: 100px;
}

.roster-th--age {
  width: 56px;
  text-align: center;
}

.roster-th--link {
  width: 56px;
  text-align: center;
}

.roster-row {
  transition: background 0.2s;
}

.roster-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.roster-td {
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
  color: #e8e8ea;
}

.roster-row:last-child .roster-td {
  border-bottom: none;
}

.roster-td--num {
  font-weight: 600;
  color: #adb5bd;
  text-align: center;
}

.roster-player-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  transition: color 0.2s;
}

.roster-player-link:hover {
  color: #f87171;
}

.roster-player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #25252a;
}

.roster-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roster-player-name {
  line-height: 1.3;
}

.roster-td--position {
  font-weight: 500;
}

.roster-td--nation {
  color: #adb5bd;
}

.roster-td--age {
  text-align: center;
  color: #adb5bd;
}

.roster-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #adb5bd;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.roster-link-btn:hover {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
  transform: translateX(2px);
}

/* Position-based row accent */
.roster-row--gk .roster-td--position { color: #f87171; font-weight: 600; }
.roster-row--def .roster-td--position { color: #fbbf24; font-weight: 600; }
.roster-row--mid .roster-td--position { color: #4ade80; font-weight: 600; }
.roster-row--fwd .roster-td--position { color: #60a5fa; font-weight: 600; }
.roster-row--other .roster-td--position { color: #adb5bd; }

.roster-empty,
.roster-no-results {
  margin: 1rem 0 0;
  color: #adb5bd;
  text-align: center;
}

@media (max-width: 768px) {
  .roster-header__top {
    flex-direction: column;
    align-items: stretch;
  }

  .roster-search-wrap {
    max-width: none;
  }

  .roster-table-wrap {
    overflow-x: auto;
  }

  .roster-table {
    min-width: 560px;
  }

  .roster-th,
  .roster-td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .roster-player-avatar {
    width: 36px;
    height: 36px;
  }
}
