/* Video Entity Styles */
/* 16:9 landscape cards with 4dp rounded corners */

/* Override overflow:hidden from layer-thumbnails.css to allow video-info to appear below card */
.video-card {
  overflow: visible !important;
}

.entity-card.video .entity-thumbnail-container {
  width: var(--card-width-video);
  height: var(--card-height-video);
  border-radius: var(--card-border-radius);
  border: 0.104vw solid transparent; /* 2px at 1920px */
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.entity-card.video.focused .entity-thumbnail-container {
  border-color: var(--focus-ring-color);
  box-shadow: 0 0 var(--focus-glow-blur) var(--focus-glow-spread) var(--focus-glow-color);
}

.entity-card.video .entity-thumbnail {
  border-radius: var(--card-border-radius);
}

.entity-card.video .entity-info {
  max-width: var(--card-width-video);
}

/* Video card thumbnail container - positioned for duration overlay */
/* Container is relative with fixed dimensions so video-info can flow below it */
.video-card .video-thumbnail-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--card-border-radius);
  overflow: hidden;
  border: 0.104vw solid transparent; /* 2px at 1920px */
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.video-card.focused .video-thumbnail-container {
  border-color: var(--focus-ring-color);
  box-shadow: 0 0 var(--focus-glow-blur) var(--focus-glow-spread) var(--focus-glow-color);
}

/* Suppress browser native :focus outline - we manage focus visuals via .focused class */
.video-card:focus {
  outline: none;
}

/* Image fills the container which is absolutely positioned to fill the card */
.video-card .video-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--card-border-radius);
}

.video-duration {
  position: absolute;
  bottom: var(--spacing-sm);
  right: var(--spacing-sm);
  z-index: 10;
  padding: 0.185vh 0.313vw;     /* 2px vertical at 1080p, 6px horizontal at 1920px */
  background: rgba(0, 0, 0, 0.8);
  border-radius: 2px;
  font-size: 1.25vw;            /* 24px at 1920px (2x) */
  font-weight: 600;
  color: white;
  visibility: visible !important;
}

/* Video info container (title and stats) - below the thumbnail in normal flow */
.video-info {
  padding-top: 1vh;             /* Space between thumbnail and title */
  padding-bottom: 4vh;          /* Large spacing to prevent overlap with category titles */
  visibility: visible !important;
}

/* Video title - two lines max */
.video-title {
  font-size: 1.2vw;             /* 23px at 1920px */
  font-weight: 500;
  line-height: 1.5;             /* Increased line spacing */
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5vh;         /* Space below title */
}

/* Video stats (views and upload date) */
.video-stats {
  font-size: 1.0vw;             /* 19px at 1920px */
  line-height: 1.5;             /* Increased line spacing */
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  visibility: visible !important;
}

.video-view-count::before {
  content: "👁 ";
}

.video-published-date {
  color: var(--color-text-secondary);
}

.video-channel-name {
  font-size: 1.25vw;            /* 24px at 1920px (2x) */
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
