/* Trang Tủ sách */

/* Empty / need-login / error state */
.shelf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
  margin-top: 1rem;
}

.shelf-empty[hidden] {
  display: none;
}

.shelf-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.18), rgba(255, 184, 0, 0.04));
  border: 1px solid rgba(255, 184, 0, 0.25);
  color: var(--gold);
  margin-bottom: 1rem;
}

.shelf-empty h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.shelf-empty p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 460px;
  line-height: 1.55;
}

.shelf-empty .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.2rem;
  background: var(--gold);
  color: #1a1304;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter 0.15s;
}

.shelf-empty .btn-primary:hover {
  filter: brightness(1.08);
}

/* Card nâng cấp với nút bỏ thích góc trên-phải */
.shelf-card {
  position: relative;
}

.shelf-card__link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.shelf-card__unlike {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ef4444;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.15s, color 0.15s;
}

.shelf-card__unlike:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  transform: scale(1.05);
}

/* Toast (dùng chung) */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 0.7rem 1.1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.toast[data-type="err"] {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.toast[data-type="ok"] {
  border-color: rgba(74, 222, 128, 0.45);
}
