/*
 * PE-Class v1.16.13
 * macOS desktop-only fit for the PAPS final column and calendar lesson modal.
 * iPad, Fold and non-macOS layouts are intentionally excluded.
 */
@media (min-width:1001px) {
  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  #papsTableBox.tableWrap {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding-right:1px!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  #papsTableBox table.pe87Paps.dataTable {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    box-sizing:border-box!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  #papsTableBox table.pe87Paps th:nth-child(6),
  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  #papsTableBox table.pe87Paps td:nth-child(6) {
    width:17%!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  #papsTableBox table.pe87Paps th:nth-child(12),
  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  #papsTableBox table.pe87Paps td:nth-child(12) {
    width:7%!important;
    min-width:0!important;
    padding-left:2px!important;
    padding-right:2px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  #papsTableBox .overallGradeBadge {
    display:inline-flex!important;
    width:min(100%,64px)!important;
    min-width:0!important;
    max-width:64px!important;
    margin:0 auto!important;
    padding:5px 3px!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:10.5px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
}

/*
 * A MacBook viewport is shorter than a typical desktop monitor.
 * Place the first two sections side-by-side and keep the detail inputs on
 * one row so the complete dialog fits without a dialog scrollbar.
 */
@media (min-width:769px) {
  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal {
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    width:100vw!important;
    height:100dvh!important;
    min-height:0!important;
    align-items:flex-start!important;
    justify-content:center!important;
    padding:12px 20px!important;
    overflow:hidden!important;
    z-index:4990!important;
    box-sizing:border-box!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddDialog {
    width:min(760px,calc(100vw - 40px))!important;
    max-width:760px!important;
    max-height:calc(100dvh - 24px)!important;
    margin:0 auto!important;
    padding:0!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    transform:none!important;
    box-sizing:border-box!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddHeader {
    position:relative!important;
    top:auto!important;
    z-index:8!important;
    min-height:50px!important;
    padding:11px 56px 10px 17px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddHeading h3 {
    font-size:17px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddClose {
    top:6px!important;
    right:9px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddItem {
    padding:8px 14px 0!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddStepper {
    margin:0 18px 8px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddStepper::before {
    top:11px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddStepper b {
    width:23px!important;
    height:23px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddStepper>div {
    gap:3px!important;
    font-size:10px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calEditGrid {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px 9px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSection {
    min-width:0!important;
    margin:0!important;
    padding:7px 9px 8px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSectionDetail {
    grid-column:1/-1!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSectionHead {
    margin-bottom:5px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSectionGrid,
  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSectionDetail .calendarAddSectionGrid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px 8px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSectionGrid label {
    gap:2px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSectionGrid label.wide {
    grid-column:auto!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSectionGrid input,
  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSectionGrid select {
    min-height:33px!important;
    height:33px!important;
    padding:5px 8px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSectionGrid textarea {
    min-height:38px!important;
    height:38px!important;
    padding:5px 8px!important;
    resize:none!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddSummary {
    margin-top:6px!important;
    padding:7px 9px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddActions {
    position:static!important;
    margin:7px -14px 0!important;
    padding:8px 14px 10px!important;
  }

  html.pe87MacDesktop:not(.pe87Ipad):not(.pe87IpadRuntime):not(.pe87FoldWide)
  .calendarAddCModal .calendarAddActions .btn {
    min-height:35px!important;
    height:35px!important;
  }
}
