/* EDUHUNT R430 — Principal Video/Materials compact filters + mobile utility theme visibility.
   Principal Portal only. Desktop layout remains unchanged except playback behavior handled in JS. */

@media (max-width:1024px){
  /* VIDEO LECTURES: Class + Subject are always one compact row. */
  body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient,
  body[data-portal-role="PRINCIPAL"] .edu-video-select-row,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] .edu-video-select-row{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    align-items:center!important;
    width:100%!important;
  }
  body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient>.form-field,
  body[data-portal-role="PRINCIPAL"] .edu-video-select-row>.form-field,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient>.form-field,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] .edu-video-select-row>.form-field{
    grid-column:auto!important;
    min-width:0!important;
    width:auto!important;
    margin:0!important;
  }
  /* User asked to remove the visible Class / Subject words above these selectors. */
  body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient>.form-field>label,
  body[data-portal-role="PRINCIPAL"] .edu-video-select-row>.form-field>label,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient>.form-field>label,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] .edu-video-select-row>.form-field>label{
    display:none!important;
  }
  body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient select,
  body[data-portal-role="PRINCIPAL"] .edu-video-select-row select,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient select,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] .edu-video-select-row select{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:43px!important;
  }

  /* Mobile/tablet quick dock: make Light/Dark wide enough for both icons. */
  body[data-portal-role="PRINCIPAL"] #principalMobileUtilityDock #desktopThemeSwitcher,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] #principalMobileUtilityDock #desktopThemeSwitcher{
    display:grid!important;
    grid-template-columns:repeat(2,32px)!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    width:76px!important;
    min-width:76px!important;
    max-width:76px!important;
    height:40px!important;
    min-height:40px!important;
    padding:4px!important;
    overflow:visible!important;
  }
  body[data-portal-role="PRINCIPAL"] #principalMobileUtilityDock #desktopThemeSwitcher .desktop-theme-choice,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] #principalMobileUtilityDock #desktopThemeSwitcher .desktop-theme-choice{
    display:grid!important;
    place-items:center!important;
    width:32px!important;
    min-width:32px!important;
    height:32px!important;
    min-height:32px!important;
    padding:0!important;
  }
  body[data-portal-role="PRINCIPAL"] #principalMobileUtilityDock #desktopThemeSwitcher .desktop-theme-choice>span,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] #principalMobileUtilityDock #desktopThemeSwitcher .desktop-theme-choice>span{
    display:block!important;
    font-size:17px!important;
    line-height:1!important;
  }
  body[data-portal-role="PRINCIPAL"] #principalMobileUtilityDock #desktopThemeSwitcher .desktop-theme-choice>b,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"] #principalMobileUtilityDock #desktopThemeSwitcher .desktop-theme-choice>b{
    display:none!important;
  }

  /* MATERIALS: Class + Subject in one row. Programme, if selectable, stays above. */
  body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    align-items:end!important;
    width:100%!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow--programme-select>.form-field:first-of-type,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow--programme-select>.form-field:first-of-type{
    grid-column:1/-1!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow>.form-field,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow>.form-field{
    min-width:0!important;
    width:auto!important;
    margin:0!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow select,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow select{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-actions,
  html.eh-force-mobile body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-actions{
    justify-content:center!important;
    margin-top:7px!important;
  }
}

@media (max-width:520px){
  body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient,
  body[data-portal-role="PRINCIPAL"] .edu-video-select-row,
  body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow{
    gap:5px!important;
  }
  body[data-portal-role="PRINCIPAL"] .video-library-toolbar--recipient select,
  body[data-portal-role="PRINCIPAL"] .edu-video-select-row select,
  body[data-portal-role="PRINCIPAL"][data-portal-module="library-materials"] .eduhunt-library-role-filter-flow select{
    min-height:41px!important;
    padding-left:8px!important;
    padding-right:25px!important;
    font-size:11.5px!important;
  }
}
