/* =========================
   BOOK LISTS & GRIDS
   ========================= */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* =========================
   BOOK CARD
   ========================= */

.book-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 14px 10px 10px;
  display: flex;
  gap: 14px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
}

/* =========================
   COVER
   ========================= */

.book-cover {
  width: 72px;
  height: 96px;
  border-radius: var(--radius-sm);
  overflow: hidden; /* IMPORTANT */
  background-color: var(--accent-soft);
  flex-shrink: 0;
}

.book-cover-img {
  width: 100px;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 8px;
}


/* =========================
   CONTENT
   ========================= */

.book-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.book-title {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: #22223B;
}

.book-author {
  font-size: 0.85rem;
  color: #9A8C98;
}

/* =========================
   META INFO
   ========================= */

.book-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* =========================
   ACTIONS
   ========================= */

.book-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.book-actions .primary-btn {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.book-actions .small-btn {
  padding: 6px 10px;
  font-size: 0.75rem;
  border-radius: 8px;
  background-color: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

.book-actions .small-btn:hover {
  background-color: var(--accent-soft);
  color: var(--text-primary);
}

/* =========================
   READING BADGE
   ========================= */

.reading-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--accent);
  background-color: var(--accent-soft); /* Honeydew */
  padding: 4px 8px;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 6px;
}

/* =========================
   CURRENTLY READING CARD
   ========================= */

.reading-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =========================
   COMPLETED TABLE
   ========================= */

.table-wrapper {
  overflow-x: auto;
  margin-top: 24px;
}

.books-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.books-table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.books-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-primary);
}

/* =========================
   RATING
   ========================= */

.rating {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 1px;
}

/* =========================
   NOTES BUTTON
   ========================= */

.text-btn {
  font-size: 0.75rem;
  color: var(--accent);
}

.text-btn:hover {
  text-decoration: underline;
}

/* =========================
   STATS
   ========================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.stat-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
}

.stat-number {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--accent);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* =========================
   SEARCH BAR
   ========================= */

.search-bar {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  max-width: 420px;
}

.search-bar input {
  flex: 1;
}

/* =========================
   EMPTY STATES
   ========================= */

.book-grid p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.reading-wide {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  padding: 20px 18px;;
  gap: 16px;
  text-align: left;
}

.book-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.book-actions button {
  flex: 1;              
  text-align: center;
}

.small-btn {
  padding: 6px 8px;
  font-size: 0.75rem;
  line-height: 1;
}


.books-table td:nth-child(5) {
  letter-spacing: 2px;
}

.primary-btn.small-btn {
  width: 120px;
}

.outline-btn.small-btn {
  width: 120px;
}

/* Clean horizontal alignment */
.book-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Cover image */
.book-cover-img {
  width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

/* Title + author stack */
.book-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

/* Button: stop it from looking like a blob */
.start-btn {
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
  margin-top: 8px;
}

/* =========================
   CURRENTLY READING CARD
   ========================= */

.reading-wide {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px 18px;
}

.book-cover-img {
  width: 90px;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
}

.book-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.book-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.reading-card-inner {
  display: flex;
  gap: 20px;
  align-items: center;
}

.book-cover-img {
  width: 90px;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.reading-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.book-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

/* =========================
   NORMALIZE ACTION BUTTON FONTS
   ========================= */

.book-actions button {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}


/* Normalize Start & Remove buttons (vertical alignment fix) */
#to-read-list .primary-btn,
#to-read-list .outline-btn {
  height: 36px;              /* force same height */
  line-height: 36px;         /* vertical centering */
  padding: 0 18px;           /* remove uneven vertical padding */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* =========================
   BOOK NOTES SPACING
   ========================= */

.notes-table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.notes-table td:first-child {
  padding-right: 24px; /* space between Date and Note */
}

.notes-table tr {
  line-height: 1.6;
}

.notes-table td {
  color: var(--text-secondary);
}

.notes-table td:first-child {
  color: var(--text-muted);
  font-size: 0.85rem;
}

#complete-book-cover {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* =========================
   COMPLETED BOOK (IMAGE + TITLE)
   ========================= */

.completed-book-cell {
  display: flex;
  flex-direction: column;
  align-items: left;
  gap: 8px;
}

.completed-book-cover {
  width: 70px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.completed-book-title {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  color: var(--text-primary);
}

/* =========================
   MOBILE BOOK CARDS
   ========================= */
/* =========================
   MOBILE BOOK CARDS
   ========================= */
@media (max-width: 768px) {

  /* Grid becomes single column */
  .book-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* General book card spacing */
  .book-card {
    padding: 16px;
  }

  /* To-read cards (vertical layout) */
  .book-card img.book-cover-img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
  }

  /* Reading cards (image left, content right → stacked) */
  .reading-card-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .reading-card-inner img.book-cover-img {
    width: 110px;
    height: auto;
    margin-bottom: 12px;
  }

  .reading-content {
    width: 100%;
  }

  /* Buttons stack nicely */
  .book-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }

  .book-actions button {
    width: 100%;
  }
}

/* =========================
   CURRENTLY READING — MOBILE
   ========================= */
@media (max-width: 768px) {

  .reading-wide {
    padding: 14px;
  }

  .reading-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
  }

  .reading-card-inner img.book-cover-img {
    width: 70px;
    height: auto;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .reading-content {
    flex: 1;
  }

  .reading-content .book-title {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }

  .reading-content .book-author {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .reading-content .book-meta {
    font-size: 0.75rem;
    margin-bottom: 10px;
  }

  .reading-content .book-actions {
    display: flex;
    gap: 8px;
  }

  .reading-content .small-btn {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
}

/* =========================
   TO READ — CLEAN CARD UI
   ========================= */
#to-read-list .book-card {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
}

#to-read-list .book-cover-img {
  width: 110px;
  height: auto;
  margin-bottom: 10px;
  border-radius: 8px;
}

#to-read-list .book-title {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

#to-read-list .book-author {
  font-size: 0.8rem;
  margin-bottom: 10px;
}

#to-read-list .book-card button {
  width: 100%;
  margin-top: 6px;
  padding: 8px 12px;
  font-size: 0.75rem;
}

/* remove weird spacing between buttons */
#to-read-list .book-card button + button {
  margin-top: 6px;
}

/* Bigger Add Completed button */
#add-completed-btn {
  padding: 12px 18px;
  font-size: 0.90rem;
  border-radius: 26px;
}



























