/* Post action bar */
.pbar {
  display: flex;
  align-items: center;
  gap: .15rem;
  padding: .5rem .25rem 0;
  margin-top: .5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  position: relative;
}

.pbar-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .65rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .15s, color .15s;
}
.pbar-btn:hover {
  background: rgba(127,127,127,.1);
  color: var(--text);
  transform: translateY(-1px);
}
.pbar-btn:active { transform: translateY(0); }
.pbar-btn:disabled { opacity: .5; cursor: wait; }

.pbar-icon { font-size: 1rem; line-height: 1; }
.pbar-count { font-variant-numeric: tabular-nums; }

.pbar-btn.active { color: var(--primary); }
.pbar-btn.like-btn.active     { color: #e11d48; background: rgba(225, 29, 72, .12); }
.pbar-btn.repost-btn.active   { color: #16a34a; background: rgba(22, 163, 74, .12); }
.pbar-btn.bookmark-btn.active { color: #d97706; background: rgba(217, 119, 6, .12); }
.pbar-btn.follow-btn          { color: var(--primary); }
.pbar-btn.follow-btn.active   { color: var(--primary); background: rgba(79, 70, 229, .12); }

.pbar-share-wrap,
.pbar-more-wrap { position: relative; }

.pbar-share-menu,
.pbar-more-menu {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  min-width: 200px;
  padding: .35rem;
  display: none;
  z-index: 100;
}
.pbar-share-menu.open,
.pbar-more-menu.open { display: block; animation: pbarMenuIn .15s; }

@keyframes pbarMenuIn {
  from { opacity: 0; transform: translateY(6px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pbar-share-menu a,
.pbar-share-menu button,
.pbar-more-menu a,
.pbar-more-menu button {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  text-align: left;
  padding: .55rem .8rem;
  border-radius: 8px;
  border: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: .87rem;
  cursor: pointer;
  text-decoration: none;
}
.pbar-share-menu a:hover,
.pbar-share-menu button:hover,
.pbar-more-menu a:hover,
.pbar-more-menu button:hover { background: rgba(127,127,127,.1); text-decoration: none; }
.pbar-more-menu .menu-danger { color: var(--danger); }
.pbar-more-menu .menu-danger:hover { background: rgba(229, 62, 62, .1); }

.pbar-repost-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  min-width: 220px;
  padding: .35rem;
  z-index: 100;
}
.pbar-repost-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: .55rem .8rem;
  border-radius: 8px;
  border: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: .87rem;
  cursor: pointer;
}
.pbar-repost-menu button:hover { background: rgba(127,127,127,.1); }

.pbar-quote-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pbar-quote-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.pbar-quote-card textarea {
  width: 100%;
  min-height: 100px;
  padding: .6rem .8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  resize: vertical;
  box-sizing: border-box;
}
.pbar-quote-actions {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
  margin-top: .75rem;
}

.pbar-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 22, 40, .95);
  color: #fff;
  padding: .7rem 1.2rem;
  border-radius: 10px;
  font-size: .88rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  opacity: 0;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
  pointer-events: none;
}
.pbar-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 700px) {
  .pbar { gap: 0; }
  .pbar-btn { padding: .4rem .5rem; }
  .pbar-label { display: none; }
  .pbar-share-menu,
  .pbar-more-menu,
  .pbar-repost-menu { right: auto; left: 0; max-width: calc(100vw - 2rem); }
}