/* Fanta Tournament Selections Page Styles */

#selectionsList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  gap: 1.5rem;
}

.selections-filters {
  justify-content: flex-end;
}

.selections-filters-card {
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.match-card {
  border: 2px solid transparent !important;
  transition: all 0.2s ease;
}

.match-card:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.match-card-active {
  border-color: var(--green) !important;
  background: rgba(0, 255, 0, 0.08) !important;
  box-shadow: 0 0 0 1px var(--green), 0 8px 16px rgba(0, 0, 0, 0.25) !important;
}

.filters-title {
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.selection-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.selection-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.selection-header {
  background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.manager-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.manager-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
}

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

.manager-details h5 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.manager-details small {
  color: var(--text-soft);
}

.selection-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.selection-body {
  padding: 1.5rem;
}

.selection-tables {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.selection-table-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.selection-table-title {
  padding: 0.6rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.selection-table {
  margin: 0;
}

.selection-table thead th {
  font-size: 0.75rem;
  color: var(--text-soft);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.selection-table tbody td {
  font-size: 0.85rem;
  vertical-align: middle;
  border-top-color: rgba(255, 255, 255, 0.06);
}

.player-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.7rem;
}

.selection-table .col-role {
  padding-left: 0.75rem;
}

.selection-table .col-inout {
  width: 70px;
  text-align: center;
}

.selection-table .col-events {
  min-width: 170px;
}

.selection-table .col-player {
  min-width: 120px;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.75rem;
}

.player-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.player-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.player-card.starter {
  border-color: var(--green);
  background: rgba(0, 255, 0, 0.05);
}

.player-card.substitute {
  border-color: var(--warning);
  background: rgba(255, 193, 7, 0.05);
}

.player-number {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  margin: 0 auto 0.25rem;
}

.player-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.player-role {
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.role-g, .role_g { background-color: rgb(231 76 60) !important; color: #fff; }
.role-d, .role_d { background-color: rgb(169 138 16) !important; color: #111; }
.role-m, .role_m { background-color: rgb(15 106 38) !important; color: #fff; }
.role-f, .role_f { background-color: rgb(27 110 171) !important; color: #fff; }

.player-team {
  font-size: 0.6rem;
  color: var(--text-soft);
}

.position-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: bold;
  color: white;
}

.starter-badge {
  background: var(--green);
}

.substitute-badge {
  background: var(--warning);
}

.selection-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-soft);
}

@media (max-width: 768px) {
  .selections-filters {
    width: 100%;
    justify-content: flex-start;
  }

  .selections-filters #managerSearchInput,
  .selections-filters #sortSelect {
    flex: 1 1 100%;
    min-width: 0 !important;
  }

  #selectionsList {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .selection-table tbody td {
    font-size: 0.8rem;
  }

  .selection-table .col-team {
    width: 70px;
  }

  .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
  }
  
  .player-card {
    padding: 0.25rem;
  }
  
  .player-number {
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
  }
  
  .player-name {
    font-size: 0.6rem;
  }
  
  .player-role {
    font-size: 0.5rem;
    padding: 0.05rem 0.2rem;
  }
  
  .player-team {
    font-size: 0.5rem;
  }
}
