@layer components {
/* ========================================
   VIDEO CARDS
   ESCOPO: Cards e grid de vídeo reutilizáveis.
   Seletores de categoria (.category-nav-btn, .categories-row, .category-card)
   e admin (.btn-upload, .cat-delete) removidos — dono comprovado em
   administracao.css e admin-channels.js. JS em ui-components.js referencia
   categorias mas não há template público que renderiza o markup.
   ======================================== */

/* -------------------------
   VIDEO GRID / CARDS
   ------------------------- */
.videos-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  margin-top: 18px;
  max-width: 100%;
  box-sizing: border-box;
}

@media (width <= 768px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Wrapper para conter video card */
.video-card-wrapper {
  display: flex;
  flex-direction: column;
}

.video-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgb(255 255 255 / 2%), rgb(0 0 0 / 10%));
  border: 1px solid rgb(138 43 226 / 15%);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s ease,
    border-color 0.3s ease;
  will-change: transform;
  position: relative;
  pointer-events: auto;
}

.video-card-wrapper .video-card {
  flex: 1;
}

/* Borda neon sutil no estado normal */
.video-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgb(138 43 226 / 20%), rgb(255 102 204 / 10%));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover::before {
  opacity: 1;
}

.video-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 25px 50px rgb(138 43 226 / 20%),
    0 0 30px rgb(138 43 226 / 10%);
  border-color: rgb(138 43 226 / 40%);
}

@media (width <= 768px) {
  .video-card .video-thumbnail {
    height: 100px;
  }

  .video-card .video-title {
    font-size: 13px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .video-card .video-meta {
    font-size: 11px;
  }
}

@media (width <= 480px) {
  .videos-grid {
    grid-template-columns: 1fr;
  }

  .video-card .video-thumbnail {
    height: 140px;
  }

  .video-card .video-title {
    font-size: 14px;
  }
}

.video-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #000;
}

.video-thumbnail img,
.video-thumbnail .video-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.04);
}

.video-thumbnail .play-icon {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: linear-gradient(90deg, rgb(0 0 0 / 40%), rgb(0 0 0 / 20%));
  padding: 6px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgb(0 0 0 / 40%);
}

.video-thumbnail .play-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

/* Botão de Favoritar */
.favorite-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgb(0 0 0 / 60%);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 18px;

  /* Pill shape */
  min-width: 36px;
  width: auto;
  height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow: 0 2px 8px rgb(0 0 0 / 30%);

  /* Prevenir clique no link quando clicar no botão */
  pointer-events: auto;
}

.favorite-count {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.favorite-btn:hover {
  background: rgb(255 102 204 / 90%);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgb(255 102 204 / 40%);
}

.favorite-btn .heart-icon {
  stroke: #fff;
  transition: all 0.3s ease;
}

.favorite-btn.favorited .heart-icon {
  fill: #f6c;
  stroke: #f6c;
  animation: heartBeat 0.3s ease;
}

.video-actions-bar .favorite-btn {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-outline);
  background: rgb(255 255 255 / 3%);
  color: var(--color-surface-contrast);
  min-width: unset;
  height: auto;
}

.video-actions-bar .favorite-btn .heart-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.video-actions-bar .favorite-btn .favorite-count {
  color: var(--color-surface-contrast);
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}


.video-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-2);
  margin: 0;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.channel-avatar,
.channel-avatar-large {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.video-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

/* No results — usado em index.html e outras páginas */
.no-results {
  font-size: 18px;
  color: #666;
  margin-bottom: 8px;
}

/* ===== CSS inline migrado da Fase 3 ===== */

.video-card__briefcase-media-layout {
  width: 16px;
  height: 16px;
}
}
