/* PE-Class v1.20.11 — final Settings copy, save-control and iPhone field corrections. */

/* The two cards no longer need explanatory copy. Removing the nodes from
   layout and sharing the next-control offset closes the vacated space. */
#settingsCWorkspace.settingsC
.settingsCGridEducation > .adminSemesterPeriodCard
.adminSemesterPeriodHead .hint,
#settingsCWorkspace.settingsC
.settingsCGridEducation > .adminSchoolCard > p.hint {
  display: none !important;
}

#settingsCWorkspace.settingsC
.settingsCGridEducation > .adminSemesterPeriodCard
> .adminSemesterPeriodHead {
  margin-bottom: 9px !important;
}

#settingsCWorkspace.settingsC
.settingsCGridEducation > .adminSchoolCard > .adminSchoolLabel {
  margin-top: 9px !important;
}

/* PC, MacBook, iPad landscape and Galaxy Fold7 unfolded. */
@media (min-width: 769px) {
  /* Class Save and Place Save intentionally share every visible type and box
     token in one rule so later inheritance cannot make them look different. */
  #settingsCWorkspace.settingsC :is(#saveAdminClasses, #saveAdminPlaces) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 9px 14px !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: var(--green) !important;
    color: #fff !important;
    font-family: var(--site-font-family) !important;
    font-size: 13.3333px !important;
    font-weight: 900 !important;
    font-style: normal !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12) !important;
  }

  /* Internet-tab Save now uses the same 78x34 header action as every other
     Home-screen card. The 12011 runtime shortens its idle label to “저장”. */
  #settingsCWorkspace.settingsC .adminBrowserTitleSave11622 {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
  }

  html:is(.pe87Ipad, .pe87IpadRuntime, .peSettingsIpadFix12011, .pe87FoldWide, [data-pe-ipados="true"], [data-pe-fold-wide="true"])
  #settingsCWorkspace.settingsC :is(#saveAdminClasses, #saveAdminPlaces) {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }
}

/* At the standard 1194px iPad landscape canvas, the School title and the
   fixed-width Save action cannot share the narrow fourth card. Keep the full
   title on the first row and place Save on its own row underneath. */
@media (min-width: 769px) and (max-width: 1366px) {
  html.peSettingsIpadFix12011
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSchoolCard > 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.peSettingsIpadFix12011
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSchoolCard > .peSettingsCardSaveHeader {
    top: 56px !important;
  }

  html.peSettingsIpadFix12011
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > .adminSchoolCard > .adminSchoolLabel {
    margin-top: 34px !important;
  }
}

/* Real iPad Safari can present a desktop-style UA. The runtime adds
   peSettingsIpadFix12011 after checking platform/touch/Foundation state. */
@media (min-width: 769px) {
  html.peSettingsIpadFix12011
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > :is(.adminYearCard, .adminSemesterCard) > .peSettingsCardSaveHeader,
  html.peSettingsIpadFix12011
  #settingsCWorkspace.settingsC .settingsCGridEducation
  > :is(.adminYearCard, .adminSemesterCard) > .peSettingsCardSaveHeader
  > .peSettingsCardAutoSaveBadge {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  html.peSettingsIpadFix12011
  #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;
  }
}

/* iPhone Safari only. Keep the native date picker, but inset it by one pixel
   so all four borders and the existing 4px radius are visibly painted. */
@media (max-width: 768px) {
  /* The Class button keeps the requested description-row position, while
     its visible control uses the same complete token set as Place Save. */
  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 .peMobileClassSaveSlot {
    justify-content: flex-start !important;
  }

  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(#saveAdminClasses, #saveAdminPlaces) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 9px 10px !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: var(--green) !important;
    color: #fff !important;
    font-family: var(--site-font-family) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    font-style: normal !important;
    line-height: normal !important;
    letter-spacing: normal !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12) !important;
  }

  html[data-pe-device="compact"][data-pe-tab="admin"].pe87IPhone:not(.pe87Ipad):not(.pe87IpadRuntime):not([data-pe-ipados="true"])
  #settingsCWorkspace.settingsC #adminSemesterPeriodCard
  :is(.adminSemesterPeriodFieldset, .adminSemesterPeriodFieldset label) {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !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: calc(100% - 2px) !important;
    inline-size: calc(100% - 2px) !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;
    max-width: calc(100% - 2px) !important;
    max-inline-size: calc(100% - 2px) !important;
    margin: 0 1px !important;
    border: 1px solid #d9e1ea !important;
    border-radius: 4px !important;
    background: #fff !important;
    background-clip: padding-box !important;
    overflow: visible !important;
    box-shadow: inset -1px 0 0 #d9e1ea !important;
  }
}
