/* YouTube Feeds - front end */
.ytf-empty {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(0,0,0,0.15);
}

.ytf-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}

.ytf-list-title {
  margin: 22px 0 12px;
  font-size: 16px;
  font-weight: 700;
  opacity: 0.95;
  color:white!important
}

/* Player: max height 800px, centered */
.ytf-player-wrap {
  width: min(100%, 1422px); /* 800px * 16/9 */
  aspect-ratio: 16 / 9;
  max-width: 800px;
  margin: 0 auto 16px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.ytf-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Pager wrapper */
.ytf-grid-pager {
  position: relative;
  padding: 0 44px;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}


.ytf-pager {
  position: absolute;
  top: 0;
  bottom: 22px; /* leave room for status */
  width: 38px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.ytf-pager:hover {
  background: rgba(0,0,0,0.65);
}

.ytf-pager:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ytf-pager-prev { left: 0; }
.ytf-pager-next { right: 0; }

/* Grid - dynamic columns (set by JS via --ytf-cols) */
.ytf-grid {
  display: grid;
  grid-template-columns: repeat(var(--ytf-cols, 3), minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  transition: opacity 180ms ease, transform 180ms ease;
  will-change: opacity, transform;
}

@media (max-width: 560px) {
  .ytf-grid-pager { padding: 0 34px; }
  .ytf-pager { width: 30px; font-size: 24px; border-radius: 10px; }
  .ytf-grid { grid-template-columns: repeat(var(--ytf-cols, 1), minmax(0, 1fr)); }
}

@media (min-width: 561px) and (max-width: 900px) {
  .ytf-grid { grid-template-columns: repeat(var(--ytf-cols, 2), minmax(0, 1fr)); }
}

/* Animation classes toggled from JS */
.ytf-grid.is-anim-out {
  opacity: 0;
  transform: translateY(6px);
}

.ytf-grid.is-anim-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .ytf-grid { transition: none; }
}

/* Card */
.ytf-item {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: transform 0.3s ease;
}

.ytf-item:hover {
  /* Scale 1.05 represents 110% of the original size */
  transform: scale(1.05);
}

.ytf-item:focus-visible {
  outline: 2px solid rgba(255,255,255,0.55);
  outline-offset: 3px;
  border-radius: 16px;
}

.ytf-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}

.ytf-item.is-active .ytf-card {
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 14px 34px rgba(0,0,0,0.30);
}

.ytf-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0,0,0,0.25);
}

.ytf-card-img {
  width: 100%;
  height: 100%!important;
  object-fit: cover;
  display: block;
}

.ytf-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.ytf-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.7));
}

.ytf-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ytf-card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ytf-card-sep {
  opacity: 0.65;
}

/* Page indicator */
.ytf-pager-status {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  opacity: 0.75;
  user-select: none;
  color:white;
}
