/* ============================================================
   YouTube Dynamic Feed — youtube-feed.css
   Vervangt de oude WordPress "Feeds for YouTube" plugin stijlen
   ============================================================ */

/* ── Container ────────────────────────────────────────────── */
#yt-dynamic-feed {
  width: 100%;
  padding: 0;
}

/* ── Grid ─────────────────────────────────────────────────── */
.yt-feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

@media (max-width: 980px) {
  .yt-feed-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 560px) {
  .yt-feed-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── Video kaart ──────────────────────────────────────────── */
.yt-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  /* Fade-in animatie (wordt getriggerd via JS) */
  opacity: 0;
  transform: translateY(10px);
}

.yt-card--visible {
  animation: yt-fadein 0.4s ease forwards;
}

@keyframes yt-fadein {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.yt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}

/* ── Thumbnail wrapper ────────────────────────────────────── */
.yt-card__thumb-wrap {
  display: block;
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  overflow: hidden;
  background: #111;
}

.yt-card__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.yt-card:hover .yt-card__thumb {
  transform: scale(1.04);
  opacity: 0.88;
}

/* ── Play button overlay ──────────────────────────────────── */
.yt-card__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 56px;
  height: 40px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.yt-card:hover .yt-card__play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Tekst info ───────────────────────────────────────────── */
.yt-card__info {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yt-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: #1a1a1a;
}

.yt-card__title a {
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-card__title a:hover {
  color: #0073aa;
}

.yt-card__date {
  font-size: 0.75rem;
  color: #888;
  margin-top: auto;
}

/* ── Skeleton loading ─────────────────────────────────────── */
.yt-card--skeleton {
  pointer-events: none;
  opacity: 1;
  transform: none;
  animation: none;
}

.yt-skeleton-box {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: yt-shimmer 1.5s infinite;
  width: 100%;
  padding-top: 56.25%;
}

.yt-skeleton-line {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: yt-shimmer 1.5s infinite;
  border-radius: 4px;
  height: 14px;
}

.yt-skeleton-line--title {
  width: 85%;
  height: 14px;
  margin-bottom: 4px;
}

.yt-skeleton-line--date {
  width: 45%;
  height: 11px;
}

@keyframes yt-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Fout/fallback staat ──────────────────────────────────── */
.yt-feed-error {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: #666;
  gap: 12px;
}

.yt-feed-error svg {
  color: #ccc;
}

.yt-feed-error p {
  margin: 0;
  font-size: 1rem;
}

.yt-feed-error__link {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 20px;
  background: #ff0000;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s;
}

.yt-feed-error__link:hover {
  background: #cc0000;
  color: #fff;
}

/* ── Kanaal header (abonnees teller) ──────────────────────── */
.yt-feed-channel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  text-decoration: none;
  color: inherit;
}

.yt-feed-channel-header img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.yt-feed-channel-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.yt-feed-sub-count {
  font-size: 0.8rem;
  color: #666;
}
