/* =========================================================
   VinSnap — PostCard Component Styles
   Dark-themed car enthusiast app, Instagram-style feed card
   ========================================================= */

/* --- Card container --- */
.post-card {
  max-width: 600px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1rem;
}

/* --- Header row --- */
.post-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
}

/* --- Avatar --- */
.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
}

.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* --- Author info --- */
.post-author-info {
  display: flex;
  flex-direction: column;
}

.post-author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.post-author-name:hover {
  text-decoration: underline;
}

.post-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* --- Header menu button --- */
.post-menu-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.25rem;
  margin-left: auto;
  padding: 4px 8px;
  position: relative;
}

.post-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  min-width: 160px;
  background: var(--bg-secondary, #1a1a2e);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  padding: 6px 0;
  animation: menuFadeIn 0.15s ease;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-menu-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text-primary, #fff);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.post-menu-option:hover {
  background: rgba(255,255,255,0.06);
}

.post-menu-option--danger {
  color: #ef4444;
}

.post-menu-option--danger:hover {
  background: rgba(239,68,68,0.1);
}

/* --- Vehicle pill tag --- */
.post-vehicle-tag {
  display: inline-flex;
  align-items: center;
  margin: 0 1rem 0.5rem;
  padding: 4px 12px;
  background: rgba(34, 211, 166, 0.042);
  color: #5eead4;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  width: fit-content;
}

/* --- Text content --- */
.post-content {
  padding: 0 1rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --- Photo gallery --- */
.post-photos {
  position: relative;
  width: 100%;
  background: var(--bg-secondary);
}

.post-photo {
  width: 100%;
  display: none;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.post-photo.active {
  display: block;
}

/* --- Photo pagination dots --- */
.photo-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.15s;
}

.dot.active {
  background: #fff;
}

/* --- Hashtag tags row --- */
.post-tags {
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag {
  font-size: 0.75rem;
  color: #22D3A6;
  background: rgba(34, 211, 166, 0.042);
  padding: 2px 8px;
  border-radius: 4px;
}

/* --- Location line --- */
.post-location {
  padding: 0 1rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Engagement bar --- */
.post-engagement {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border-color);
  gap: 0.25rem;
}

.engagement-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.engagement-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Like button active state */
.engagement-btn.like-btn.active {
  color: #ef4444;
}

/* Bookmark button active state */
.engagement-btn.bookmark-btn.active {
  color: #22D3A6;
}

.engagement-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.engagement-count {
  font-size: 0.8rem;
}

/* --- Video in photo gallery --- */
.post-video {
  width: 100%;
  display: none;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #000;
  cursor: pointer;
}

.post-video.active {
  display: block;
}

/* Play button overlay for videos */
.post-photos .post-video::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Inline comments preview --- */
.post-comments-section {
  padding: 0 1rem 0.75rem;
}
