/* Enhanced Rwanda Premier League Standings Table Styles */

/* Table Container */
.standings-table-wrapper {
  position: relative;
  margin-bottom: 40px;
  background: rgba(13, 44, 64, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* Table Filter Controls */
.table-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.table-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-table-filter {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-table-filter:hover, 
.btn-table-filter.active {
  background: rgba(52, 152, 219, 0.2);
  color: var(--rpl-blue);
  border-color: rgba(52, 152, 219, 0.3);
}

.table-view-options {
  display: flex;
  gap: 10px;
}

.btn-table-view {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-table-view:hover,
.btn-table-view.active {
  background: rgba(52, 152, 219, 0.2);
  color: var(--rpl-blue);
  border-color: rgba(52, 152, 219, 0.3);
}

/* Standings Table */
.standings-table {
  width: 100%;
  color: white;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.standings-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.standings-table th {
  background-color: rgba(26, 82, 118, 0.8);
  color: var(--rpl-light);
  font-weight: 600;
  text-transform: uppercase;
  padding: 15px 10px;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.5);
  letter-spacing: 0.5px;
  position: relative;
  transition: all 0.3s ease;
}

.standings-table th:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.7), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.standings-table th:hover:after {
  transform: scaleX(1);
}

.standings-table td {
  padding: 16px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  font-weight: 500;
}

.standings-table tr {
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.standings-table tr:hover td {
  background-color: rgba(52, 152, 219, 0.1);
}

.standings-table tr:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: transparent;
  transition: all 0.3s ease;
}

.standings-table tr:hover:before {
  background: var(--rpl-blue);
}

/* Position Column */
.position-column {
  width: 60px;
  position: relative;
}

.position-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-weight: 700;
  color: white;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding-top:5px;
}

tr.champions-league .position-badge {
  background: rgba(46, 204, 113, 0.2);
  border-color: rgba(46, 204, 113, 0.5);
  color: #2ecc71;
}

tr.continental .position-badge {
  background: rgba(52, 152, 219, 0.2);
  border-color: rgba(52, 152, 219, 0.5);
  color: #3498db;
}

tr.relegation .position-badge {
  background: rgba(231, 76, 60, 0.2);
  border-color: rgba(231, 76, 60, 0.5);
  color: #e74c3c;
}

tr:hover .position-badge {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Win Percentage Column */
.win-percentage {
  width: 120px;
}

.percentage-bar {
  position: relative;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.percentage-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.5), rgba(52, 152, 219, 0.8));
  border-radius: 10px;
  transition: all 0.3s ease;
}

tr:hover .percentage-fill {
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.7), rgba(52, 152, 219, 1));
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.percentage-bar span {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Points Column */
.points-column {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--rpl-light);
  position: relative;
}

tr:hover .points-column {
  color: var(--rpl-blue);
}

/* Goal Difference */
.goal-diff {
  position: relative;
}

.goal-diff.positive {
  color: #2ecc71;
}

.goal-diff.negative {
  color: #e74c3c;
}

/* Team Info */
.team-column {
  width: 250px;
  text-align: left;
}

.team-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 10px;
}

.team-info img.team-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 3px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.standings-table tr:hover .team-info img {
  transform: scale(1.1);
  border-color: var(--rpl-blue);
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.team-info .team-name {
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.standings-table tr:hover .team-info .team-name {
  color: var(--rpl-blue);
}
  transition: color 0.3s ease;
  text-align: left;
  font-size: 1rem;
  letter-spacing: 0.2px;
}

.standings-table tr:hover .team-info span {
  color: var(--rpl-blue);
}

/* Highlight Points Column */
.standings-table td:nth-child(10) {
  font-weight: 700;
  color: var(--rpl-yellow);
  font-size: 1.1rem;
  text-shadow: 0 0 10px rgba(253, 210, 22, 0.3);
}


/* Position indicators */
.standings-table td:first-child {
  font-weight: 700;
  position: relative;
  overflow: hidden;
  font-size: 1.1rem;
  width: 50px;
}

.standings-table td:first-child:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  z-index: 0;
}

.standings-table tr.champions-league td:first-child:before {
  background-color: #2ecc71;
}

.standings-table tr.continental td:first-child:before {
  background-color: #3498db;
}

.standings-table tr.relegation td:first-child:before {
  background-color: #e74c3c;
}

/* Win percentage styling */
.standings-table td:last-child {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

/* League legend */
.league-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.champions-color {
  background-color: #2ecc71;
}

.continental-color {
  background-color: #3498db;
}

.relegation-color {
  background-color: #e74c3c;
}

/* Form Indicators */
.form-indicator {
  display: flex;
  justify-content: center;
  gap: 4px;
  width:30px;
  height:30px;
}

.form-indicator.large {
  gap: 12px;
  margin: 15px 0;
}

.form-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  padding: 10px;
}

.form-badge:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-badge:hover:after {
  opacity: 1;
}

.form-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.form-indicator.large .form-badge {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
  0% {
    transform: scale(1);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  }
}

.form-badge.w {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
}

.form-badge.d {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
}

.form-badge.l {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

/* Detailed View Mode */
.standings-table.detailed-view td {
  padding: 20px 10px;
}

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

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

.standings-table.detailed-view .form-badge {
padding: 12px;
  font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .team-column {
    width: auto;
  }
  
  .standings-table th, 
  .standings-table td {
    padding: 12px 8px;
    font-size: 0.9rem;
  }
  
  .team-info {
    gap: 8px;
  }
  
  .team-info img {
    width: 30px;
    height: 30px;
  }
  
  .form-badge {
    padding:15px;
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .table-actions {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .standings-table th:nth-child(5),
  .standings-table th:nth-child(6),
  .standings-table th:nth-child(7),
  .standings-table th:nth-child(8),
  .standings-table td:nth-child(5),
  .standings-table td:nth-child(6),
  .standings-table td:nth-child(7),
  .standings-table td:nth-child(8) {
    display: none;
  }
}
