/* v307 — desktop-only fix for the 10 homepage interview cards.
   Mobile, interviews.php and Fajr archive players are intentionally untouched. */
@media (min-width: 769px) {
  #ifxHomeVideoModal.ifx-video-modal {
    padding: 12px !important;
  }

  #ifxHomeVideoModal .ifx-video-box {
    display: flex !important;
    flex-direction: column !important;
    width: min(1040px, 96vw, calc((100dvh - 92px) * 1.7777778)) !important;
    max-width: 96vw !important;
    max-height: calc(100dvh - 24px) !important;
    overflow: hidden !important;
  }

  #ifxHomeVideoModal .ifx-video-head {
    flex: 0 0 auto !important;
  }

  #ifxHomeVideoModal .ifx-video-frame,
  #ifxHomeVideoModal .ifx-video-frame.irf-v305-host {
    position: relative !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 88px) !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    background: #000 !important;
  }

  #ifxHomeVideoModal .ifx-video-frame > .irf-v305-host,
  #ifxHomeVideoModal .ifx-video-frame.irf-v305-host {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }

  #ifxHomeVideoModal .irf-v305-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  /* The seek bar was visible, so the player was already active.
     Force the complete desktop button row to remain visible beside it. */
  #ifxHomeVideoModal .irf-v305-controls {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    box-sizing: border-box !important;
    padding: 44px 14px 12px !important;
  }

  #ifxHomeVideoModal .irf-v305-progress-row {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    grid-template-columns: auto minmax(120px, 1fr) auto !important;
    margin: 0 0 10px !important;
  }

  #ifxHomeVideoModal .irf-v305-button-row {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 2147483002 !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    min-height: 40px !important;
    overflow: visible !important;
    pointer-events: auto !important;
  }

  #ifxHomeVideoModal .irf-v305-btn,
  #ifxHomeVideoModal .irf-v305-speed-wrap,
  #ifxHomeVideoModal .irf-v305-volume-wrap {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  #ifxHomeVideoModal .irf-v305-btn {
    background: rgba(8, 12, 18, .94) !important;
    border-color: rgba(255, 255, 255, .42) !important;
  }

  #ifxHomeVideoModal .irf-v305-fullscreen {
    display: inline-flex !important;
    margin-right: auto !important;
  }
}

/* Short desktop screens: keep every button, only make them a little more compact. */
@media (min-width: 769px) and (max-height: 720px) {
  #ifxHomeVideoModal .ifx-video-box {
    width: min(980px, 94vw, calc((100dvh - 78px) * 1.7777778)) !important;
    max-height: calc(100dvh - 12px) !important;
  }

  #ifxHomeVideoModal .ifx-video-frame,
  #ifxHomeVideoModal .ifx-video-frame.irf-v305-host {
    max-height: calc(100dvh - 72px) !important;
  }

  #ifxHomeVideoModal .irf-v305-controls {
    padding: 34px 10px 8px !important;
  }

  #ifxHomeVideoModal .irf-v305-progress-row {
    margin-bottom: 7px !important;
  }

  #ifxHomeVideoModal .irf-v305-btn,
  #ifxHomeVideoModal .irf-v305-speed-wrap {
    height: 36px !important;
  }
}
