/* 收藏按钮挂载点：块级父容器内右对齐；flex 行内父容器中靠 margin-left:auto 推到最右 */
#favorite-app {
  width: fit-content;
  margin-left: auto;
}

/* 收藏按钮 */
.favorite-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #fff;
  color: #475569;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
}

.favorite-btn:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

.favorite-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.favorite-btn .favorite-icon {
  width: 18px;
  height: 18px;
}

.favorite-btn.is-favorited {
  background: #fff7ed;
  border-color: #f59e0b;
  color: #f59e0b;
}

.favorite-btn.is-favorited .favorite-icon {
  fill: #f59e0b;
}

.favorite-btn.is-loading {
  opacity: .7;
}

/* Toast 轻提示：与 comment.css 同名同值，未引入评论区的详情页（书籍/专题等）也能正常显示 */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: toast-in 0.3s ease-out;
  pointer-events: auto;
  max-width: 300px;
  text-align: center;
}

.toast.success { background: rgba(34, 197, 94, 0.9); }
.toast.error { background: rgba(239, 68, 68, 0.9); }
.toast.info { background: rgba(30, 128, 255, 0.9); }
.toast.hiding { animation: toast-out 0.3s ease-in forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}
