/* NETBOM DZ - Watch 16:9 on desktop + clean trailer frame
   Safe CSS override only. No server/backend changes. */

/* 1) واجهة المشاهدة على الحاسوب فقط: تجعل المشغل بنفس نسبة التريلر 16:9 */
@media (min-width: 901px) and (pointer: fine) {
  body.player-open:not(.nb-genre-player-over-genre) #results {
    overflow-y: auto !important;
  }

  body.player-open:not(.nb-genre-player-over-genre) .fast-player-page {
    width: min(1180px, calc(100vw - 72px)) !important;
    max-width: min(1180px, calc(100vw - 72px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 14px !important;
    row-gap: 12px !important;
    display: grid !important;
    grid-template-rows: auto auto auto !important;
    align-content: start !important;
  }

  body.player-open:not(.nb-genre-player-over-genre) .fast-player-shell,
  body.player-open:not(.nb-genre-player-over-genre) .watch-player-shell,
  body.player-open:not(.nb-genre-player-over-genre) .player-shell {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: #000 !important;
  }

  body.player-open:not(.nb-genre-player-over-genre) .fast-player-shell iframe,
  body.player-open:not(.nb-genre-player-over-genre) .watch-player-shell iframe,
  body.player-open:not(.nb-genre-player-over-genre) .player-shell iframe {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    border: 0 !important;
  }
}

/* 2) التريلر: نسبة 16:9 ثابتة في الهاتف والحاسوب */
.trailer-frame,
.trailer-video {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: #000 !important;
}

.trailer-frame iframe,
.trailer-video iframe,
.netbom-youtube-trailer-frame {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: #000 !important;
}

/* 3) إخفاء شريط عنوان YouTube قدر الإمكان بدون كسر أزرار التشغيل والتقدم */
.trailer-frame iframe[src*="youtube.com/embed"],
.trailer-video iframe[src*="youtube.com/embed"],
.netbom-youtube-trailer-frame[src*="youtube.com/embed"] {
  height: calc(100% + 54px) !important;
  transform: translateY(-54px) !important;
  transform-origin: top center !important;
}

@media (max-width: 760px) {
  .trailer-frame,
  .trailer-video {
    border-radius: 16px !important;
  }

  .trailer-frame iframe[src*="youtube.com/embed"],
  .trailer-video iframe[src*="youtube.com/embed"],
  .netbom-youtube-trailer-frame[src*="youtube.com/embed"] {
    height: calc(100% + 46px) !important;
    transform: translateY(-46px) !important;
  }
}
