/* Minimal video cards inspired by the clean structure of segavideo.it. */

html[data-theme-style] {
  --video-card-radius: 10px;
  --video-card-meta: var(--palette-muted);
  --video-card-overlay: rgba(8, 8, 8, .78);
}

/* No card panel: image, title and metadata only. */
html[data-theme-style] .list-videos .item {
  padding-bottom: 12px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

html[data-theme-style] .list-videos .item > a {
  display: block;
}

html[data-theme-style] .list-videos .item .img {
  position: relative;
  overflow: hidden;
  background: var(--palette-control);
  border: 0;
  border-radius: var(--video-card-radius);
  box-shadow: none;
  transform: none;
}

html[data-theme-style] .list-videos .item .img img:first-child {
  object-fit: cover;
  border-radius: inherit;
  transform: none;
  transition: opacity .2s ease;
}

html[data-theme-style] .no-touch .list-videos .item:hover .img,
html[data-theme-style] .no-touch .list-videos .item:hover .img img:first-child {
  box-shadow: none;
  filter: none;
  transform: none;
}

html[data-theme-style] .no-touch .list-videos .item:hover .img img:first-child {
  opacity: .94;
}

/* Small, neutral information badges. */
html[data-theme-style] .list-videos .is-hd {
  top: 7px;
  right: 7px;
  z-index: 4;
  padding: 3px 6px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: .04em;
  background: var(--video-card-overlay);
  border: 0;
  border-radius: 5px;
  box-shadow: none;
  opacity: 1;
}

html[data-theme-style] .list-videos .duration {
  right: 7px;
  bottom: 7px;
  left: auto;
  z-index: 4;
  min-height: 20px;
  padding: 3px 6px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  background: var(--video-card-overlay);
  border: 0;
  border-radius: 5px;
  box-shadow: none;
  backdrop-filter: none;
}

html[data-theme-style] .list-videos .line-private,
html[data-theme-style] .list-videos .line-premium {
  right: auto;
  bottom: 7px;
  left: 7px;
  z-index: 4;
  max-width: calc(100% - 78px);
  padding: 2px 6px;
  overflow: hidden;
  color: #ffffff;
  font-size: 10px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--video-card-overlay);
  border: 0;
  border-radius: 5px;
  backdrop-filter: none;
}

/* Two-line title with the same compact rhythm as the reference. */
html[data-theme-style] .list-videos .item .title {
  display: -webkit-box;
  height: auto;
  min-height: 36px;
  margin: 8px 0 6px;
  padding: 0;
  overflow: hidden;
  color: var(--palette-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color .18s ease;
}

html[data-theme-style] .no-touch .list-videos .item:hover .title {
  color: var(--palette-accent);
}

/* Quiet metadata line: views, rating and date. */
html[data-theme-style] .list-videos .item .wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 0;
  color: var(--video-card-meta);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

html[data-theme-style] .list-videos .item .wrap div {
  min-width: 0;
  padding: 0 0 0 16px;
  overflow: hidden;
  color: var(--video-card-meta);
  text-overflow: ellipsis;
}

html[data-theme-style] .list-videos .item .wrap div::before {
  top: 50%;
  color: currentColor;
  font-size: 12px;
  opacity: .72;
}

html[data-theme-style] .list-videos .item .wrap .views {
  padding-left: 17px;
}

html[data-theme-style] .list-videos .item .wrap .added {
  margin-left: auto;
}

html[data-theme-style] .list-videos .item .wrap .positive,
html[data-theme-style] .list-videos .item .wrap .negative {
  color: var(--video-card-meta);
}

/* Favourite actions remain small and unobtrusive. */
html[data-theme-style] .list-videos .item [class*="ico-fav"] {
  width: 30px;
  height: 30px;
  color: #ffffff;
  line-height: 30px;
  background: var(--video-card-overlay);
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
}

html[data-theme-style] .list-videos .item .ico-fav-0 {
  top: 7px;
  left: 7px;
}

html[data-theme-style] .list-videos .item .ico-fav-1 {
  top: 7px;
  left: 42px;
}

html[data-theme-style] .no-touch .list-videos .item [class*="ico-fav"]:hover {
  color: var(--palette-on-accent);
  background: var(--palette-accent);
}

/* Clear keyboard focus without decorative effects. */
html[data-theme-style] .list-videos .item > a:focus-visible {
  outline: none;
}

html[data-theme-style] .list-videos .item > a:focus-visible .img {
  outline: 2px solid var(--palette-accent);
  outline-offset: 2px;
}

/* Featured thumbnails follow the same minimal language. */
html[data-theme-style] .card-image {
  overflow: hidden;
  background: var(--palette-control);
  border: 0;
  border-radius: var(--video-card-radius);
  box-shadow: none;
  transform: none;
}

html[data-theme-style] .card-image img,
html[data-theme-style] .card-image .no-thumb {
  border-radius: inherit;
}

html[data-theme-style] .card-image .duration {
  right: 7px;
  bottom: 7px;
  left: auto;
  z-index: 3;
  color: #ffffff;
  background: var(--video-card-overlay);
  border-radius: 5px;
}

html[data-theme-style] .no-touch a:hover .card-image {
  box-shadow: none;
  transform: none;
}

@media screen and (max-width: 785px) {
  html[data-theme-style] .list-videos .item .title {
    min-height: 34px;
    font-size: 13px;
    line-height: 17px;
  }

  html[data-theme-style] .list-videos .item .wrap {
    gap: 8px;
    font-size: 10px;
  }

  html[data-theme-style] .list-videos .item .wrap .added {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  html[data-theme-style] .list-videos .item {
    padding-bottom: 6px;
  }

  html[data-theme-style] .list-videos .item .title {
    min-height: 0;
  }

  html[data-theme-style] .list-videos .item .wrap .rating {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme-style] .list-videos .item .img img:first-child,
  html[data-theme-style] .list-videos .item .title {
    transition: none;
  }
}
