/* ═══════════════════════════════════════════
   ROSTER STYLES — Hawkeye Fan Zone
   Tactical theme roster table
   ═══════════════════════════════════════════ */

/* Loading & Error States */
.roster-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--iowa-gold, #ffcd00);
}

.roster-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 205, 0, 0.15);
  border-top-color: var(--iowa-gold, #ffcd00);
  border-radius: 50%;
  animation: rosterSpin 0.8s linear infinite;
}

@keyframes rosterSpin {
  to {
    transform: rotate(360deg);
  }
}

.roster-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* Header Bar */
.roster-header-bar {
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 205, 0, 0.1);
  padding: 1rem 1.5rem;
}

.roster-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.roster-meta-item strong {
  color: var(--iowa-gold, #ffcd00);
  margin-right: 0.5rem;
}

/* Controls Bar */
.roster-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 205, 0, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.roster-search-wrap {
  position: relative;
  flex: 0 1 280px;
  min-width: 180px;
}

.roster-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: rgba(255, 205, 0, 0.4);
  pointer-events: none;
}

.roster-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 205, 0, 0.2);
  border-radius: 2px;
  padding: 0.5rem 0.75rem 0.5rem 2.2rem;
  color: #fff;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 1px;
  outline: none;
  transition: all 0.3s;
}

.roster-search:focus {
  border-color: var(--iowa-gold, #ffcd00);
  box-shadow: 0 0 12px rgba(255, 205, 0, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.roster-search::placeholder {
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.roster-filter-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}

.roster-filter-btn {
  background: transparent;
  border: 1px solid rgba(255, 205, 0, 0.2);
  color: rgba(255, 255, 255, 0.45);
  padding: 0.3rem 0.8rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.25s;
  white-space: nowrap;
}

.roster-filter-btn:hover {
  border-color: rgba(255, 205, 0, 0.5);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 205, 0, 0.05);
}

.roster-filter-btn.active {
  background: var(--iowa-gold, #ffcd00);
  color: #000;
  border-color: var(--iowa-gold, #ffcd00);
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255, 205, 0, 0.3);
}

/* Table Wrapper */
.roster-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 65vh;
}

/* Roster Table */
.roster-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.roster-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.roster-table thead tr {
  border-bottom: 2px solid rgba(255, 205, 0, 0.25);
}

.roster-table th {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--iowa-gold, #ffcd00);
  padding: 0.8rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

.roster-th-num {
  text-align: center !important;
  width: 50px;
}

.roster-th-photo {
  width: 50px;
}

.roster-th-pos {
  width: 70px;
}

/* Table Rows */
.roster-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
  animation: rosterRowFadeIn 0.4s ease forwards;
  opacity: 0;
}

@keyframes rosterRowFadeIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.roster-row:hover {
  background: rgba(255, 205, 0, 0.06);
}

.roster-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.roster-row:nth-child(even):hover {
  background: rgba(255, 205, 0, 0.06);
}

.roster-table td {
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  vertical-align: middle;
}

/* Jersey Number */
.roster-td-num {
  text-align: center;
}

.roster-jersey {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 205, 0, 0.3);
  border-radius: 2px;
  font-family: "Anton", sans-serif;
  font-size: 1rem;
  color: var(--iowa-gold, #ffcd00);
  background: rgba(255, 205, 0, 0.06);
  text-shadow: 0 0 6px rgba(255, 205, 0, 0.2);
}

/* Player Name */
.roster-td-name {
  font-weight: 600;
  color: #fff !important;
  white-space: nowrap;
  font-family: "Roboto", sans-serif;
  font-size: 0.9rem;
}

/* Position Badge */
.roster-pos-badge {
  display: inline-block;
  background: rgba(255, 205, 0, 0.1);
  border: 1px solid rgba(255, 205, 0, 0.2);
  color: var(--iowa-gold, #ffcd00);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
  font-weight: 700;
}

/* Headshot */
.roster-td-photo {
  padding: 0.3rem 0.5rem;
}

.roster-headshot-wrap {
  width: 40px;
  height: 40px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 205, 0, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.roster-headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.roster-row:hover .roster-headshot {
  transform: scale(1.1);
}

.roster-headshot-fallback {
  opacity: 0.4;
  filter: grayscale(1);
}

/* Hometown */
.roster-td-hometown {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.45) !important;
}

/* Year / Class */
.roster-td-yr {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* Empty State */
.roster-empty {
  text-align: center;
  padding: 3rem 1rem !important;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

/* Timestamp */
.roster-timestamp {
  padding: 0.75rem 1.5rem;
  text-align: right;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }

  .roster-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .roster-search-wrap {
    flex: 1 1 100%;
  }

  .roster-filter-wrap {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }

  .roster-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .roster-td-name {
    font-size: 0.8rem;
  }

  .roster-jersey {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .roster-headshot-wrap {
    width: 32px;
    height: 32px;
  }

  .roster-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .roster-th-ht,
  .roster-td-ht {
    display: none;
  }
}

/* Roster Grid View styles */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
}

.roster-card {
  display: flex;
  background: #ffffff;
  border: 1px solid var(--iowa-gold, #ffcd00);
  border-radius: 4px;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  color: #000;
  min-height: 90px;
  animation: rosterRowFadeIn 0.4s ease forwards;
  opacity: 0;
}

.roster-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 205, 0, 0.3);
}

.roster-card-jersey {
  background: var(--iowa-gold, #ffcd00);
  color: #000;
  width: 56px;
  min-width: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Anton", sans-serif;
  font-size: 2rem;
  padding: 0 5px;
}

.roster-card-photo {
  width: 80px;
  min-width: 80px;
  background: #111;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.roster-card-photo img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.roster-card-info {
  flex: 1;
  padding: 0.75rem 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
}

.roster-card-name {
  font-family: "Anton", sans-serif;
  font-size: 1.15rem;
  text-transform: uppercase;
  line-height: 1.1;
  color: #000;
  margin-bottom: 0.1rem;
}

.roster-card-meta {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  font-weight: bold;
  color: #444;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.roster-card-detail {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  color: #666;
}

.roster-card-hometown {
  font-size: 0.7rem;
  color: #888;
  margin-top: auto;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .roster-grid {
    grid-template-columns: 1fr;
  }
}
