/* Beats-Library – Custom Styles */

/* ── Book Grid (auto-fit portrait cards) ───────────── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

/* ── Book Card ─────────────────────────────────────── */
.book-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  background: #1e1e2e;
  border-radius: 6px;
  overflow: hidden;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* ── Cover: true portrait aspect ratio ─────────────── */
.book-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;   /* classic book portrait ratio */
  overflow: hidden;
  background: #12122a;
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* fills the space, no letterboxing */
  object-position: center top;
  display: block;
}

.book-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 2rem;
  background: linear-gradient(160deg, #1a1a2e 0%, #0f0f1e 100%);
  padding: 0.5rem;
}

/* ── Book Title & Meta ─────────────────────────────── */
.book-info {
  padding: 0.4rem 0.5rem 0.5rem;
}

.book-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 0.15rem;
}

.book-author {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.68rem;
  color: #888;
  margin-bottom: 0.3rem;
}

.book-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Favorite button ───────────────────────────────── */
.fav-btn {
  opacity: 0.6;
  transition: opacity 0.15s, transform 0.15s;
  cursor: pointer;
  background: rgba(0,0,0,0.55) !important;
  border-radius: 50% !important;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 6px;
  right: 6px;
}
.fav-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* ── Unavailable overlay ───────────────────────────── */
.badge-missing {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.6rem;
}

/* ── Navbar ────────────────────────────────────────── */
.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

/* ── Table ─────────────────────────────────────────── */
.table-sm td, .table-sm th {
  padding: 0.4rem 0.6rem;
}

/* ── Pagination ────────────────────────────────────── */
.pagination .page-link {
  background-color: #2b2d42;
  border-color: #444;
  color: #adb5bd;
}
.pagination .page-item.active .page-link {
  background-color: #0d6efd;
  border-color: #0d6efd;
}
