/* League Table Enhancement Styles */
.standings-section {
  position: relative;
  overflow: hidden;
  padding: 60px 0;
}

/* Tabs and filters */
.standings-tabs {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.season-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 15px;
  border-radius: 30px;
  color: white;
}

.season-selector span {
  font-weight: 600;
}

.season-select {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
}

.season-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.standings-table-wrapper {
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  /* max-height: 600px; */
  overflow-y: auto;
  position: relative;
  overflow-x: hidden;
}

.table-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 15px;
}

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

.btn-table-filter,
.btn-table-view {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-table-filter:hover,
.btn-table-view:hover {
  background: rgba(0, 0, 0, 0.1);
}

.btn-table-filter.active,
.btn-table-view.active {
  background: linear-gradient(135deg, #1a5276 0%, #3498db 100%);
  color: white;
}

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

.btn-table-view {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
}

.standings-table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.standings-table-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.standings-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.standings-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.rpl-standings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

.rpl-standings-table th {
  color: white;
  padding: 15px 10px;
  text-align: center;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.rpl-standings-table th:first-child {
  border-top-left-radius: 8px;
}

.rpl-standings-table th:last-child {
  border-top-right-radius: 8px;
}

.rpl-standings-table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.rpl-standings-table .team-column {
  text-align: left;
  min-width: 180px;
}

.rpl-standings-table .team-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  flex-direction: row;
}

.rpl-standings-table .team-info img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: contain;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.rpl-standings-table tr {
  transition: all 0.3s ease;
}

.rpl-standings-table tr:hover {
  background-color: rgba(52, 152, 219, 0.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.rpl-standings-table tr.champions-league {
  /* background-color: rgba(39, 174, 96, 0.1); */
  background-color: rgba(39, 174, 96, 0.15);
}

.rpl-standings-table tr.champions-league:hover {
  background-color: rgba(39, 174, 96, 0.15);
}
.rpl-standings-table tr {
  cursor: pointer;
}
.rpl-standings-table tr.continental {
  background-color: rgba(52, 152, 219, 0.1);
}

.rpl-standings-table tr.continental:hover {
  background-color: rgba(52, 152, 219, 0.15);
}

.rpl-standings-table tr.relegation {
  background-color: rgba(231, 76, 60, 0.1);
}

.rpl-standings-table tr.relegation:hover {
  background-color: rgba(231, 76, 60, 0.15);
}

.form-column {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.form-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: white;
}

.form-w {
  background-color: #27ae60;
}

.form-d {
  background-color: #f39c12;
}

.form-l {
  background-color: #e74c3c;
}

.standings-info {
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.rpl-positions-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.rpl-position-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: white;
}

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

.rpl-position-champions {
  background-color: rgba(39, 174, 96, 0.8);
}

.rpl-position-continental {
  background-color: rgba(52, 152, 219, 0.8);
}

.rpl-position-relegation {
  background-color: rgba(231, 76, 60, 0.8);
}

.standings-summary {
  display: flex;
  flex-direction: column;
  gap: 15px;
  color: white;
}

.summary-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 8px;
}

.summary-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 5px;
}

.summary-value {
  font-size: 1rem;
  font-weight: 600;
}

.btn-view-full-standings {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1a5276 0%, #3498db 100%);
  color: white;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-view-full-standings:hover {
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-view-full-standings i {
  transition: transform 0.3s ease;
}

.btn-view-full-standings:hover i {
  transform: translateX(5px);
}

/* Detailed view styles */
.rpl-standings-table.detailed-view td {
  padding: 15px 10px;
}

.rpl-standings-table.detailed-view .team-info {
  gap: 15px;
}

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

.form-indicator {
  display: flex;
  gap: 4px;
}

.form-badge {
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.form-badge.w {
  background-color: #28a745;
}

.form-badge.d {
  background-color: #ffc107;
}

.form-badge.l {
  background-color: #dc3545;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .rpl-standings-table {
    font-size: 0.85rem;
  }

  .rpl-standings-table td,
  .rpl-standings-table th {
    padding: 10px 6px;
  }

  .rpl-standings-table .team-column {
    min-width: 150px;
  }

  .rpl-positions-legend {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .standings-tabs {
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }

  .table-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .standings-table-wrapper {
    border-radius: 8px;
    padding: 10px;
  }

  .rpl-standings-table {
    font-size: 0.8rem;
  }

  .rpl-standings-table .team-info img {
    width: 25px;
    height: 25px;
  }

  .form-indicator {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  .btn-table-filter {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .table-filter {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 576px) {
  .standings-section {
    padding: 40px 0;
  }

  .rpl-section-title {
    font-size: 1.5rem;
  }

  .standings-table-wrapper {
    padding: 8px;
    margin-top: 10px;
  }

  .season-selector {
    width: 100%;
    justify-content: space-between;
  }
}
