/* ============================================================
   USERRING PULSE FEED - HTML DEMO STYLES
   ============================================================ */

:root {
  --bg: #e8f0f6;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --accent: #059669;
  --overlay: rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --card: #111827;
    --text: #e5e7eb;
    --muted: #93a3b8;
    --primary: #22d3ee;
    --primary-dark: #06b6d4;
    --accent: #10b981;
    --overlay: rgba(0, 0, 0, 0.7);
  }
}

/* ============================================================
   CARDS (Main styling to match HTML demo)
   ============================================================ */

.text-card, .pulse-card {
  background: var(--card);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 16px;
  min-height: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: visible;
  margin-bottom: 12px;
}

.text-card:hover, .pulse-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  z-index: 100;
}

/* ============================================================
   POST HEADER (Avatar, username, time)
   ============================================================ */

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.post-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.username {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.username a {
  color: var(--text);
  text-decoration: none;
}

.username a:hover {
  color: var(--primary);
}

.pulse-time {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.inline-follow-btn {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  user-select: none;
}

.inline-follow-btn:hover {
  opacity: 0.8;
}

.inline-follow-btn.following {
  color: var(--muted);
}

/* ============================================================
   KEBAB MENU (Three dots)
   ============================================================ */

.menu-dots {
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
  position: relative;
  user-select: none;
  display: flex;
  align-items: center;
  z-index: 1;
}

.menu-dots:hover {
  color: var(--text);
}

.menu-dots.active {
  z-index: 10000;
}

.kebab-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.08);
  min-width: 240px;
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10001;
  overflow: hidden;
}

.menu-dots.active .kebab-menu {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: all;
}

.menu-timestamp {
  padding: 12px 16px;
  text-align: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.menu-item:hover {
  background: rgba(0,0,0,.04);
}

.menu-item.danger {
  color: #ef4444;
}

.menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.menu-divider {
  height: 1px;
  background: rgba(0,0,0,.06);
  margin: 4px 0;
}

/* Dark mode menu */
@media (prefers-color-scheme: dark) {
  .kebab-menu {
    box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.1);
  }
  .menu-timestamp {
    border-bottom-color: rgba(255,255,255,.08);
  }
  .menu-item:hover {
    background: rgba(255,255,255,.06);
  }
  .menu-divider {
    background: rgba(255,255,255,.08);
  }
}

/* ============================================================
   POST CONTENT & TAGS
   ============================================================ */

.post-content {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.tag:hover {
  color: var(--primary);
}

/* ============================================================
   POST ACTIONS (Interactions bar)
   ============================================================ */

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.06);
}

@media (prefers-color-scheme: dark) {
  .post-actions {
    border-top-color: rgba(255,255,255,.08);
  }
}

.post-stats {
  display: flex;
  gap: 16px;
  align-items: center;
}

.stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  user-select: none;
}

.stat svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: all 0.2s;
}

.stat:hover {
  color: var(--text);
}

.stat .count {
  font-weight: 500;
}

/* ============================================================
   REPULSE BUTTON
   ============================================================ */

.repulse-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  transition: color 0.2s;
  font-size: 14px;
}

.repulse-btn:hover {
  color: var(--text);
}

.repulse-btn.reacted {
  color: var(--accent);
}

.repulse-btn.reacted svg {
  fill: var(--accent);
  stroke: var(--accent);
}

/* ============================================================
   REACTION PICKER (5 Universal Emojis)
   ============================================================ */

.stat[data-reaction-type="like"] {
  position: relative;
}

.reaction-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.08);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
  white-space: nowrap;
}

.stat.picker-open .reaction-picker {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(-4px);
}

.reaction-option {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  padding: 0;
}

.reaction-option:hover {
  transform: scale(1.3);
  background: rgba(0,0,0,.05);
}

.reaction-option:active {
  transform: scale(1.1);
}

/* Reaction icon state (SVG when not reacted, emoji when reacted) */
.stat[data-reaction-type="like"] .reaction-icon {
  display: flex;
  align-items: center;
  font-size: 18px;
  line-height: 1;
}

.stat[data-reaction-type="like"] .reaction-icon .emoji {
  display: none;
}

.stat[data-reaction-type="like"].reacted .reaction-icon svg {
  display: none;
}

.stat[data-reaction-type="like"].reacted .reaction-icon .emoji {
  display: inline-block;
}

.stat[data-reaction-type="like"].reacted {
  color: #ef4444;
}

/* Dark mode picker */
@media (prefers-color-scheme: dark) {
  .reaction-picker {
    border-color: rgba(255,255,255,.1);
    box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.1);
  }
  .reaction-option:hover {
    background: rgba(255,255,255,.1);
  }
}

/* ============================================================
   SHARE BUTTON
   ============================================================ */

.share-btn {
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 4px;
  display: flex;
  align-items: center;
  background: none;
  border: none;
}

.share-btn:hover {
  color: var(--primary);
}

.share-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   CONTAINER & LAYOUT
   ============================================================ */

.container {
  overflow: visible;
}

.main-column, .third-col {
  overflow: visible;
}
