/* Reels Post Carousel — dark post cards inside a reel slot.
   Same visual language as the post cards other apps inject between
   reels: author row, text, media area, engagement row, on black. */

.vg-rpc {
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-inline: 0.75rem;
  color: #fff;
}
@media (min-width: 1024px) {
  .vg-rpc { max-width: 30rem; }
}

.vg-rpc-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-inline: 0.25rem;
}
.vg-rpc-head-icon {
  flex: none;
  display: flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
}
.vg-rpc-head-text { min-width: 0; flex: 1; }
.vg-rpc-head-title { font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
.vg-rpc-head-sub { font-size: 0.72rem; color: rgba(255, 255, 255, 0.6); line-height: 1.3; }
.vg-rpc-head-tag {
  flex: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

/* horizontal track */
.vg-rpc-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
  cursor: grab;
  border-radius: 1.25rem;
  padding: 0.15rem;
}
.vg-rpc-track::-webkit-scrollbar { display: none; }
.vg-rpc-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }

/* the post card */
.vg-rpc-card {
  flex: 0 0 86%;
  scroll-snap-align: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.vg-rpc-card-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem 0.85rem 0;
  color: #fff;
  text-decoration: none;
}
.vg-rpc-card-link:hover { color: #fff; }

.vg-rpc-author { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.vg-rpc-avatar {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.15);
  background-size: cover;
  background-position: center;
}
.vg-rpc-author-names { min-width: 0; flex: 1; }
.vg-rpc-author-name {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vg-rpc-author-time { font-size: 0.72rem; color: rgba(255, 255, 255, 0.55); line-height: 1.3; }

.vg-rpc-text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* coloured post: excerpt on the pattern */
.vg-rpc-colored {
  border-radius: 0.9rem;
  min-height: 11rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: break-word;
  background-size: cover;
  background-position: center;
}

/* voice post: inline player (sibling of the link, so its controls never navigate) */
.vg-rpc-audio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.6rem 0.75rem;
  margin: 0.6rem 0.85rem 0;
}
.vg-rpc-audio-icon { flex: none; font-size: 1.35rem; line-height: 1; }
.vg-rpc-audio audio { width: 100%; min-width: 0; height: 2.25rem; outline: none; }

/* engagement row: like (+ reactions picker) · comments · share · views */
.vg-rpc-card { position: relative; }
.vg-rpc-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.85rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}
.vg-rpc-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.35rem;
  margin: -0.2rem -0.35rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.vg-rpc-actions button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.vg-rpc-actions button .icon { font-size: 1rem; }
.vg-rpc-views { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: auto; }
.vg-rpc-views .icon { font-size: 1rem; }

.vg-rpc-like-wrap { position: relative; display: inline-flex; }
.vg-rpc-like.is-reacted { color: #ff5b7f; }
.vg-rpc-like.is-reacted:hover { color: #ff7a97; }
.vg-rpc-like-icon { display: inline-flex; align-items: center; }
.vg-rpc-like-icon img { width: 1.05rem; height: 1.05rem; }

/* reactions picker: opens on hover (desktop) or long-press (mobile, .is-open) */
.vg-rpc-picker {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  display: none;
  align-items: center;
  gap: 0.15rem;
  padding: 0.3rem 0.4rem;
  border-radius: 9999px;
  background: rgba(20, 20, 25, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 5;
}
.vg-rpc-like-wrap:hover .vg-rpc-picker,
.vg-rpc-like-wrap.is-open .vg-rpc-picker { display: flex; }
.vg-rpc-reaction {
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0.15rem !important;
  margin: 0 !important;
  border-radius: 9999px !important;
  background: transparent !important;
  transition: transform 0.15s;
}
.vg-rpc-reaction:hover { transform: scale(1.25) translateY(-2px); }
/* the emoji is a size-full div + img (100% of its parent), so the
   button MUST have an explicit size or the whole chain collapses to
   ~0 and the emoji never paint — that was the invisible-picker bug */
.vg-rpc-reaction .emoji { width: 100%; height: 100%; }
.vg-rpc-reaction img { width: 100% !important; height: 100% !important; object-fit: contain; display: block; }

/* double-tap heart burst */
.vg-rpc-heart {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 5.5rem;
  height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 5rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

/* dots + arrows */
.vg-rpc-nav { display: flex; align-items: center; justify-content: center; gap: 0.9rem; }
.vg-rpc-prev,
.vg-rpc-next {
  flex: none;
  display: flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  border: 0;
}
.vg-rpc-prev:hover, .vg-rpc-next:hover { background: rgba(255, 255, 255, 0.2); }
.vg-rpc-dots { display: flex; align-items: center; gap: 0.35rem; }
.vg-rpc-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.3);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}
.vg-rpc-dot.is-active { width: 1.1rem; background: #fff; }

.vg-rpc-foot {
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
}
