/* books.css - Styles for the books page */

/* Books table */
.books-table-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow-x: auto;
}

.books-table {
  width: 100%;
  border-collapse: collapse;
}

.books-table th,
.books-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.books-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.books-table tr:last-child td {
  border-bottom: none;
}

.books-table tr:hover {
  background-color: #f8f9fa;
}

.book-cover-thumbnail {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.books-table .view-btn,
.books-table .edit-btn,
.books-table .delete-btn,
.books-table .borrow-btn,
.books-table .return-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 5px;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.books-table .view-btn {
  color: #3498db;
}

.books-table .edit-btn {
  color: #f39c12;
}

.books-table .delete-btn {
  color: #e74c3c;
}

.books-table .borrow-btn {
  color: #27ae60;
}

.books-table .return-btn {
  color: #9b59b6;
}

.books-table .view-btn:hover,
.books-table .edit-btn:hover,
.books-table .delete-btn:hover,
.books-table .borrow-btn:hover,
.books-table .return-btn:hover {
  background-color: #f1f1f1;
}

.no-books {
  padding: 30px;
  text-align: center;
  color: #7f8c8d;
}

/* Filter bar */
.filter-bar {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  background-color: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-group {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.filter-group label {
  margin-right: 10px;
  font-weight: 500;
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 200px;
}

/* Book details in modal */
.book-details {
  display: flex;
  max-width: 100%;
  gap: 20px;
  margin-bottom: 20px;
}

.book-cover img {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.book-info {
  flex: 1;
}

.book-info p {
  margin-bottom: 10px;
}

.api-book-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* Book status badges */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-badge.available {
  background-color: #e8f4fd;
  color: #3498db;
}

.status-badge.borrowed {
  background-color: #fef2f2;
  color: #e74c3c;
}

.status-badge.reserved {
  background-color: #fef9e7;
  color: #f39c12;
}

/* Book actions */
.book-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Login prompt */
.login-prompt {
  margin-top: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #3498db;
}

.login-prompt a {
  color: #3498db;
  font-weight: 500;
  text-decoration: none;
}

.login-prompt a:hover {
  text-decoration: underline;
}

/* Categories display */
.categories-display {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.category-chip {
  display: inline-block;
  padding: 5px 10px;
  background-color: #f0f7ff;
  color: #3498db;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.category-chip:hover {
  background-color: #3498db;
  color: white;
}

.category-chip.active {
  background-color: #3498db;
  color: white;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .filter-bar {
    padding: 10px;
  }

  .filter-group select {
    min-width: 150px;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .books-table th:nth-child(4),
  .books-table td:nth-child(4),
  .books-table th:nth-child(5),
  .books-table td:nth-child(5) {
    display: none;
  }

  .book-details {
    flex-direction: column;
  }

  .book-cover {
    margin-bottom: 20px;
    text-align: center;
  }

  .book-cover img {
    width: 15rem;
    height: 22.5rem;
  }

  .book-info p {
    font-size: 0.9rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  .filter-group {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .filter-group select {
    width: 100%;
  }
}
