/**
 * ============================================================================
 * FEED.CSS - News Feed Card Styles
 * Styles for the enhanced news feed cards with images, summaries, and CTAs
 * ============================================================================
 */

/* Feed Container */
.feed-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Empty State */
.feed-empty {
  text-align: center;
  padding: 2rem;
  color: var(--color-slate-500);
  font-style: italic;
}

/* Feed Card */
.feed-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--color-slate-200);
  border-radius: 0.5rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.feed-card:hover {
  border-color: var(--color-slate-300);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Image Wrapper */
.feed-card__image-wrapper {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
}

.feed-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.25rem;
}

/* Placeholder for articles without images */
.feed-card__image--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-slate-100) 0%, var(--color-slate-200) 100%);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.feed-card__image--placeholder::after {
  content: "DG";
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-slate-400);
  letter-spacing: 0.1em;
}

/* Content Area */
.feed-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Allow text truncation */
}

/* Title */
.feed-card__title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-slate-900);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

/* AI Summary */
.feed-card__summary {
  font-size: 0.875rem;
  color: var(--color-slate-600);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta Row (tag, author, time) */
.feed-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-slate-500);
  margin-bottom: 0.5rem;
}

.feed-card__author-time {
  white-space: nowrap;
}

/* Tag Badge */
.feed-card__tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feed-card__tag.scouting-report {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--color-accent-indigo);
}

.feed-card__tag.big-board {
  background-color: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.feed-card__tag.mock-draft {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.feed-card__tag.tier-update {
  background-color: rgba(6, 182, 212, 0.1);
  color: var(--color-accent-cyan);
}

.feed-card__tag.game-recap {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-accent-emerald);
}

.feed-card__tag.film-study {
  background-color: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.feed-card__tag.skill-theme {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-accent-amber);
}

.feed-card__tag.team-fit {
  background-color: rgba(20, 184, 166, 0.1);
  color: #14b8a6;
}

.feed-card__tag.draft-intel {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.feed-card__tag.stats-analysis {
  background-color: rgba(71, 85, 105, 0.1);
  color: #475569;
}

/* CTA Button */
.feed-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  margin-top: auto;
  transition: color 0.2s ease;
}

.feed-card__cta:hover {
  color: var(--color-primary-dark, #3d6a9e);
  text-decoration: underline;
}

.feed-card__cta .icon {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Player-specific card highlight */
.feed-card--player-specific {
  border-left: 3px solid var(--color-accent-cyan);
  background: rgba(6, 182, 212, 0.03);
  box-shadow: 0 1px 6px rgba(6, 182, 212, 0.1);
}

.feed-card--player-specific:hover {
  border-left-color: var(--color-accent-cyan);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.15);
}

/* "Mentioned" badge on player-specific articles */
.feed-card__mention-badge {
  display: inline-block;
  padding: 0.0625rem 0.375rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #d1fae5;
  color: #065f46;
}

/* Divider between player-specific and backfill articles */
.feed-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

.feed-divider::before,
.feed-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-slate-200);
}

.feed-divider__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-slate-400);
  white-space: nowrap;
}

/* Responsive: Stack on mobile */
@media (max-width: 480px) {
  .feed-card {
    flex-direction: column;
  }

  .feed-card__image-wrapper {
    width: 100%;
    height: 160px;
  }
}

/* Legacy feed-item styles (for backwards compatibility during transition) */
.feed-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-slate-200);
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-slate-900);
  margin: 0 0 0.25rem 0;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-slate-500);
}

.feed-meta .icon {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.feed-tag {
  margin-left: auto;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

.feed-tag.riser {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-accent-emerald);
}

.feed-tag.faller {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ============================================================================
   PAGINATION STYLES
   Pills and navigation for paginated feed
   ============================================================================ */

.feed-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.feed-pagination__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--color-slate-200);
  border-radius: 9999px;
  background: white;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.feed-pagination__pill:hover:not(.active):not(:disabled) {
  border-color: var(--color-slate-300);
  background: var(--color-slate-50);
  color: var(--color-slate-900);
}

.feed-pagination__pill.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
}

.feed-pagination__pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.feed-pagination__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-slate-200);
  border-radius: 9999px;
  background: white;
  color: var(--color-slate-500);
  cursor: pointer;
  transition: all 0.15s ease;
}

.feed-pagination__arrow:hover:not(:disabled) {
  border-color: var(--color-slate-300);
  background: var(--color-slate-50);
  color: var(--color-slate-900);
}

.feed-pagination__arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.feed-pagination__arrow .icon {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.feed-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-slate-400);
}

/* Fuchsia variant for podcast pagination */
.feed-pagination__pill.active.active--fuchsia {
  border-color: var(--color-accent-fuchsia);
  background: var(--color-accent-fuchsia);
  color: white;
}

/* Responsive: Tighter spacing on mobile */
@media (max-width: 480px) {
  .feed-pagination {
    gap: 0.25rem;
  }

  .feed-pagination__pill {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
  }

  .feed-pagination__arrow {
    width: 2rem;
    height: 2rem;
  }
}

/* ============================================================================
   MEDIA FEED TABS
   Tab bar for switching between Articles and Podcasts on player pages
   ============================================================================ */

.media-feed-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-slate-200);
  margin-bottom: 1rem;
}

.media-feed-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-slate-400);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.media-feed-tab:hover {
  color: var(--color-slate-600);
}

.media-feed-tab .icon {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.media-feed-tab.active--articles {
  color: var(--color-accent-cyan);
  border-bottom-color: var(--color-accent-cyan);
}

.media-feed-tab.active--podcasts {
  color: var(--color-accent-fuchsia);
  border-bottom-color: var(--color-accent-fuchsia);
}

.media-feed-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  background: var(--color-slate-100);
  color: var(--color-slate-500);
}

.media-feed-tab.active--articles .media-feed-tab__count {
  background: rgba(6, 182, 212, 0.12);
  color: var(--color-accent-cyan);
}

.media-feed-tab.active--podcasts .media-feed-tab__count {
  background: rgba(217, 70, 239, 0.12);
  color: var(--color-accent-fuchsia);
}

/* Panel visibility */
.media-feed-panel {
  display: none;
}

.media-feed-panel.active {
  display: block;
}

/* ============================================================================
   PODCAST CARDS
   Card layout for podcast episodes on player detail pages
   ============================================================================ */

.podcast-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--color-slate-200);
  border-left: 3px solid var(--color-accent-fuchsia);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.podcast-card:hover {
  border-color: var(--color-slate-300);
  border-left-color: var(--color-accent-fuchsia);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.podcast-card--player-specific {
  background: rgba(217, 70, 239, 0.03);
  box-shadow: 0 1px 6px rgba(217, 70, 239, 0.1);
}

.podcast-card--player-specific:hover {
  border-left-color: var(--color-accent-fuchsia);
  box-shadow: 0 2px 10px rgba(217, 70, 239, 0.15);
}

/* Artwork */
.podcast-card__artwork-wrapper {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.podcast-card__artwork {
  width: 80px;
  height: 80px;
  border-radius: 0.375rem;
  object-fit: cover;
}

.podcast-card__artwork--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-slate-100) 0%, var(--color-slate-200) 100%);
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--color-slate-400);
}

/* Content */
.podcast-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.podcast-card__show-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.podcast-card__show {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent-fuchsia);
}

.podcast-card__title {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-slate-900);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.podcast-card__summary {
  font-size: 0.8125rem;
  color: var(--color-slate-600);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row */
.podcast-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-slate-500);
  margin-top: auto;
}

.podcast-card__duration,
.podcast-card__time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

.podcast-card__time::before {
  content: "•";
  margin-right: 0.5rem;
}

.podcast-card__mention-badge {
  display: inline-block;
  padding: 0.0625rem 0.375rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(217, 70, 239, 0.1);
  color: #a21caf;
}

.podcast-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent-fuchsia);
  text-decoration: none;
  margin-left: auto;
  transition: color 0.2s ease;
}

.podcast-card__cta:hover {
  color: #a21caf;
  text-decoration: underline;
}

.podcast-card__cta .icon {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Responsive: Stack podcast cards on mobile */
@media (max-width: 480px) {
  .podcast-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .podcast-card__artwork-wrapper {
    width: 60px;
    height: 60px;
  }

  .podcast-card__artwork {
    width: 60px;
    height: 60px;
  }

  .podcast-card__meta {
    flex-wrap: wrap;
  }

  .media-feed-tab {
    font-size: 0.6875rem;
    padding: 0.5rem 0.625rem;
  }
}
