/* Sort indicators */
.sort-indicator {
  display: inline-block;
  margin-left: 5px;
  opacity: 0.7;
  transition: all 0.3s ease;
}

th[data-sortable="true"]:hover .sort-indicator {
  opacity: 1;
}

th[data-sort-direction="asc"] .sort-indicator,
th[data-sort-direction="desc"] .sort-indicator {
  opacity: 1;
  color: var(--rpl-blue);
}

/* Detailed view enhancements */
.standings-table.detailed-view td {
  padding: 20px 12px;
}

.standings-table.detailed-view .team-info img.team-logo {
  width: 48px;
  height: 48px;
}

.standings-table.detailed-view .team-info .team-name {
  font-size: 1.1rem;
}

.standings-table.detailed-view .position-badge {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
}

.standings-table.detailed-view .percentage-bar {
  height: 24px;
}

.standings-table.detailed-view .form-badge {
  width: 30px;
  height: 30px;
  font-size: 1rem;
}

/* Animation for row hover */
.standings-table tr {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.standings-table tr:hover {
  box-shadow: -5px 0 0 var(--rpl-blue);
  z-index: 5;
}

/* Animation for table initialization */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.standings-table tbody tr {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.standings-table tbody tr:nth-child(1) {
  animation-delay: 0.05s;
}
.standings-table tbody tr:nth-child(2) {
  animation-delay: 0.1s;
}
.standings-table tbody tr:nth-child(3) {
  animation-delay: 0.15s;
}
.standings-table tbody tr:nth-child(4) {
  animation-delay: 0.2s;
}
.standings-table tbody tr:nth-child(5) {
  animation-delay: 0.25s;
}
.standings-table tbody tr:nth-child(6) {
  animation-delay: 0.3s;
}
.standings-table tbody tr:nth-child(7) {
  animation-delay: 0.35s;
}
.standings-table tbody tr:nth-child(8) {
  animation-delay: 0.4s;
}
.standings-table tbody tr:nth-child(9) {
  animation-delay: 0.45s;
}
.standings-table tbody tr:nth-child(10) {
  animation-delay: 0.5s;
}
.standings-table tbody tr:nth-child(11) {
  animation-delay: 0.55s;
}
.standings-table tbody tr:nth-child(12) {
  animation-delay: 0.6s;
}
.standings-table tbody tr:nth-child(13) {
  animation-delay: 0.65s;
}
.standings-table tbody tr:nth-child(14) {
  animation-delay: 0.7s;
}
.standings-table tbody tr:nth-child(15) {
  animation-delay: 0.75s;
}
.standings-table tbody tr:nth-child(16) {
  animation-delay: 0.8s;
}

/* Tooltip styles */
[title] {
  position: relative;
  cursor: pointer;
}

/* Legend enhancements */
.rpl-positions-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(13, 44, 64, 0.7);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
}

.rpl-position-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rpl-position-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.rpl-position-champions {
  background: #2ecc71;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.rpl-position-continental {
  background: #3498db;
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.rpl-position-relegation {
  background: #e74c3c;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}
