/**
 * Bans List Page - Additional Styles
 * Styles for DLE template with pagination and search
 */

/* ============================================
   SEARCH FORM
   ============================================ */
.bans-search-wrapper {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--glass-border);
}

.bans-search-form {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.bans-search-input-group {
  position: relative;
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: center;
}

.bans-search-icon {
  position: absolute;
  left: 1rem;
  color: var(--muted-foreground);
  pointer-events: none;
  z-index: 1;
}

.bans-search-input {
  width: 100%;
  height: 48px;
  padding: 0 1rem 0 3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--foreground);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.bans-search-input::placeholder {
  color: var(--muted-foreground);
}

.bans-search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(226, 1, 205, 0.1);
}

.bans-search-btn {
  font-family: var(--main-font) !important;
  height: 48px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  color: var(--primary-foreground) !important;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
}

.bans-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(226, 1, 205, 0.4);
}

.bans-search-btn:active {
  transform: translateY(0);
}

.bans-search-btn svg {
  flex-shrink: 0;
}

/* ============================================
   TABLE WRAPPER
   ============================================ */
.bans-table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  margin-bottom: 2rem;
}

/* Custom scrollbar */
.bans-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

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

.bans-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.bans-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* ============================================
   TABLE
   ============================================ */
.bans-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

/* ============================================
   TABLE HEADER
   ============================================ */
.bans-table thead tr {
  background: linear-gradient(135deg, rgba(226, 1, 205, 0.15), rgba(31, 158, 158, 0.15));
  border-bottom: 2px solid var(--primary);
}

.bans-table thead tr th {
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--foreground);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ============================================
   TABLE BODY
   ============================================ */
.bans-table tbody tr {
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--glass-border);
}

.bans-table tbody tr:hover {
  background: rgba(226, 1, 205, 0.08);
  /* Убрали transform для предотвращения скролла */
}

.bans-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

.bans-table tbody tr:nth-child(even):hover {
  background: rgba(226, 1, 205, 0.08);
}

.bans-table tbody tr:last-child {
  border-bottom: none;
}

.bans-table tbody tr td {
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Player name styling */
.bans-table tbody tr td:first-child {
  font-weight: 600;
  color: var(--foreground);
}

/* Reason column - allow wrapping */
.bans-table tbody tr td:nth-child(3) {
  white-space: normal;
  max-width: 350px;
  word-wrap: break-word;
  text-align: left;
}

/* ============================================
   PAGINATION
   ============================================ */
.bans-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.bans-pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--foreground);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.bans-pagination-btn:hover {
  background: rgba(226, 1, 205, 0.15);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.bans-pagination-btn:active {
  transform: translateY(0);
}

.bans-pagination-btn svg {
  flex-shrink: 0;
}

/* Disabled state */
.bans-pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   PAGINATION PAGES
   ============================================ */
.bans-pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bans-pagination-pages a,
.bans-pagination-pages span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.bans-pagination-pages a:hover {
  background: rgba(226, 1, 205, 0.15);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Active page */
.bans-pagination-pages span,
.bans-pagination-pages a.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(226, 1, 205, 0.3);
}

/* Ellipsis */
.bans-pagination-pages .ellipsis {
  background: transparent;
  border: none;
  cursor: default;
  pointer-events: none;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.bans-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted-foreground);
}

.bans-empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
  opacity: 0.5;
  color: var(--muted-foreground);
}

.bans-empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.bans-empty-state p {
  margin: 0;
  color: var(--muted-foreground);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .bans-search-form {
    flex-direction: column;
  }
  
  .bans-search-input-group {
    min-width: auto;
  }
  
  .bans-search-btn {
    width: 100%;
    justify-content: center;
  }
  
  .bans-table-wrapper {
    margin-bottom: 1.5rem;
  }
  
  .bans-table {
    min-width: 600px;
  }
  
  .bans-table thead tr th {
    padding: 1rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .bans-table tbody tr td {
    padding: 1rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .bans-table tbody tr td:nth-child(3) {
    max-width: 250px;
  }
  
  .bans-pagination {
    gap: 0.25rem;
  }
  
  .bans-pagination-btn {
    width: 36px;
    height: 36px;
  }
  
  .bans-pagination-pages a,
  .bans-pagination-pages span {
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .bans-search-input {
    height: 44px;
    font-size: 0.95rem;
  }
  
  .bans-search-btn {
    height: 44px;
    padding: 0 1.5rem;
    font-size: 0.95rem;
  }
  
  .bans-table {
    min-width: 500px;
  }
  
  .bans-table thead tr th {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .bans-table tbody tr td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }
  
  .bans-table tbody tr td:nth-child(3) {
    max-width: 200px;
    font-size: 0.8rem;
  }
  
  .bans-pagination-btn {
    width: 32px;
    height: 32px;
  }
  
  .bans-pagination-pages a,
  .bans-pagination-pages span {
    min-width: 32px;
    height: 32px;
    padding: 0 0.4rem;
    font-size: 0.85rem;
  }
  
  /* Hide first/last buttons on mobile */
  .bans-pagination-first,
  .bans-pagination-last {
    display: none;
  }
}

/* ============================================
   DARK THEME ADJUSTMENTS
   ============================================ */
[data-theme="dark"] .bans-search-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .bans-search-input:focus {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bans-table tbody tr {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .bans-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .bans-table tbody tr:hover {
  background: rgba(226, 1, 205, 0.08);
}

[data-theme="dark"] .bans-pagination-btn {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .bans-pagination-pages a,
[data-theme="dark"] .bans-pagination-pages span:not(.active) {
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   LOADING STATE
   ============================================ */
.bans-table-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.bans-table-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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


/* ============================================
   TABLE ROW SPECIFIC STYLES
   ============================================ */
.bans-table-row {
  transition: all 0.3s ease;
}

.bans-table-row:hover {
  background: rgba(226, 1, 205, 0.08) !important;
}

/* Player and Moderator Links */
.bans-player-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
  display: inline-block;
}

.bans-moderator-link {
  color: var(--destructive);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
  display: inline-block;
}

.bans-player-link:hover,
.bans-moderator-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  transform: translateY(-1px);
}

/* Reason cell */
.bans-table-reason {
  color: var(--muted-foreground) !important;
  line-height: 1.5;
}

/* Date cells */
.bans-table-date,
.bans-table-unban {
  /* font-family: 'Courier New', monospace; */
  font-size: 0.9em;
  color: var(--muted-foreground) !important;
}

/* Permanent ban styling */
.bans-table-unban:contains("Навсегда"),
.bans-table-unban:contains("Permanent"),
.bans-table-unban:contains("Never") {
  color: var(--destructive) !important;
  font-weight: 600;
}

/* ============================================
   PAGINATION PAGE NUMBERS STYLING
   ============================================ */
.bans-pagination-pages a[href*="/bans/page/"] {
  font-weight: 500;
}

.bans-pagination-pages a[href*="/bans/page/"]:hover {
  background: rgba(226, 1, 205, 0.15);
  border-color: var(--primary);
}

/* Current page indicator (if using class) */
.bans-pagination-pages .current-page,
.bans-pagination-pages a[style*="background"] {
  background: rgba(255, 255, 255, 0.1) !important;
  /* background: linear-gradient(135deg, var(--primary), var(--secondary)) !important; */
  border-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(226, 1, 205, 0.3) !important;
  pointer-events: none;
  /* background: rgba(255, 255, 255, 0.1); */
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
}

/* ============================================
   RULE LINKS IN REASON COLUMN
   ============================================ */
.bans-rule-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  background: rgba(226, 1, 205, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(226, 1, 205, 0.2);
  transition: all 0.2s ease;
  margin: 0 0.125rem;
}

.bans-rule-link:hover {
  background: rgba(226, 1, 205, 0.2);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(226, 1, 205, 0.3);
}

.bans-rule-link:active {
  transform: translateY(0);
}

/* Separator styling in reasons */
.bans-table-reason {
  color: var(--muted-foreground) !important;
  line-height: 1.6;
}
