/* ═══════════════════════════════════════════════════
   bookmark.css — Favorite / Bookmark
   ═══════════════════════════════════════════════════ */

/* ─── Star Button ─── */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: #fff;
  color: var(--text-main);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.bookmark-btn:hover {
  border-color: var(--accent);
  background: #fffbf0;
  color: var(--primary-dark);
}
.bookmark-btn.is-saved {
  background: linear-gradient(135deg, #fff8e1 0%, #fef3c7 100%);
  border-color: var(--accent);
  color: #92400e;
}
.bookmark-btn i { font-size: .9rem; transition: transform .2s; }
.bookmark-btn:hover i { transform: scale(1.15); }
.bookmark-btn.is-saved i {
  color: var(--accent);
  animation: bookmarkPop .35s ease;
}
@keyframes bookmarkPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ─── Icon-only variant ─── */
.bookmark-btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

/* ─── Toast (เมื่อบันทึก) ─── */
.bookmark-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 10000;
  opacity: 0;
  transition: opacity .25s, transform .3s cubic-bezier(.2,.9,.3,1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bookmark-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.bookmark-toast i { color: var(--accent); }

/* ─── Bookmark List Page ─── */
.bookmark-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.bookmark-empty i {
  font-size: 4rem;
  opacity: .25;
  display: block;
  margin-bottom: 16px;
}

.bookmark-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: all .2s;
  text-decoration: none;
  color: inherit;
}
.bookmark-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}
.bookmark-item-body { flex: 1; min-width: 0; }
.bookmark-item-title {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--primary-dark);
}
.bookmark-item-meta {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ─── Dark mode ─── */
html[data-theme="dark"] .bookmark-btn {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-main);
}
html[data-theme="dark"] .bookmark-btn:hover {
  background: #22304a;
  border-color: var(--accent);
}
html[data-theme="dark"] .bookmark-item {
  background: var(--bg-card);
  border-color: var(--border);
}
html[data-theme="dark"] .bookmark-item-title { color: var(--primary-light); }