/* Social Feed Showcase — Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --sfs-yt:       #ff0000;
  --sfs-x:        #0f1419;
  --sfs-radius:   12px;
  --sfs-shadow:   0 2px 16px rgba(0,0,0,0.08);
  --sfs-shadow-h: 0 8px 32px rgba(0,0,0,0.14);
  --sfs-border:   #e2e8f0;
  --sfs-text:     #1a202c;
  --sfs-muted:    #718096;
  --sfs-font:     'DM Sans', system-ui, -apple-system, sans-serif;
  /* Orange-yellow gradient from the image */
  --sfs-cta-from: #f5a623;
  --sfs-cta-to:   #f76b1c;
}

/* Error state */
.sfs-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--sfs-radius);
  color: #c53030;
  font-family: var(--sfs-font);
  font-size: 14px;
}
.sfs-error-icon { font-size: 18px; }

/* Combined feed layout */
.sfs-combined-feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .sfs-combined-feed { grid-template-columns: 1fr; }
}

/* ── Card base ─────────────────────────────── */
.sfs-card {
  font-family: var(--sfs-font);
  background: #fff;
  border: 1px solid var(--sfs-border);
  border-radius: var(--sfs-radius);
  overflow: hidden;
  box-shadow: var(--sfs-shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}
.sfs-card:hover {
  box-shadow: var(--sfs-shadow-h);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════
   YOUTUBE CARD  — thumbnail-first, no top header
══════════════════════════════════════════════ */

/* Thumbnail wrapper — no top padding, flush edge-to-edge */
.sfs-youtube-card { border-radius: var(--sfs-radius); }

.sfs-thumb-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: #000;
  cursor: pointer;
  overflow: hidden;
  /* Top corners match card radius, bottom is square */
  border-radius: var(--sfs-radius) var(--sfs-radius) 0 0;
  display: block;
}
.sfs-thumb-wrap:focus-visible { outline: 3px solid #2271b1; outline-offset: 2px; }

.sfs-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, filter .35s ease;
}
.sfs-thumb-wrap:hover .sfs-thumb-img,
.sfs-thumb-wrap:focus .sfs-thumb-img {
  transform: scale(1.03);
  filter: brightness(.85);
}

/* YouTube play button — exactly like YouTube's own */
.sfs-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 68px;
  height: 48px;
  transition: transform .2s ease, opacity .2s ease;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.45));
}
.sfs-play-bg  { fill: #212121; opacity: .85; transition: opacity .2s; }
.sfs-play-arrow { fill: #fff; }

.sfs-thumb-wrap:hover .sfs-play-btn { transform: translate(-50%, -50%) scale(1.1); }
.sfs-thumb-wrap:hover .sfs-play-bg  { opacity: 1; fill: #ff0000; }

/* "Watch on YouTube" watermark — bottom right, like real embeds */
.sfs-yt-watermark {
  position: absolute;
  bottom: 10px;
  right: 12px;
  opacity: .9;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}

/* Inline iframe (shown after click) */
.sfs-video-wrapper {
  position: absolute;
  inset: 0;
  display: none;
}
.sfs-video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.sfs-thumb-wrap.sfs-playing .sfs-video-wrapper { display: block; }
.sfs-thumb-wrap.sfs-playing .sfs-thumb-img,
.sfs-thumb-wrap.sfs-playing .sfs-play-btn,
.sfs-thumb-wrap.sfs-playing .sfs-yt-watermark { display: none; }

/* Card body */
.sfs-card-body { padding: 16px 18px 20px; }

.sfs-video-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--sfs-text);
  margin: 0 0 10px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sfs-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--sfs-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sfs-channel,
.sfs-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* CTA row — centered */
.sfs-btn-row {
  display: flex;
  justify-content: center;
}

/* Watch Now button — orange-yellow pill like the image */
.sfs-watch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 36px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--sfs-font);
  letter-spacing: .01em;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--sfs-cta-from) 0%, var(--sfs-cta-to) 100%);
  box-shadow: 0 4px 14px rgba(247, 107, 28, 0.45);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  border: none;
  cursor: pointer;
}
.sfs-watch-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 20px rgba(247, 107, 28, 0.55);
  filter: brightness(1.06);
  color: #fff;
  text-decoration: none;
}
.sfs-watch-btn:active { transform: scale(.97); }

/* ══════════════════════════════════════════════
   X / TWITTER CARD
══════════════════════════════════════════════ */
.sfs-twitter-card .sfs-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--sfs-border);
  background: #fafafa;
}
.sfs-badge-label {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--sfs-muted);
}
.sfs-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}
.sfs-icon { width: 14px; height: 14px; flex-shrink: 0; }
.sfs-x-badge { background: #e7e7e7; color: var(--sfs-x); }

.sfs-tweet-body { padding: 20px; }
.sfs-author {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.sfs-author-info { display: flex; flex-direction: column; gap: 2px; }
.sfs-author-name  { font-weight: 700; font-size: 15px; color: var(--sfs-text); font-family: var(--sfs-font); }
.sfs-author-handle { font-size: 13px; color: var(--sfs-muted); font-family: var(--sfs-font); }
.sfs-tweet-date { font-size: 12px; color: var(--sfs-muted); white-space: nowrap; font-family: var(--sfs-font); }

.sfs-tweet-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--sfs-text);
  margin: 0 0 16px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--sfs-font);
}

.sfs-tweet-media {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--sfs-border);
}
.sfs-tweet-media img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 300px;
  object-fit: cover;
}

.sfs-tweet-metrics {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--sfs-border);
  border-bottom: 1px solid var(--sfs-border);
}
.sfs-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sfs-muted);
  font-family: var(--sfs-font);
  cursor: default;
  transition: color .15s;
}
.sfs-metric svg { width: 15px; height: 15px; }
.sfs-likes:hover    { color: #e0245e; }
.sfs-retweets:hover { color: #17bf63; }
.sfs-replies:hover  { color: #1da1f2; }

.sfs-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  font-family: var(--sfs-font);
}
.sfs-x-btn { background: var(--sfs-x); color: #fff; }
.sfs-x-btn:hover { background: #333; color: #fff; text-decoration: none; }


