/*
VidWatch cards.

Loaded only by themes/wondertag/layout/yub-vids/includes/vidwatch-css.phtml.
That include is called from the VidWatch layouts. The link uses this
file's modification time as its cache key. These rules are not in
custom/css/style.css, so the admin Custom CSS screen does not own them.

The main feed (#mlposts.wt-yt-feed) is two cards wide, and one card wide
below 768px. A wow_content block that is not a video card, such as an ad
the admin already wrapped, spans the full row.
*/

/* Two columns on the main VidWatch feed. One column on a phone. */
#mlposts.wt-yt-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  align-items: start;
}
@media (max-width: 767px) {
  #mlposts.wt-yt-feed {
    grid-template-columns: 1fr;
  }
}

/* Ads and other non-card blocks use the whole row. Video cards stay in a cell. */
#mlposts.wt-yt-feed > .wow_content:not(.wt-yt-card),
#mlposts.wt-yt-feed > .loading-status,
#mlposts.wt-yt-feed > .user-ad-container,
#mlposts.wt-yt-feed > .post:not(.wt-yt-card) {
  grid-column: 1 / -1;
}

/* wow_content supplies the card box. Keep the cell from overflowing the grid. */
.wt-yt-card {
  min-width: 0;
  margin: 0;
}

/* 16:9 thumbnail. The play mark shows when the pointer is over the image. */
.wt-yt-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
}
.wt-yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wt-yt-thumb:hover img {
  filter: brightness(0.86);
}
.wt-yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 32px;
  margin: -16px 0 0 -23px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.wt-yt-play:after {
  content: "";
  position: absolute;
  left: 18px;
  top: 8px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}
.wt-yt-thumb:hover .wt-yt-play {
  opacity: 1;
}

/* YouTube, BitChute, Rumble, or Odysee, drawn on the thumbnail. */
.wt-yt-source {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
}

/* Title, channel, and view count under the thumbnail. */
.wt-yt-meta {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.wt-yt-avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}
.wt-yt-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wt-yt-text {
  min-width: 0;
}
.wt-yt-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  color: inherit;
  text-decoration: none;
}
.wt-yt-channel,
.wt-yt-sub {
  display: block;
  margin-top: 2px;
  color: #8b8b8b;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}
.wt-yt-sub {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Shown in the feed while Load More is fetching the next cards. */
.wt-yt-loading {
  padding: 12px 0 4px;
  color: #8b8b8b;
  font-size: 14px;
}
