/* Container styling */
.table-container {
  margin: 20px;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Alphabet tabs styling */
.alphabet-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
  justify-content: space-between;
}

.alphabet-tabs button {
  flex: 1 0 3.33%; /* Each button will take up approximately 1/30th of the width */
  margin: 3px 0;
  padding: 0;
  background: none;
  border: none;
  color: #007bff;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  transition: color 0.3s ease;
}

.alphabet-tabs button:hover,
.alphabet-tabs button.active {
  color: #0056b3;
}

/* Table controls styling */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.table-controls div {
  margin: 5px 0;
}

.table-controls select,
.table-controls input {
  padding: 5px;
  font-size: 14px;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  position: relative; /* For the sorting arrows */
}

th {
  background-color: #d9edf7;
  font-weight: bold;
}

th.sortable {
  cursor: pointer;
  padding-right: 20px; /* Space for the sorting arrows */
}

th.sortable::after {
  content: "↕"; /* Unicode for up/down arrow */
  position: absolute;
  right: 5px;
}

th.sorted-asc::after {
  content: "↑"; /* Unicode for up arrow */
  position: absolute;
  right: 5px;
}

th.sorted-desc::after {
  content: "↓"; /* Unicode for down arrow */
  position: absolute;
  right: 5px;
}

tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

tbody tr:nth-child(even) {
  background-color: #fff;
}

tbody tr:hover {
  background-color: #f3f3f3;
}

/* Pagination styling */
.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.pagination li {
  margin: 0 5px;
  cursor: pointer;
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.pagination li:hover {
  background-color: #f2f2f2;
}

.pagination li.disabled {
  cursor: not-allowed;
  color: #ccc;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .table-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .alphabet-tabs {
    justify-content: space-between;
  }

  .alphabet-tabs button {
    flex: 1 0 9%; /* Adjusted to fit better on small screens */
  }
}
