/**
 * Feed-only styles. Shared chrome lives in /app/common/social-shell.css (load first).
 */

/* Skeleton layout (feed-auth.js; no colors — uses .skeleton / .skeleton-line from shell) */
.post-card.skeleton .post-skeleton-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-card.skeleton .post-skeleton-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-card.skeleton .post-skeleton-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

/* Logged-in quick actions menu */

.feed-quickbar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px 4px;
  scrollbar-width: thin;
}

.quick-pill {
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  padding: 8px 13px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border-ui);
  background: var(--nav-pill-bg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.13s ease-out;
}

.quick-pill svg {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.quick-pill span.icon-fallback {
  font-size: 12px;
}

.quick-pill:hover {
  border-color: var(--border-ui-hover);
  color: var(--text-main);
  transform: translateY(-0.5px);
}

.quick-pill.primary {
  border-color: var(--nav-pill-active-border);
  background: var(--nav-pill-active-bg);
  color: var(--text-strong);
  box-shadow: var(--nav-pill-active-shadow);
}

.quick-pill.primary:hover {
  border-color: var(--btn-compact-hover-border);
}

/* Feed composer extras */

.composer-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.avatar-circle {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--avatar-initial-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--avatar-initial-fg);
  box-shadow: var(--avatar-shadow);
}

.avatar-circle-link {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.composer-secondary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}

.composer-visibility-top {
  width: 100%;
  margin-bottom: 8px;
}

.composer-footer-post-only {
  justify-content: flex-end;
}

.chip {
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid var(--input-border);
  background: var(--toolbar-bg);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chip-indicator {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--chip-indicator-muted);
}

.composer-visibility-chip.active .chip-indicator {
  background: var(--chip-indicator-on);
}

#composer-post.btn-compact::before {
  content: "✶";
  font-size: 10px;
}

.composer-title-input {
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 14px;
}

.composer-slug-wrap {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  margin-bottom: 0;
  pointer-events: none;
  transition:
    max-height 0.22s ease,
    opacity 0.18s ease,
    transform 0.22s ease,
    margin-bottom 0.22s ease;
}

.composer-slug-wrap.is-visible {
  max-height: 180px;
  opacity: 1;
  transform: translateY(0);
  margin-bottom: 10px;
  pointer-events: auto;
}

.composer-slug-wrap.is-visible.composer-slug-edit-open {
  max-height: 320px;
}

.composer-slug-preview-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.composer-slug-edit-btn {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--input-border);
  background: var(--toolbar-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.3;
}

.composer-slug-edit-btn:hover {
  border-color: var(--toolbar-border-hover);
  color: var(--text-main);
}

.composer-slug-wrap.composer-slug-edit-open .composer-slug-edit-btn-label-open {
  display: none;
}

.composer-slug-wrap.composer-slug-edit-open .composer-slug-edit-btn-label-close {
  display: inline;
}

.composer-slug-edit-btn-label-close {
  display: none;
}

.composer-slug-edit-panel {
  margin-top: 8px;
}

.composer-slug-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}

.composer-slug-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 13px;
}

.composer-url-preview {
  flex: 1;
  min-width: 0;
  display: block;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--text-main);
}

.composer-slug-error {
  margin-top: 4px;
  font-size: 11px;
  color: var(--danger, #ff7b7b);
}

.composer-image-preview {
  margin-top: 6px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--input-border);
}

.composer-image-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.composer-visibility {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

/* Feed list & posts */

.feed-list {
  padding: 12px 14px 10px;
  border-top: 1px solid var(--composer-top-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card {
  border-radius: var(--radius-lg);
  background: var(--sidebar-bg);
  border: 1px solid var(--border-slate-800-faint);
  box-shadow: var(--shadow-card);
  padding: 12px 12px 10px;
  position: relative;
  overflow: hidden;
}

.post-card-menu[data-report-menu-host] {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.post-card-menu[data-report-menu-host] > * {
  pointer-events: auto;
}

.post-card:has([data-report-menu-host]) .post-header {
  padding-right: 44px;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}

.post-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--avatar-initial-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--avatar-initial-fg);
  flex: 0 0 auto;
}

a.post-avatar {
  text-decoration: none;
  color: var(--avatar-initial-fg);
}

.post-meta {
  flex: 1;
  min-width: 0;
}

.post-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.post-author-name {
  font-weight: 600;
  color: var(--text-strong);
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-tag {
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--popover-item-bg);
  border: 1px solid var(--sidebar-badge-border);
  color: var(--sidebar-badge-fg);
}

.post-subline {
  margin-top: 1px;
  font-size: 11px;
  color: var(--sidebar-list-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.visibility-pill {
  border-radius: 999px;
  padding: 1px 6px;
  border: 1px solid var(--visibility-pill-border);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.visibility-pill.public {
  border-color: var(--visibility-public-border);
  color: var(--visibility-public-fg);
}

.visibility-pill.private {
  border-color: var(--visibility-private-border);
  color: var(--visibility-private-fg);
}

.post-body {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-main);
  margin: 4px 0 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-footer {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--input-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--sidebar-list-muted);
  flex-wrap: wrap;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.pill-action {
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid var(--input-border);
  background: var(--toolbar-bg);
  color: var(--sidebar-list-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.11s ease-out;
  flex-shrink: 0;
}

.pill-action:hover {
  border-color: var(--toolbar-border-hover);
  color: var(--text-strong);
  background: var(--toolbar-active-bg);
}

.pill-action[data-state="active"] {
  border-color: var(--toolbar-active-border);
  color: var(--toolbar-active-fg);
  background: var(--content-pill-active-bg);
}

.pill-action-text {
  white-space: nowrap;
}

.pill-action-count {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  min-width: 1.15em;
  text-align: center;
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--fill-surface-95, rgba(127, 127, 127, 0.12));
  color: var(--sidebar-list-muted);
}

.pill-action[data-state="active"] .pill-action-count {
  color: inherit;
  background: rgba(255, 255, 255, 0.2);
}

.pill-action-icon {
  font-size: 11px;
}

.post-card .post-actions .pill-action-more {
  margin-left: auto;
}

.post-card [data-report-menu-host] .pill-action-more {
  margin-left: 0;
  padding: 3px 9px;
  line-height: 1.1;
}

.post-stats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
}

.post-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-stat-btn {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.post-stat-signal {
  gap: 5px;
}

.post-stat-icon {
  font-size: clamp(12px, 2.8vw, 15px);
  line-height: 1;
  flex-shrink: 0;
}

.post-fuel-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-fuel-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--input-border);
  overflow: hidden;
}

.post-fuel-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #22c55e, #0ea5e9);
}

.post-fuel-bar-label {
  font-size: 10px;
  color: var(--sidebar-list-muted);
  white-space: nowrap;
}

.post-fuel-bar-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}

.post-fuel-boost-line {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--sidebar-list-muted);
  letter-spacing: 0.01em;
}

@media (max-width: 560px) {
  .post-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .post-actions {
    flex: none;
    width: 100%;
    flex-wrap: wrap;
    row-gap: 6px;
    column-gap: 6px;
  }

  .post-stats {
    flex-wrap: wrap;
    width: 100%;
    row-gap: 4px;
  }
}

.post-stat span.count {
  font-weight: 500;
  color: var(--sidebar-list-title);
}

.post-title {
  margin: 2px 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-strong);
}

.post-image {
  margin-top: 6px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--input-border);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.post-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* First-time welcome overlay */

.feed-first-time-welcome {
  margin: 12px 14px 0;
}

.feed-first-time-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-ui);
  background: var(--surface-bg, var(--sidebar-bg));
  box-shadow: var(--shadow-card);
  padding: 16px 16px 14px;
}

.feed-first-time-close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 1px solid var(--input-border);
  background: var(--toolbar-bg);
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
}

.feed-first-time-close:hover {
  color: var(--text-main);
  border-color: var(--toolbar-border-hover);
}

.feed-first-time-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-list-muted);
}

.feed-first-time-title {
  margin: 6px 0 6px;
  font-size: 20px;
  color: var(--text-strong);
}

.feed-first-time-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-main);
}

.feed-first-time-map {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.feed-first-time-map-item {
  border-radius: 10px;
  border: 1px dashed var(--input-border);
  background: var(--toolbar-bg);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 10px 6px;
}

.feed-first-time-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feed-first-time-actions .btn-compact {
  text-decoration: none;
}

.feed-first-time-dismiss.btn-ghost {
  border-radius: 999px;
  padding: 7px 11px;
}

/* Feed sidebar: connections and requests */

.connections-sidebar-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.sidebar-meta {
  margin-top: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--sidebar-list-muted);
}

.sidebar-scroll-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 2px;
  scrollbar-width: thin;
}

.sidebar-empty {
  border: 1px dashed var(--input-border);
  border-radius: 10px;
  padding: 9px;
  font-size: 12px;
  color: var(--sidebar-list-muted);
  background: var(--toolbar-bg);
}

.sidebar-person-card {
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--toolbar-bg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sidebar-person-main {
  text-decoration: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: inherit;
}

.sidebar-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--avatar-initial-bg);
  color: var(--avatar-initial-fg);
  box-shadow: var(--avatar-shadow);
}

.sidebar-online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid var(--surface-bg, #111);
  background: #2acd67;
}

.sidebar-person-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.sidebar-person-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-person-sub,
.sidebar-person-activity {
  font-size: 11px;
  color: var(--sidebar-list-muted);
}

.sidebar-person-activity {
  color: var(--text-main);
}

.sidebar-list-footer {
  font-size: 11px;
  color: var(--sidebar-list-muted);
  text-align: center;
  padding: 6px 0 2px;
}

.sidebar-footer-link-wrap {
  margin-top: 8px;
}

.sidebar-footer-link {
  font-size: 12px;
  color: var(--accent, #4ea4ff);
  text-decoration: none;
}

.sidebar-footer-link:hover {
  text-decoration: underline;
}

.requests-tabbar {
  margin-top: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  padding: 2px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--toolbar-bg);
}

.requests-tab {
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--sidebar-list-muted);
  background: transparent;
  padding: 6px 8px;
  cursor: pointer;
}

.requests-tab.active {
  background: var(--content-pill-active-bg);
  color: var(--text-strong);
}

.request-actions {
  display: flex;
  gap: 6px;
}

.request-actions .btn-compact,
.request-actions .btn-ghost {
  font-size: 11px;
  padding: 5px 9px;
}

.feed-scroll-sentinel {
  height: 1px;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
