/* === Table Wrapper & Base === */
.library-table-wrapper {
  max-width: 70%;              /* Unified width definition */
  margin: 0 auto 2rem;         /* Center table */
  overflow-x: auto;            /* Scroll if needed */
  -webkit-overflow-scrolling: touch;
}

.library-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;         /* Important for text-overflow */
}

/* === Table Cells === */
.library-table th,
.library-table td {
  padding: 10px;
  text-align: left;
  vertical-align: middle;
  border: 1px solid #ddd;
}

/* === Image Column === */
.library-table th:nth-child(1),
.library-table td:nth-child(1) {
  width: 90px;
  text-align: center;
}

.library-table td[data-label="Image"] img {
  width: 80px;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

/* === Title Column === */
.library-table th:nth-child(2),
.library-table td:nth-child(2) {
  width: 25%;
}

/* === About Column – Fixed Width with Ellipsis === */
.library-table th:nth-child(4),
.library-table td:nth-child(4),
.library-table td[data-label="About"] {
  width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Borrow Button === */
.borrow-btn {
  background: #1976d2;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}

.borrow-btn:hover {
  background: #115293;
}

/* === Mobile Adjustments === */
@media (max-width: 768px) {
  .library-table-wrapper {
    max-width: 100%;
  }

  .library-table th:nth-child(4),
  .library-table td:nth-child(4) {
    width: 150px; /* Slightly narrower for mobile screens */
  }
}

/* === Pagination Alignment === */
.pagination-wrapper {
  width: 100%;
  display: flex;
  justify-content: center; /* center it — change to flex-end for right */
  margin-top: 20px;
}

.pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  transition: background 0.3s, color 0.3s;
}

.pagination a:hover {
  background: #1976d2;
  color: #fff;
  border-color: #1976d2;
}

.pagination .current {
  background: #1976d2;
  color: #fff;
  border-color: #1976d2;
}
