/* Container styles */
.rankings-wrapper {
  width: 100%;
  padding: 1rem;
}

.rankings-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Filter styles */
.rankings-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .rankings-filters {
    grid-template-columns: 1fr 1fr;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
}

.filter-select {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: white;
  font-size: 0.875rem;
}

/* Table styles */
.rankings-table-wrapper {
  position: relative;
  margin-top: 1rem;
}

.rankings-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1rem;
  max-height: 600px;
  overflow-y: auto;
  position: relative;
}

@media (min-width: 768px) {
  .rankings-scroll {
    margin: 0;
  }
}

.rankings-table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  position: relative;
}

.rankings-table th,
.rankings-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.rankings-table th {
  background-color: #f9fafb;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #6b7280;
}

.rankings-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f9fafb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rankings-table td {
  font-size: 0.875rem;
  color: #374151;
}

.column-name {
  font-weight: 500;
}

/* Mobile scroll indicators */
.scroll-indicator-mobile {
  display: none;
}

@media (max-width: 767px) {
  .scroll-indicator-mobile {
    display: block;
    position: relative;
    margin-bottom: 0.5rem;
  }

  .scroll-shadow-left,
  .scroll-shadow-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1rem;
    pointer-events: none;
    z-index: 1;
  }

  .scroll-shadow-left {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
  }

  .scroll-shadow-right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
  }

  .scroll-hint {
    text-align: center;
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
  }
}

/* Loading states */
.rankings-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 10;
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.rankings-fade {
  opacity: 0.5;
  transition: opacity 0.2s;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Messages */
.rankings-empty {
  text-align: center;
  padding: 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.rankings-error {
  padding: 1rem;
  background-color: #fee2e2;
  border-radius: 0.375rem;
  color: #dc2626;
  font-size: 0.875rem;
  margin: 1rem 0;
}