/* v1.3.0: Single-episode dropdown interaction repair; original CSS remains untouched. */
/* The source theme clips pop-up controls at the theatre boundary. */
body.single-ap_episode section.main .content-wrapper .theatre { overflow:visible; }
body.single-ap_episode section.main .content-wrapper .theatre .theatre-settings { position:relative; z-index:20; }
body.single-ap_episode section.main .content-wrapper .theatre .theatre-settings .ap-control-col { position:relative; }
body.single-ap_episode section.main .content-wrapper .theatre .theatre-settings .dropup { position:relative; }
body.single-ap_episode section.main .content-wrapper .theatre .theatre-settings .dropup.ap-menu-open { z-index:25; }
body.single-ap_episode section.main .content-wrapper .theatre .theatre-settings .dropup .dropdown-menu.show {
  display:block; visibility:visible; pointer-events:auto; z-index:1055;
}
body.single-ap_episode section.main .content-wrapper .theatre .theatre-settings .dropup .dropdown-menu [hidden] { display:none!important; }
body.single-ap_episode section.main .content-wrapper .theatre .theatre-settings button[data-toggle="dropdown"] { cursor:pointer; touch-action:manipulation; }
/* Keep original size, typography, bar layout and mobile Option 20 unchanged. */

/* A tall episode list cannot always fit ABOVE a mobile control bar. Place this
   one menu below its toggle so search/ranges stay inside the viewport. */
@media (max-width:767.98px) {
  body.single-ap_episode section.main .content-wrapper .theatre .theatre-settings .episode-menu .ap-player-episode-picker.show {
    top:calc(100% + 4px); bottom:auto; margin-top:0; margin-bottom:0;
    max-height:min(60vh,380px); overflow:hidden;
  }
  body.single-ap_episode section.main .content-wrapper .theatre .theatre-settings .episode-menu .ap-player-picker-results {
    max-height:min(30vh,210px);
  }
}
