/* The caption keeps its footprint while the information expands over the artwork. */
.media-card .media-card-content,
.tv-card .tv-card-content {
  position: relative;
  min-height: 74px;
  padding: 0;
  flex: 0 0 74px;
  text-align: left;
}

.card-info {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  text-align: center;
  padding: 12px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.4));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.media-card .card-info h2,
.tv-card .card-info h2 {
  display: block;
  -webkit-line-clamp: unset;
  min-height: 0;
  margin: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0;
}

.card-details {
  display: none;
}

.media-card .card-info h2.has-series,
.tv-card .card-info h2.has-series { display: block; }
.card-series,
.card-episode { display: block; white-space: normal; }
.card-episode { color: #c9c9c9; font-size: 13px; font-weight: 500; line-height: 1.4; }
.tv-card .card-episode { font-size: 15px; }

.card-details p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 8px 0;
  color: #eee;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

.card-details p[hidden] { display: none; }

.media-progress,
.tv-media-progress { z-index: 2; }

.card-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 6px -3px -3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.card-facts > span {
  max-width: calc(100% - 6px);
  margin: 3px;
}

.card-facts > span:not(.superscore-star) {
  padding: 3px 5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.36);
  overflow-wrap: anywhere;
}

.card-facts .superscore-star-mark {
  --star-size: 40px;
}

.card-facts .playback-quality-label {
  flex-wrap: wrap;
}

.tv-card .tv-card-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 0;
}
.tv-card .card-info { padding: 13px 14px; }
.tv-card .card-info h2 { height: auto !important; line-height: 1.25; }
.tv-card .card-details p { font-size: 18px; }
.tv-card .card-facts { font-size: 16px; }
.tv-card .card-facts .superscore-star-mark { --star-size: 48px; }
.tv-card:hover .card-details,
.tv-card:focus .card-details { display: block; }
.tv-card:hover .card-info,
.tv-card:focus .card-info { text-align: left; }

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  .media-card:hover .card-details,
  .media-card:focus-visible .card-details { display: block; }
  .media-card:hover .card-info,
  .media-card:focus-visible .card-info { text-align: left; }
}

@media (prefers-reduced-motion: no-preference) {
  .card-details { animation: card-info-reveal 160ms ease-out; }
  @keyframes card-info-reveal {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
