/* PE-Class v1.20.10 — Settings curriculum alignment and compact field fit. */

/* PC, MacBook, iPad landscape and Galaxy Fold7 unfolded. */
@media (min-width: 769px) {
  /* Give all four curriculum titles the same box and baseline. The period
     title lives one level deeper than the other three cards. */
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminYearCard > h2,
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSemesterCard > h2,
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSemesterPeriodCard > .adminSemesterPeriodHead > div > h2,
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSchoolCard > h2 {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    margin: 0 0 8px !important;
    line-height: 1.3 !important;
  }

  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSemesterPeriodCard > .adminSemesterPeriodHead > div {
    min-width: 0 !important;
  }

  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSemesterPeriodCard > .adminSemesterPeriodHead .hint,
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSchoolCard > p.hint {
    margin: 0 !important;
  }

  /* Match the Class Save typography and corner treatment to the existing
     Place Save control. Width/height already share the 12009 geometry. */
  #settingsCWorkspace.settingsC #saveAdminClasses {
    font-family: inherit !important;
    font-size: 13.3333px !important;
    font-weight: 900 !important;
    line-height: normal !important;
    border-radius: 4px !important;
    padding: 9px 14px !important;
  }
}

/* iPad landscape only: the informational badges consume the title column on
   the four-card row. Keep their DOM contract, hide the two badges visually,
   and give every curriculum heading the same two-line-safe title box. */
@media (min-width: 769px) and (max-width: 1366px) and (orientation: landscape) {
  html:is(.pe87Ipad, .pe87IpadRuntime, [data-pe-ipados="true"]):not(.pe87FoldWide):not([data-pe-fold-wide="true"])
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > :is(.adminYearCard, .adminSemesterCard) > .peSettingsCardSaveHeader {
    display: none !important;
  }

  html:is(.pe87Ipad, .pe87IpadRuntime, [data-pe-ipados="true"]):not(.pe87FoldWide):not([data-pe-fold-wide="true"])
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminYearCard > h2,
  html:is(.pe87Ipad, .pe87IpadRuntime, [data-pe-ipados="true"]):not(.pe87FoldWide):not([data-pe-fold-wide="true"])
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSemesterCard > h2,
  html:is(.pe87Ipad, .pe87IpadRuntime, [data-pe-ipados="true"]):not(.pe87FoldWide):not([data-pe-fold-wide="true"])
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSemesterPeriodCard > .adminSemesterPeriodHead > div > h2,
  html:is(.pe87Ipad, .pe87IpadRuntime, [data-pe-ipados="true"]):not(.pe87FoldWide):not([data-pe-fold-wide="true"])
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSchoolCard > h2 {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
  }

  html:is(.pe87Ipad, .pe87IpadRuntime, [data-pe-ipados="true"]):not(.pe87FoldWide):not([data-pe-fold-wide="true"])
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > :is(.adminYearCard, .adminSemesterCard) > h2 {
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    word-break: keep-all !important;
  }

  html:is(.pe87Ipad, .pe87IpadRuntime, [data-pe-ipados="true"]):not(.pe87FoldWide):not([data-pe-fold-wide="true"])
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSemesterCard.peSettingsCardSaveHost--semester > .adminSemesterHint {
    margin-top: 0 !important;
  }
}

/* iPhone 15 Pro and Galaxy Fold7 folded. The scoped Home Save controls use
   the same inner 13px content line and width as .adminBrowserTitleSave11622. */
@media (max-width: 768px) {
  html[data-pe-device="compact"][data-pe-tab="admin"]:is(.pe87IPhone, .pe87FoldDevice:not(.pe87FoldWide)):not(.pe87Ipad):not(.pe87IpadRuntime):not([data-pe-ipados="true"])
  #settingsCWorkspace.settingsC
  :is(.settingsCHomeEditors, .settingsCHomeEditors > .adminHomeCopyGrid)
  > details.peSettingsCardSaveHost[open][data-pe-settings-save-scope]
  > .peSettingsHomeSaveSlot {
    width: calc(100% - 26px) !important;
    min-width: 0 !important;
    max-width: calc(100% - 26px) !important;
    margin: 10px 13px 0 !important;
    padding: 0 0 14px !important;
  }

  /* Safari keeps an intrinsic logical width on native date inputs. Constrain
     both axes at every containing level without replacing the native picker. */
  html[data-pe-device="compact"][data-pe-tab="admin"].pe87IPhone:not(.pe87Ipad):not(.pe87IpadRuntime):not([data-pe-ipados="true"])
  #settingsCWorkspace.settingsC #adminSemesterPeriodCard .adminSemesterPeriodFieldset,
  html[data-pe-device="compact"][data-pe-tab="admin"].pe87IPhone:not(.pe87Ipad):not(.pe87IpadRuntime):not([data-pe-ipados="true"])
  #settingsCWorkspace.settingsC #adminSemesterPeriodCard .adminSemesterPeriodFieldset label {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  html[data-pe-device="compact"][data-pe-tab="admin"].pe87IPhone:not(.pe87Ipad):not(.pe87IpadRuntime):not([data-pe-ipados="true"])
  #settingsCWorkspace.settingsC #adminSemesterPeriodCard
  input[type="date"][data-semester-period][data-period-edge] {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;
    max-width: 100% !important;
    max-inline-size: 100% !important;
    margin-inline: 0 !important;
    overflow: hidden !important;
  }
}
