/* ── Feed Post Builder ────────────────────────────────────────── */

.feed-quote-textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  margin-top: 8px;
}
.feed-quote-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.feed-quote-counter {
  text-align: right;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.feed-vis-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 14px;
  margin-top: 8px;
}

.feed-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.feed-toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.feed-publish-btn {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

/* ── Feed Card ───────────────────────────────────────────────── */

.feed-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.feed-repost-header {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.feed-quote {
  padding: 8px 12px;
  margin-bottom: 10px;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-size: 14px;
}

.feed-tombstone {
  padding: 16px;
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  background: var(--bg-tertiary, var(--bg-secondary));
  border-radius: 6px;
  margin-bottom: 8px;
}

.feed-snap {
  background: var(--bg-primary, var(--bg));
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}

.feed-snap-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.feed-snap-avatar img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.feed-snap-initial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dim);
}
.feed-snap-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.feed-snap-time {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}

.feed-snap-reply {
  border-left: 2px solid var(--accent);
  padding: 4px 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-snap-reply-author {
  font-weight: 600;
  color: var(--text);
}
.feed-snap-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.feed-snap-attachments {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.feed-snap-img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px;
  cursor: pointer;
}
.feed-snap-file {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
}

.feed-source {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.feed-source-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.feed-source-link:hover {
  text-decoration: underline;
}

.feed-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-dim);
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.feed-clap-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3px 10px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13px;
  transition: all 0.15s;
}
.feed-clap-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.feed-clap-btn.clapped {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-faint, rgba(88,101,242,0.1));
}

.feed-repost-count {
  font-size: 13px;
}

.feed-time {
  margin-left: auto;
  font-size: 11px;
}

/* ── Feed-posted message indicator in chat ──────────────────── */

.message.feed-posted {
  border-radius: 8px;
  background: var(--accent-dim, rgba(79,195,247,0.08));
  box-shadow: 0 0 12px var(--accent-dim, rgba(79,195,247,0.15)), 0 0 0 1px var(--accent-dim, rgba(79,195,247,0.2));
  padding: 8px 14px;
}
.message.feed-posted:hover {
  box-shadow: 0 0 18px var(--accent-dim, rgba(79,195,247,0.25)), 0 0 0 1px var(--accent-dim, rgba(79,195,247,0.3));
}
.msg-feed-notes {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--accent-dim, rgba(79,195,247,0.15));
}
.msg-feed-note-row {
  font-size: 12px;
  color: var(--text-dim, #888);
  padding: 2px 0;
}
.msg-feed-poster-link {
  color: var(--accent, #4fc3f7);
  text-decoration: none;
}
.msg-feed-poster-link:hover {
  text-decoration: underline;
}

/* ── Feed Builder Preview ────────────────────────────────────── */

.feed-builder-preview {
  max-width: 500px;
}

/* ── Feed Panel (desktop drawer) ─────────────────────────────── */

#feed-panel {
  width: 360px;
  min-width: 240px;
  max-width: 520px;
  background: var(--bg-mid);
  border-right: 1px solid var(--bg-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  transition: width 0.15s ease, opacity 0.15s ease;
  overflow: hidden;
}
#feed-panel.collapsed {
  width: 0 !important;
  min-width: 0;
  opacity: 0;
  border-right-width: 0;
  padding: 0;
  pointer-events: none;
}
#feed-panel-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--bg-light);
  flex-shrink: 0;
}
#feed-panel-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
#feed-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
#feed-panel-resize {
  position: absolute;
  top: 0;
  right: -2px;
  width: 5px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
}
#feed-panel-resize:hover,
#feed-panel-resize.dragging {
  background: var(--accent);
  opacity: 0.5;
}
.home-feed-empty {
  text-align: center;
  padding: 60px 16px;
  color: var(--text-dim);
  font-size: 14px;
}

@media (max-width: 768px) {
  #feed-panel {
    display: none;
    position: fixed;
    inset: 0;
    width: 100% !important;
    max-width: 100%;
    z-index: 500;
    border-right: none;
  }
  #feed-panel.mobile-open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }
  #feed-panel.mobile-open #feed-panel-resize {
    display: none;
  }
}

/* ── Notification Badge ──────────────────────────────────────── */

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ed4245;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}

/* ── Notification Items (in mentions panel) ──────────────────── */

.notif-mark-read {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
}
.notif-mark-read:hover {
  text-decoration: underline;
}
.notif-item {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}
.notif-item.unread {
  background: var(--accent-faint, rgba(88,101,242,0.08));
}
.notif-actor {
  font-weight: 600;
}
.notif-label {
  color: var(--text-dim);
}
.notif-time {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}
