/*
 * Design system: cards de vídeo.
 *
 * O tema tem ~12 marcações de card (home, latest, busca/studio, histórico,
 * salvos, relacionados, playlist, analytics, filmes, shorts...). Aqui todas
 * recebem o mesmo visual:
 *   - thumb 16:9 (9:16 em shorts), raio --radius-lg, fundo --muted;
 *   - badge de duração escuro no canto inferior direito;
 *   - título em até 2 linhas, metadados em --muted-foreground;
 *   - hover discreto (sem zoom, só realce do thumb).
 *
 * Seletores agrupados por papel: THUMB, IMG, DURATION, TITLE, META.
 */

/* ---------- Thumb ---------- */


.video-latest-list .video-thumb a,
.related-video-wrapper .ra-thumb a{
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) !important;
  background: var(--muted) !important;
  isolation: isolate;
}


.video-latest-list .video-thumb img,
.related-video-wrapper .ra-thumb img{
  border-radius: 0 !important;
  object-fit: cover;
  transition: filter var(--duration) var(--ease), transform .4s var(--ease);
}


.video-latest-list .video-thumb a:hover img,
.related-video-wrapper .ra-thumb a:hover img{
  filter: brightness(.92);
  transform: none;
  opacity: 1;
}

.related-video-wrapper .ra-thumb {
  border-radius: var(--radius-lg) !important;
}

.related-video-wrapper .ra-thumb a {
  padding-bottom: 56.25% !important;
}



/* Botão de play no hover: só um véu leve, sem ícone grande */

.video-latest-list .video-thumb .play_hover_btn{
  border-radius: 0 !important;
  background: linear-gradient(to top, rgb(0 0 0 / 35%), transparent 50%) !important;
}


.video-latest-list .video-thumb .play_hover_btn svg{
  width: 44px !important;
  height: 44px !important;
  padding: 10px;
  border-radius: var(--radius-full);
  background: rgb(0 0 0 / 55%);
  fill: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ---------- Badges sobre o thumb ---------- */


.video-latest-list .video-thumb .video-duration,
.related-video-wrapper .ra-thumb .video-duration{
  position: absolute;
  top: auto !important;
  right: 6px !important;
  left: auto !important;
  bottom: 6px !important;
  z-index: 2;
  height: auto !important;
  padding: 2px 6px !important;
  border-radius: var(--radius-sm) !important;
  background-color: var(--media-overlay) !important;
  color: #fff !important;
  font-size: var(--text-xs) !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}

.shorts_badge {
  border-radius: var(--radius-sm) !important;
  background-color: var(--media-overlay) !important;
  color: #fff !important;
  font-size: var(--text-xs) !important;
  font-weight: 600;
}

.wow_liv_counter span,
.wow_liv_counter {
  border-radius: var(--radius-sm) !important;
  background: var(--live) !important;
  color: #fff !important;
  font-size: var(--text-2xs) !important;
  font-weight: 700 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---------- Título ---------- */


.video-latest-list .video-title h4,
.related-video-wrapper .ra-title .video-title,
.related-video-wrapper .ra-title .video-title a{
  display: -webkit-box;
  height: auto !important;
  max-height: none !important;
  margin: 0;
  overflow: hidden;
  color: var(--foreground) !important;
  font-size: var(--text-md);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.005em;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-video-wrapper .ra-title .video-title,
.related-video-wrapper .ra-title .video-title a{
  font-size: var(--text-base);
}


.video-latest-list .video-title h4 {
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
}


.video-latest-list .video-title a:hover h4 {
  color: var(--foreground) !important;
}

/* ---------- Metadados ---------- */


.video-latest-list.video-wrapper .video-info,
.video-latest-list.video-wrapper .video-info a,
.video-latest-list.video-wrapper .video-info span,
.related-video-wrapper .ra-title .video-publisher,
.related-video-wrapper .ra-title .video-publisher a,
.related-video-wrapper .ra-title .video-views{
  color: var(--muted-foreground) !important;
  font-size: var(--text-sm) !important;
  font-weight: 400;
  line-height: 1.5;
}


.video-latest-list.video-wrapper .video-info a:hover,
.related-video-wrapper .ra-title .video-publisher a:hover {
  color: var(--foreground) !important;
}


.video-latest-list .video-info .bold {
  margin: 0 2px;
}



/* Relacionados: sem a "pílula" de categoria em cada item */
.related-video-wrapper .ra-title .video-category {
  display: none;
}

/* ---------- Linha com avatar (home/list, videos/list) ---------- */

.pt-vcard-body {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-3);
}

.pt-vcard-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.pt-vcard-avatar img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--muted);
}

.pt-vcard-text {
  flex: 1;
  min-width: 0;
}


.pt-vcard-body .video-title h4 {
  margin-top: 0 !important;
}

/* Em contêineres estreitos (sliders da home, colunas pequenas) o avatar some */
.short .pt-vcard-avatar{
  display: none;
}

/* ---------- Card horizontal (busca, studio, histórico) ---------- */






.video-latest-list .descc {
  margin-top: var(--space-2);
  color: var(--muted-foreground);
  font-size: var(--text-sm);
}

/* ---------- Card compacto (relacionados, fila, playlist) ---------- */

.related-video-wrapper {
  gap: var(--space-3);
  margin-bottom: var(--space-3) !important;
}

.related-video-wrapper .ra-thumb {
  width: 168px !important;
  min-width: 168px !important;
  margin: 0 !important;
}

.related-video-wrapper .ra-title .video-title {
  margin-bottom: var(--space-1) !important;
}







/* ---------- Shorts (9:16) ---------- */

.video-latest-list.short .video-thumb a{
  padding-bottom: 177.77% !important;
  border-radius: var(--radius-xl) !important;
}

/* ---------- Card de playlist ---------- */





/* ---------- Grade de vídeos ---------- */

.video-latest-list.video-wrapper{
  margin-bottom: var(--space-8) !important;
}

@media (max-width: 767px) {
  .video-latest-list.video-wrapper{
    margin-bottom: var(--space-6) !important;
  }

  .related-video-wrapper .ra-thumb {
    width: 148px !important;
    min-width: 148px !important;
  }
}

/* ---------- Botão de inscrição ---------- */















/* O img do thumb é absoluto e sem raio; o avatar dentro do card não */

.video-latest-list .pt-vcard-avatar img {
  position: static;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full) !important;
}

/* Canal: o 1º vídeo vira um card horizontal grande no desktop; no mobile volta ao card normal */




/* RTL: badge de duração no canto inferior esquerdo */

[dir="rtl"] .video-latest-list .video-thumb .video-duration,
[dir="rtl"] .related-video-wrapper .ra-thumb .video-duration{
  right: auto !important;
  left: 6px !important;
}
