/**
 * Tournament Standings Plugin - Styles
 */

.tournament-standings {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.tournament-standings button {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Player item with avatar styling */
.player-info {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
}

.player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 12px;
  background: #0a0e17;
  overflow: hidden;
  flex-shrink: 0;
  object-fit: cover;
}

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

.player-name {
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-height: 2.6em;
}

/* List view styles */
.player-item {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 12px 16px;
  box-sizing: border-box;
  cursor: pointer;
  border-bottom: 1px solid #474647;
}

/* Default styling for rank */
.player-rank {
  margin-right: 1rem;
  font-weight: bold;
}

/* Header styling */
.list-header {
  display: flex;
  width: 100%;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-sizing: border-box;
  font-weight: bold;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Default header text alignment */
.list-header > div {
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-header > div:hover {
  background: #3c3b3c;
}

/* Default player header is left-aligned */
.header-player {
  text-align: left !important;
}

.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  margin-right: 4px;
}

/* Player details */
.player-details {
  display: none;
  padding: 16px;
}

.player-item.expanded {
  border: 1px solid #6ca6ea;
  border-bottom: 0px;
}

.player-item.expanded + .player-details {
  border: 1px solid #6ca6ea;
  border-top: 0px;
  display: block;
}

.player-item.expanded + .player-details:nth-child(odd) {
  background-color: #1e1e1e !important;
}

/* Card styles for avatar */
.card-avatar {
  width: 40px;
  height: 40px;
  max-width: none;
  border-radius: 50%;
  margin-right: 12px;
  background: #0a0e17;
  overflow: hidden;
  flex-shrink: 0;
  object-fit: cover;
}

.card-rank {
  font-weight: bold;
  font-size: 18px;
  margin-right: 12px;
}

/* Entries info */
.entries-info {.player-name {
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-height: 2.6em;
}
  font-size: 14px;
  text-align: right;
}

/* Responsive fixes - ensure the layout stays horizontal even on small screens */
@media (max-width: 576px) {
  /* Prevent wrapping of the row */
  .player-item {
    flex-wrap: nowrap;
    overflow-x: hidden;
  }
  
  /* Give the player column a reasonable min width */
  .player-info {
    min-width: 120px;
  }
  
  /* Handle player details layout */
  .player-details .row {
    flex-direction: column;
  }
  
  .player-details .col-md-6 {
    width: 100%;
  }
}