/* ============================================================
   LINKSY — feed.css
   Styles for feed page: sidebar, post cards, create box,
   reactions, comments, polls, media
   ============================================================ */

/* ===== LEFT SIDEBAR ===== */
.profile-sidebar-card { padding: 0; overflow: hidden; }
.profile-sidebar-cover {
  height: 72px; background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
}
.profile-sidebar-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-sidebar-body { padding: 0 16px 16px; text-align: center; }
.profile-sidebar-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  border: 3px solid white; margin: -34px auto 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-size: 1.4rem; font-weight: 700; color: white;
  overflow: hidden; position: relative;
}
.profile-sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-sidebar-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 3px; }
.profile-sidebar-headline { font-size: 0.78rem; color: var(--text-light); margin-bottom: 12px; line-height: 1.4; }
.profile-sidebar-stats { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.5); border-bottom: 1px solid rgba(255,255,255,0.5); margin-bottom: 12px; }
.ps-stat { display: flex; flex-direction: column; align-items: center; }
.ps-stat-num { font-size: 0.9rem; font-weight: 700; color: var(--primary-dark); }
.ps-stat-label { font-size: 0.68rem; color: var(--text-muted); }
.profile-complete-row { margin-bottom: 12px; }
.profile-complete-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-light); margin-bottom: 5px; }

.sidebar-quick-links { padding: 14px; }
.quick-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-md);
  text-decoration: none; color: var(--text-mid);
  font-size: 0.85rem; font-weight: 500; transition: var(--transition);
}
.quick-link:hover { background: rgba(46,204,135,0.1); color: var(--primary-dark); }
.quick-link-icon { font-size: 1rem; width: 20px; text-align: center; }

/* ===== CREATE POST BOX ===== */
.create-post-box { padding: 16px; }
.create-post-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.create-post-input {
  flex: 1; padding: 10px 16px; border-radius: var(--radius-full);
  border: 1.5px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
  font-size: 0.9rem; color: var(--text-dark); cursor: pointer;
  transition: var(--transition); outline: none;
}
.create-post-input:hover { border-color: var(--primary); background: rgba(255,255,255,0.7); }
.create-post-actions { display: flex; gap: 4px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.5); }
.create-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 6px; border-radius: var(--radius-md); border: none;
  background: transparent; cursor: pointer; font-size: 0.8rem; font-weight: 600;
  color: var(--text-light); transition: var(--transition);
}
.create-action-btn:hover { background: rgba(46,204,135,0.1); color: var(--primary-dark); }

/* ===== POST CARD ===== */
.post-card { padding: 0; overflow: hidden; }
.post-header { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 0; }
.post-author-info { flex: 1; }
.post-author-name { font-size: 0.92rem; font-weight: 700; color: var(--text-dark); text-decoration: none; }
.post-author-name:hover { color: var(--primary-dark); }
.post-author-meta { font-size: 0.75rem; color: var(--text-light); margin-top: 1px; }
.post-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.post-menu-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.2rem; padding: 4px 8px; border-radius: var(--radius-sm); transition: var(--transition); }
.post-menu-btn:hover { background: rgba(0,0,0,0.05); }

.post-content { padding: 12px 16px; font-size: 0.9rem; line-height: 1.65; color: var(--text-dark); white-space: pre-wrap; word-break: break-word; }
.post-content.collapsed { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.see-more-btn { background: none; border: none; color: var(--primary-dark); font-weight: 600; font-size: 0.85rem; cursor: pointer; padding: 0; }

.post-hashtags { padding: 0 16px 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.post-hashtag { font-size: 0.78rem; color: var(--secondary-dark); font-weight: 600; cursor: pointer; }
.post-hashtag:hover { text-decoration: underline; }

.post-media { width: 100%; max-height: 480px; object-fit: cover; display: block; }
.post-media-video { width: 100%; max-height: 480px; background: #000; display: block; }
.post-doc-preview {
  margin: 0 16px 12px; padding: 12px 16px; border-radius: var(--radius-md);
  background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.2);
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.post-doc-preview:hover { background: rgba(56,189,248,0.14); }

/* Shared post */
.shared-post-inner {
  margin: 0 16px 12px; padding: 14px; border-radius: var(--radius-md);
  border: 1.5px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.3);
}
.shared-post-author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.shared-post-name { font-size: 0.85rem; font-weight: 700; }
.shared-post-content { font-size: 0.85rem; color: var(--text-mid); line-height: 1.55; }

/* Poll */
.poll-container { padding: 0 16px 12px; }
.poll-question { font-size: 0.9rem; font-weight: 700; margin-bottom: 10px; }
.poll-option-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-md); margin-bottom: 8px;
  border: 1.5px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.3);
  cursor: pointer; transition: var(--transition); position: relative; overflow: hidden;
}
.poll-option-bar:hover { border-color: var(--primary); }
.poll-option-bar.voted { border-color: var(--primary); background: rgba(46,204,135,0.1); }
.poll-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(46,204,135,0.12); transition: width 0.5s ease; z-index: 0; }
.poll-option-text { position: relative; z-index: 1; font-size: 0.88rem; font-weight: 500; flex: 1; }
.poll-option-pct { position: relative; z-index: 1; font-size: 0.8rem; font-weight: 700; color: var(--primary-dark); }

/* Post stats row */
.post-stats {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; font-size: 0.78rem; color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.4);
}
.post-stats-left { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.post-stats-left:hover { color: var(--primary-dark); }
.reaction-emojis { display: flex; }
.reaction-emoji { font-size: 0.9rem; margin-right: -3px; }

/* Post actions row */
.post-actions {
  display: flex; border-top: 1px solid rgba(255,255,255,0.4);
}
.post-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 6px; border: none; background: transparent; cursor: pointer;
  font-size: 0.82rem; font-weight: 600; color: var(--text-light);
  transition: var(--transition); border-radius: 0;
}
.post-action-btn:hover { background: rgba(46,204,135,0.08); color: var(--primary-dark); }
.post-action-btn.reacted { color: var(--primary-dark); }
.post-action-btn.saved { color: var(--secondary-dark); }

/* Reaction picker */
.reaction-picker {
  position: absolute; bottom: calc(100% + 8px); left: 0;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255,255,255,0.7);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: var(--radius-full); padding: 8px 12px;
  display: flex; gap: 6px; z-index: 100;
  opacity: 0; pointer-events: none; transform: scale(0.8) translateY(8px);
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.reaction-picker.show { opacity: 1; pointer-events: all; transform: scale(1) translateY(0); }
.reaction-btn { font-size: 1.5rem; cursor: pointer; transition: transform 0.15s; border: none; background: none; padding: 2px; }
.reaction-btn:hover { transform: scale(1.4) translateY(-4px); }
.post-like-wrap { position: relative; }

/* ===== RIGHT SIDEBAR ===== */
.sidebar-section { padding: 16px; }
.sidebar-section-title { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.suggestion-card { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-name { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion-meta { font-size: 0.72rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trending-tag { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; cursor: pointer; }
.trending-tag:hover .trending-name { color: var(--primary-dark); }
.trending-name { font-size: 0.85rem; font-weight: 600; }
.trending-count { font-size: 0.72rem; color: var(--text-muted); }

/* ===== POST TYPE BUTTONS ===== */
.post-type-btn { background: rgba(255,255,255,0.4); border: 1.5px solid rgba(255,255,255,0.5); color: var(--text-mid); }
.post-type-btn.active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; border-color: transparent; }

/* ===== COMMENT CARD ===== */
.comment-card { display: flex; gap: 10px; margin-bottom: 14px; }
.comment-body { flex: 1; background: rgba(255,255,255,0.4); border-radius: var(--radius-md); padding: 10px 14px; }
.comment-author { font-size: 0.82rem; font-weight: 700; margin-bottom: 3px; }
.comment-text { font-size: 0.85rem; line-height: 1.55; }
.comment-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; display: flex; gap: 12px; }
.comment-action { cursor: pointer; transition: var(--transition); }
.comment-action:hover { color: var(--primary-dark); }

/* ===== FEED LOADER ===== */
.feed-loader { display: flex; justify-content: center; padding: 40px 0; }

/* ===== ARTICLE POST ===== */
.article-banner { width: 100%; height: 200px; object-fit: cover; }
.article-title { padding: 14px 16px 4px; font-size: 1.05rem; font-weight: 800; line-height: 1.3; }
.article-excerpt { padding: 0 16px 12px; font-size: 0.85rem; color: var(--text-light); line-height: 1.6; }
