/* NNPlays trailers (assets/js/trailers.js): thumbnail by default, small
   "▶ Trailer" chip; hover 2 s or click the chip to play inline. */
/* hosts keep their own positioning (the spotlight art is absolutely positioned);
   trailers.js only adds position:relative to statically positioned hosts */
.nn-trailer-host { overflow: hidden; }
.nn-trailer-host--spot .nn-trailer-chip { top: 54px; }
.nn-trailer-inline { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; object-fit: cover; background: #07060d; animation: nnTrailerIn .35s ease both; pointer-events: none; }
@keyframes nnTrailerIn { from { opacity: 0; } to { opacity: 1; } }
.nn-trailer-chip {
  position: absolute; left: 10px; top: 10px; z-index: 4; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px 5px 7px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(8, 6, 16, .62); color: #fff; font: 700 .68rem/1 "DM Sans", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.nn-trailer-chip svg { flex: none; }
.nn-trailer-chip:hover, .nn-trailer-chip:focus-visible { background: rgba(255, 45, 120, .85); transform: scale(1.05); }
.nn-trailer-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nn-trailer-host--bl .nn-trailer-chip { top: auto; bottom: 10px; }
/* while playing with sound the chip becomes a stop button */
.nn-trailer-sound .nn-trailer-chip span { font-size: 0; }
.nn-trailer-sound .nn-trailer-chip span::after { content: "Stop"; font-size: .68rem; }
/* a thin progress hint while the 2 s hover timer runs */
@media (hover: hover) and (pointer: fine) {
  .nn-trailer-bar { position: absolute; left: 0; bottom: 0; z-index: 4; height: 3px; width: 0; background: linear-gradient(90deg, #ff2d78, #a020f0); opacity: 0; pointer-events: none; }
  .nn-trailer-host:hover:not(.nn-trailer-on) .nn-trailer-bar { opacity: 1; width: 100%; transition: width 2s linear; }
}

/* homepage shelf */
.nn-trailer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.nn-trailer-card { display: flex; flex-direction: column; gap: 10px; }
.nn-trailer-thumb { display: block; aspect-ratio: 16 / 9; border-radius: 16px; background: #07060d; }
.nn-trailer-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nn-trailer-card__copy h3 { margin: 2px 0 4px; font: 800 1.08rem/1.2 Syne, system-ui, sans-serif; }
.nn-trailer-card__copy p { margin: 0 0 10px; color: var(--text2, #b8b3c7); font-size: .9rem; line-height: 1.45; }
.nn-trailer-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) { .nn-trailer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .nn-trailer-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .nn-trailer-card { scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { .nn-trailer-inline { animation: none; } }
