/**
 * @file
 * Shared Grid.js table styling for consistent appearance across all pages.
 * This file provides uniform styling for Grid.js tables used throughout the clubguests module.
 */

/* Grid.js table container styling */
.clubs-table-container {
  margin-top: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Grid.js table styling - applies to all Grid.js tables */
.gridjs-wrapper {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gridjs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* Grid.js header styling - consistent light theme */
.gridjs-thead,
.clubs-table-header {
  background-color: #f7fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

.gridjs-th,
.clubs-table-header th,
.gridjs-table thead th {
  padding: 16px 12px !important;
  text-align: left !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  text-transform: uppercase !important;
  font-size: 12px !important;
  letter-spacing: 0.05em !important;
  background-color: #f7fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
  border-top: none !important;
}

/* Override Bootstrap table-dark specifically for Grid.js tables */
.clubs-table .table-dark,
.clubs-table .table-dark th,
.reciprocal-clubs-table .table-dark,
.reciprocal-clubs-table .table-dark th {
  background-color: #f7fafc !important;
  color: #2d3748 !important;
}

/* Grid.js body styling - target both Grid.js and Bootstrap classes */
.gridjs-tbody .gridjs-tr,
.gridjs-table tbody tr,
.table-striped tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s ease;
}

.gridjs-tbody .gridjs-tr:hover,
.gridjs-table tbody tr:hover,
.table-hover tbody tr:hover {
  background-color: #f7fafc !important;
}

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

.gridjs-td,
.gridjs-table tbody td,
.table tbody td {
  padding: 16px 12px !important;
  vertical-align: top;
  color: #4a5568 !important;
}

/* Club name cell styling - for tables with club links */
.club-name-cell,
.gridjs-td .club-name-link {
  font-weight: 600;
  color: #1a365d !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.club-name-cell a,
.gridjs-td .club-name-link:hover {
  color: #4299e1 !important;
  text-decoration: underline;
}

.club-name-cell {
  max-width: 250px;
  word-wrap: break-word;
}

/* City, state, country cells */
.club-city-cell,
.club-state-cell,
.club-country-cell {
  color: #4a5568;
}

.empty-cell {
  color: #a0aec0;
  font-style: italic;
}

/* Grid.js search styling */
.gridjs-search {
  margin-bottom: 20px;
}

.gridjs-search-input {
  width: 100%;
  padding: 12px 20px;
  font-size: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 25px;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.gridjs-search-input:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Grid.js pagination styling */
.gridjs-pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.gridjs-pagination .gridjs-pages {
  display: flex;
  gap: 5px;
}

.gridjs-pagination button {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #4a5568;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gridjs-pagination button:hover {
  background-color: #f7fafc;
  border-color: #4299e1;
}

.gridjs-pagination button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.gridjs-pagination .gridjs-currentPage {
  background-color: #4299e1 !important;
  color: white !important;
  border-color: #4299e1 !important;
}

/* Grid.js summary text */
.gridjs-summary {
  text-align: center;
  margin-bottom: 15px;
  color: #4a5568;
  font-size: 14px;
  font-weight: 500;
}

/* No results styling */
.gridjs-notfound {
  text-align: center;
  padding: 80px 20px;
  color: #4a5568;
  font-size: 18px;
}

/* Loading state */
.gridjs-loading {
  text-align: center;
  padding: 60px 20px;
  color: #4a5568;
  font-size: 18px;
}

/* Responsive design */
@media (max-width: 768px) {
  .gridjs-th,
  .gridjs-td {
    padding: 12px 8px !important;
    font-size: 13px !important;
  }
  
  .gridjs-search-input {
    font-size: 14px;
    padding: 10px 15px;
  }
  
  .club-name-cell {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .gridjs-th,
  .gridjs-td {
    padding: 8px 6px !important;
    font-size: 12px !important;
  }
  
  .gridjs-th {
    font-size: 11px !important;
  }
  
  .club-name-cell {
    max-width: 150px;
  }
}
