/* ============================================================
   Social Digest — feed.css
   Estilos del feed principal (layout, tarjetas de post, filtros)
   ============================================================ */

/* ── Layout de dos columnas ── */
.feed-layout {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-2);
  gap: var(--space-4);
  align-items: flex-start;
}

/* ── Sidebar de filtros ── */
.feed-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: calc(56px + var(--space-3)); /* debajo del header sticky */
}

.feed-sidebar__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-section__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2px;
}

.filter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  font-family: inherit;
}

.filter-btn:hover {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.filter-btn--active {
  color: var(--color-accent);
  font-weight: 600;
  background: #fce4ec28;
}

.filter-btn--active:hover {
  background: #fce4ec50;
}

/* ── Columna principal ── */
.feed-main {
  flex: 1;
  min-width: 0;
}

/* ── Barra de herramientas del feed ── */
.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.feed-toolbar__left {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}

.feed-toolbar__title {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.feed-toolbar__count {
  font-size: 13px;
  color: var(--color-text-muted);
}

.feed-toolbar__right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Lista de posts ── */
.posts-list {
  list-style: none;
}

/* ── Tarjeta de post ── */
.post-card {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: opacity 150ms ease;
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  opacity: 0.75;
}

.post-card:last-child {
  border-bottom: none;
}

/* Contenido textual de la card */
.post-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Thumbnail */
.post-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--color-surface);
}

.post-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.post-thumb-placeholder::after {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-border);
}

/* Headline de la card */
.post-headline {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text-primary);
  /* Limitar a 3 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Fila de metadatos */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.post-account {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.post-dot {
  color: var(--color-border);
}

.post-network {
  color: var(--color-text-muted);
}

.post-date {
  color: var(--color-text-muted);
}

/* ── Badges de estado ── */
.badge-processed {
  background: #e6f4ea;
  color: #1A8917;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 4px;
}

.badge-pending {
  background: #fff8e1;
  color: #b07800;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 4px;
}

/* ── Paginación ── */
.feed-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) 0 var(--space-2);
}

.feed-pagination__info {
  font-size: 13px;
  color: var(--color-text-muted);
  min-width: 80px;
  text-align: center;
}

/* ── Pantalla vacía (accesibilidad: uso de [hidden]) ── */
[hidden] {
  display: none !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .feed-layout {
    flex-direction: column;
    padding: var(--space-2) var(--space-1);
    gap: var(--space-2);
  }

  .feed-sidebar {
    width: 100%;
    position: static;
  }

  .feed-sidebar__inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-1);
  }

  .filter-section {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }

  .filter-section__title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .filter-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .filter-btn {
    width: auto;
  }

  .post-thumb {
    width: 80px;
    height: 64px;
  }

  .post-headline {
    font-size: 16px;
  }

  .feed-toolbar__title {
    font-size: 18px;
  }
}
