/* Visual-only: list and map remain side by side on school desktops. */
@media (min-width: 651px) {
  body.bk-student-map-two-pane #content .sm-layout {
    display: grid !important;
    grid-template-columns: minmax(340px, 35%) minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(554px, 1fr) !important;
    grid-template-areas:
      "maptools maptools"
      "list map" !important;
    align-items: stretch;
  }

  body.bk-student-map-two-pane #content .bk-map-tools {
    /* Numeric placement avoids the legacy browser parsing the named area as auto. */
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    align-self: start;
    min-height: 0;
    height: auto !important;
  }

  body.bk-student-map-two-pane #content .sm-list-card {
    grid-area: list !important;
    display: flex;
    flex-direction: column;
    height: 554px;
  }

  body.bk-student-map-two-pane #content .sm-map-card {
    grid-area: map !important;
    height: 554px;
  }

  body.bk-student-map-two-pane #content .sm-list {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
  }

  body.bk-student-map-two-pane #content .sm-map {
    height: 510px;
  }

  body.bk-student-map-two-pane #content .sm-layout.sm-has-detail {
    grid-template-columns: minmax(250px, 27%) minmax(0, 1fr) minmax(300px, 31%) !important;
    grid-template-areas:
      "maptools maptools maptools"
      "list map profile" !important;
  }

  body.bk-student-map-two-pane #content .sm-profile {
    grid-area: profile;
    height: 554px;
    max-height: 554px;
  }
}

/* Map filters use in-field prompts and the approved student-table filter tone. */
body.bk-student-map-two-pane.bk-student-map-identity #content .sm-filters {
  background: #dce9f7 !important;
}

body.bk-student-map-two-pane.bk-student-map-identity #content .sm-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (min-width: 1151px) {
  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-page {
    padding-bottom: 8px !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-page > .sm-top {
    margin-bottom: 10px !important;
    gap: 8px !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-top .bk-composed-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    align-items: center !important;
    gap: 10px !important;
    flex-direction: initial !important;
    flex-wrap: nowrap !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-top #sm-kpis {
    display: grid !important;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    flex: none !important;
    min-width: 0;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-kpis > span {
    min-width: 0;
    min-height: 48px !important;
    padding: 7px 10px !important;
    gap: 8px !important;
    font-size: 14px !important;
    white-space: nowrap;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-kpis b {
    font-size: 23px !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-top .bk-composed-actions > .sm-actions {
    display: flex !important;
    grid-column: 2;
    grid-row: 1;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    min-width: 0;
    margin: 0 !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-top .sm-actions .btn {
    padding-inline: 10px;
    white-space: nowrap;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-filters {
    border-color: #9aafc5 !important;
    padding: 10px !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    align-items: center !important;
    grid-template-columns: minmax(160px, 1.25fr) repeat(3, minmax(135px, 1fr)) auto !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-filters label {
    display: grid !important;
    gap: 0 !important;
    font-size: 0 !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-filters input,
  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-filters select {
    height: 44px !important;
    padding: 0 12px !important;
    font-size: 15px !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-filters input::placeholder {
    color: #647b96;
    opacity: 1;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .bk-map-tools {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    width: 100% !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between !important;
    gap: 12px;
    width: 100%;
    min-width: 0;
    height: 18px;
    line-height: 18px;
    white-space: nowrap;
    box-sizing: border-box;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-list-head h3 {
    font-size: 18px !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-list-head #sm-scope {
    flex: 1 1 auto !important;
    min-width: 0;
    margin: 0 !important;
    text-align: left !important;
    font-size: 12px !important;
    line-height: 18px !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-list-head #sm-updated {
    flex: 0 0 auto !important;
    margin: 0 0 0 auto !important;
    text-align: right !important;
    font-size: 12px !important;
    line-height: 18px !important;
    white-space: nowrap !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-layout {
    grid-template-rows: auto minmax(180px, 1fr) !important;
    row-gap: 12px !important;
    min-height: 0 !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-list-card,
  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-map-card {
    height: max(250px, calc(100dvh - 320px)) !important;
    max-height: max(250px, calc(100dvh - 320px)) !important;
    min-height: 0 !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-list-card,
  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-map-card {
    display: flex;
    flex-direction: column;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-list-head {
    flex: 0 0 auto;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-list {
    height: auto !important;
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto !important;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-map {
    height: auto !important;
    min-height: 0;
    flex: 1 1 auto;
  }

  body.bk-student-map-two-pane.bk-student-map-identity #content .sm-layout.sm-has-detail .sm-profile {
    height: max(250px, calc(100dvh - 320px)) !important;
    max-height: max(250px, calc(100dvh - 320px)) !important;
    min-height: 0 !important;
    overflow: auto;
  }
}
