/* Commission: one vertical scroller for the entire report at every size. */
@media (min-width: 0px) {
  html body #employeeSalesOverlay:has(.employee-sales-panel.is-ceo-performance) {
    overflow-y: auto !important;
    align-items: flex-start !important;
    padding-top: max(16px, env(safe-area-inset-top)) !important;
    padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
  }
  html body .employee-sales-modal:has(> .employee-sales-panel.is-ceo-performance),
  html body .employee-sales-panel.is-ceo-performance {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  html body .employee-sales-panel.is-ceo-performance {
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
    min-width: 0 !important;
  }
  html body .employee-sales-panel.is-ceo-performance .employee-sales-head {
    grid-template-columns: 42px minmax(0, 1fr) 42px !important;
  }
  html body .employee-sales-panel.is-ceo-performance .employee-sales-period {
    grid-column: 2 / -1 !important;
    width: 100% !important;
  }
  html body .employee-sales-panel.is-ceo-performance :is(.employee-sales-summary, .employee-sales-commission-overview) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body .employee-sales-panel.is-ceo-performance .employee-sales-summary > div + div {
    border-left: 0 !important;
    border-top: 1px solid var(--light-border, rgba(126,155,196,.22)) !important;
  }
  html body .employee-sales-panel.is-ceo-performance :is(.employee-sales-summary, .employee-sales-commission-overview) strong {
    font-size: clamp(20px, 6vw, 28px) !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-variant-numeric: tabular-nums;
  }
  html body .employee-sales-panel.is-ceo-performance .employee-sales-commission-overview em {
    display: block !important;
    margin-top: 6px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    font-style: normal !important;
    overflow-wrap: anywhere !important;
  }
  html body .employee-sales-panel.is-ceo-performance .employee-sales-table {
    height: auto !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
  }
  html body .employee-sales-panel.is-ceo-performance #employeeSalesList {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Tablets and computers use the available width instead of the phone modal. */
@media (min-width: 767px) {
  html body #employeeSalesOverlay .employee-sales-modal:has(> .employee-sales-panel.is-ceo-performance) {
    width: calc(100vw - 40px) !important;
    max-width: none !important;
    margin-inline: auto !important;
  }
  html body .employee-sales-panel.is-ceo-performance {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px !important;
  }
  html body .employee-sales-panel.is-ceo-performance :is(.employee-sales-summary, .employee-sales-commission-overview) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  html body .employee-sales-panel.is-ceo-performance .employee-sales-summary > div + div {
    border-top: 0 !important;
    border-left: 1px solid var(--light-border, rgba(126,155,196,.22)) !important;
  }
  html body .employee-sales-panel.is-ceo-performance :is(.employee-sales-summary, .employee-sales-commission-overview) strong {
    font-size: 24px !important;
  }
  html body .employee-sales-panel.is-ceo-performance .employee-sales-head {
    grid-template-columns: 42px minmax(0, 1fr) 42px minmax(120px, auto) !important;
  }
  html body .employee-sales-panel.is-ceo-performance .employee-sales-period {
    grid-column: auto !important;
  }
}
