/* books.css — book grid & empty/loading states */

/* ============================================================
   BOOK GRID
   ============================================================ */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 0.9rem;
}

.book-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative;
}
.book-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--green-border);
}

/* Singable badge on card */
.card-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  background: var(--teal-mid);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
  z-index: 2;
}
.card-badge.australiana { background: var(--amber-mid); }
.card-badge.bilingual   { background: var(--purple-mid); }

/* ── Personal Note thought-bubble tooltip ── */
.pn-hover-tip {
  display: none;
  position: fixed;
  z-index: 900;
  background: #fffce6;
  border: 1.5px solid #d4b800;
  border-radius: 18px;
  padding: 0.55rem 0.9rem;
  font-size: 0.78rem;
  color: #4a3900;
  max-width: 210px;
  text-align: center;
  line-height: 1.45;
  font-style: italic;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  pointer-events: none;   /* never intercepts clicks */
}
/* Two circles leading down — the "thought" tail */
.pn-hover-tip::before {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px; height: 9px;
  background: #fffce6;
  border: 1.5px solid #d4b800;
  border-radius: 50%;
}
.pn-hover-tip::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: calc(50% + 6px);
  transform: translateX(-50%);
  width: 5px; height: 5px;
  background: #fffce6;
  border: 1.5px solid #d4b800;
  border-radius: 50%;
}

/* Not-approved overlay (admin only) — sits on top of the cover region */
.not-approved-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  aspect-ratio: 3/4;
  background: rgba(140, 20, 20, 0.55);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  z-index: 3;
  padding: 8px;
  border-top-left-radius: calc(var(--radius) - 1.5px);
  border-top-right-radius: calc(var(--radius) - 1.5px);
}
.not-approved-overlay .icon { font-size: 1.6rem; line-height: 1; }
.not-approved-overlay .lbl  { letter-spacing: 0.3px; }

/* Approved-status filter (admin only) */
.admin-only-row { display: none; }
body.is-admin .admin-only-row { display: flex; }

.book-cover {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: var(--green-light);
}
.book-cover-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, var(--green-light) 0%, var(--teal-light) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem;
}
.book-cover-placeholder .book-icon { font-size: 2.2rem; line-height: 1; }
.book-cover-placeholder .ph-title {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  color: var(--green-dark);
  text-align: center;
  line-height: 1.3;
  font-style: italic;
}

.book-body {
  padding: 0.65rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.book-title { font-family: var(--font-serif); font-size: 0.85rem; font-weight: 600; color: var(--gray-dark); line-height: 1.3; }
.book-author { font-size: 0.74rem; color: var(--gray-mid); }
.book-illustrator { font-size: 0.7rem; color: var(--gray-mid); font-style: italic; }

.tags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 5px; }
.tag {
  font-size: 0.67rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-family: var(--font-body);
}
.tag-topic    { background: var(--green-light);  color: var(--green-dark);  border: 1px solid var(--green-border); }
.tag-year     { background: var(--blue-light);   color: var(--blue-dark);   border: 1px solid var(--blue-border); }
.tag-year-F   { background: var(--amber-light);  color: var(--amber-dark);  border: 1px solid var(--amber-border); }
.tag-habitat  { background: var(--teal-light);   color: var(--teal-dark);   border: 1px solid var(--teal-border); }
.tag-singable { background: var(--teal-light);   color: var(--teal-dark);   border: 1px solid var(--teal-border); }
.tag-occasion { background: var(--purple-light); color: var(--purple-dark); border: 1px solid var(--purple-border); }
.tag-sung-to  { background: var(--green-light);  color: var(--green-dark);  border: 1px solid var(--green-border); }
.tag-aus      { background: var(--amber-light);  color: var(--amber-dark);  border: 1px solid var(--amber-border); }

/* ============================================================
   EMPTY / LOADING STATES
   ============================================================ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-mid);
}
.empty-state .icon { font-size: 2.5rem; display: block; margin-bottom: 0.6rem; }
.loading { text-align: center; padding: 3rem; color: var(--gray-mid); font-style: italic; }

