@import url('https://fonts.googleapis.com/css2?family=Rokkitt:wght@400;700&display=swap');

#knockout-app {
  min-height: 100vh;
  color: #4f5357;
}

#knockout-app .loading-message {
  margin: 0 3rem;
  height: 40rem;
  background: center center no-repeat url(/themes/custom/sfusd_base/images/loading_icon.gif);
}

/* Hide loading message after data has been loaded. */
#knockout-app[data-knockout-loaded="true"] .loading-message {
  display: none;
}

/* Hide the favorites help message until in the favorites mode, and display it with a yellow background to stand out. */
#knockout-app .favorites-message {
  display: none;
  background-color: #ffc700;
  margin: 3rem;
}
#knockout-app[data-favorites-visible="true"] .favorites-message {
  display: flow-root;
}
#knockout-app .favorites-message p {
  margin: 1em;
}

/* add room for address filter spinner */
#knockout-app #filters #address-filter {
  padding: 1.3rem 3rem 1.3rem 1.3rem;
}

/* Spinner for address filter input */
.ui-autocomplete-loading {
  background: center right 5px no-repeat url(/themes/custom/sfusd_base/images/loading_icon.gif);
  background-size: 20px;
}

#knockout-app #filters {
  display: flex;
  flex-wrap: wrap;
  margin: 3rem;
}

#knockout-app #filters .filter {
  margin-right: 1.5rem;
  margin-bottom: 1.5rem;
}


#knockout-app #filters .filter select,
#knockout-app #filters .filter input {
  height: 4.5rem;
  max-width: 24rem;
  margin: 0;
  padding: 1.3rem;
}


/* Empty result for autocomplete select menu. */
.ui-autocomplete .ui-menu-item.ui-state-disabled {
  opacity: .75;
}

.ui-autocomplete .ui-state-disabled .ui-menu-item-wrapper {
  font-style: italic;
}

#knockout-app #filters .filter-checks {
  display: flex;
  align-items: center;
}

#knockout-app #filters .filter-checks .checkbox {
  margin-right: 2.5rem;
}

#knockout-app #filters .filter-checks label::before {
  vertical-align: middle;
  width: 2em;
  height: 2em;
  border: 1px solid #767676;
}

#knockout-app #filters .filter-checks input {
  display: block;
  width: 3rem;
  height: 3rem;
}

#knockout-app .checkbox {
  margin-top: 1.5rem;
}

#knockout-app .checkbox label {
  margin-bottom: 0;
  padding: 0;
}

#knockout-app .total {
  align-self: flex-end;
  flex-grow: 1;
  text-align: right;
  display: none;
}

#knockout-app .total button {
  margin-top: 1em;
  margin-bottom: 1em;
}

#knockout-app .error-message {
  width: 100%;
  font-style: italic;
}

/* Only show the total text after knockout has populated it. */
#knockout-app[data-knockout-loaded="true"] .total {
  display: block;
}

#knockout-app #filters .button {
  margin-right: 0;
}

/* The map svg inside of the toggle button. */
#knockout-app #filters svg.icon--map {
  display: inline-block;
  width: 2em;
  height: 2em;
  fill: white;
  margin-top: -1em;
  position: relative;
  top: .5em;
  left: -.5em;
}

/* Don't display the hide text when already hidden. */
#knockout-app #filters .showHideMap__hide,
#knockout-app #filters .showHideFavorites__hide {
  display: none;
}

/* Display the hide text when shown. */
#knockout-app[data-map-visible="true"] #filters .showHideMap__hide,
#knockout-app[data-favorites-visible="true"] #filters .showHideFavorites__hide {
  display: inline;
}

/* Hide the show text when already shown. */
#knockout-app[data-map-visible="true"] #filters .showHideMap__show,
#knockout-app[data-favorites-visible="true"] #filters .showHideFavorites__show {
  display: none;
}

#knockout-app table {
  border-spacing: 3rem 0;
  border-collapse: separate;
  margin: 0 0 3rem;
  border: none !important;
  display: none;
}

/* Only show the table after knockout has populated it. */
#knockout-app[data-knockout-loaded="true"] table {
  display: table;
}

.layout-no-aside #knockout-app .table-scroll {
  width: 100%;
  max-width: 100%;
}
@media only screen and (max-width: 991px) {
  .layout-no-aside #knockout-app .table-scroll {
    margin: 0;
  }
}

 /* Change the mouse cusor to indicate that the table can be grabbed and dragged. */
.table-scroll {
    cursor: move; /* fallback if grab cursor is unsupported */
    cursor: grab;
    cursor: -moz-grab;
    cursor: -webkit-grab;
}

 /* Apply a "closed-hand" cursor during drag operation. */
.table-scroll:active,
.table-scroll[data-mouse-scroll="true"] {
    cursor: grabbing;
    cursor: -moz-grabbing;
    cursor: -webkit-grabbing;
}

#knockout-app table {
  min-width: auto;
}

#knockout-app table thead th {
  vertical-align: top;
  text-transform: none;
  font-weight: normal;
  border-top: 1px solid rgba(0,0,0,.075) !important;
}

#knockout-app table th,
#knockout-app table td {
  padding: 2rem !important;
  width: 38rem !important;
  min-width: 38rem !important;
  box-shadow: 0 2px 4px 0 rgba(0,0,0,.15);
  border: 0 !important;
  background: #fff;
}

/* At mobile sizes make card full width of screen. */
@media only screen and (max-width: 560px) {
  #knockout-app table th,
  #knockout-app table td {
    width: calc(100vw - 6rem) !important;
    min-width: calc(100vw - 6rem) !important;
  }
}

#knockout-app table td {
  padding-top: 0 !important;
}

#knockout-app table p,
#knockout-app table h3,
#knockout-app table h4 {
  padding: 0 1rem;
}

#knockout-app table td > *:first-child {
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,.15);
}


#knockout-app table tbody tr:nth-child(2n), table thead {
  background: #fff !important;
}

#knockout-app table p {
  margin: 0;
}

#knockout-app table * + p {
  margin-top: .5em;
  margin-bottom: 0;
}

#knockout-app picture {
  display: block;
  padding-bottom: 66.666%;
  background: #f2f6fa;
  margin-bottom: 1rem;
  position: relative;
}

#knockout-app .card-number {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  padding: .3em .6em;
  background: rgba(255, 255, 255, .8);
}


#knockout-app button.showHideFavorites svg {
  width: 2em;
  height: 2em;
  margin-top: -1em;
  display: inline-block;
  position: relative;
  top: 0.5em;
  left: -0.5em
}

/* Make the close icon slightly smaller and further from the text. */
#knockout-app button.showHideFavorites .showHideFavorites__hide svg {
  width: 1.6em;
  width: 1.6em;
  left: -0.8em
}

/* The favorite button at the top right of each school card. */
#knockout-app .favorites-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  background: transparent;
  padding: 0;
  margin: 0;
  color: #fff;
  font-size: 2.5rem;
}

/* Add a white border and drop shadow for contrast. */
#knockout-app .favorites-button svg {
  stroke: white;
  stroke-width: 3px;
  filter: drop-shadow(0px 0px 0.2em #666);
}

/* When selected as a favorite, turn the heart red. */
#knockout-app .favorite-school .favorites-button {
  color: red;
}


#knockout-app picture img {
  position: absolute;
  left: 0; /* Needed for ltr layout. */
}

#knockout-app .title a {
  font-family: 'Rokkitt', serif;
  font-weight: bold;
  text-decoration: none;
  color: #1176A8;
  font-size: 24px;
  /* Make room for the new window icon at the top right. */
  display: block;
  padding-right: .5em;
  position: relative;
}

/* Place the new window icon at the top right of the text area. */
#knockout-app .title a svg {
  display: block;
  position: absolute;
  top: 0;
  right: -.5em;
}

#knockout-app .title a:hover {
  text-decoration: underline;
}

#knockout-app .school-message,
#knockout-app .attendance-area p {
  background: #fff7db;
  padding: 1rem;
  margin-top: 1em;
}

#knockout-app .application-data-help-text {
  font-style: italic;
}

/* In accordion rows, the h4 tags will be used to toggle their state. */
#knockout-app .accordion-row h4 {
  color: #444;
  cursor: pointer;
  position: relative;
}
#knockout-app .accordion-row h4:hover {
  text-decoration: underline;
}

/* Show the accordion toggle icon, pointing up since everything is open by default. */
#knockout-app .accordion-row h4::after {
  content: ' ';
  position: absolute;
  right: 1rem;
  background-image: url(data:image/svg+xml;base64,PCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgo8dGl0bGU+Y2Fycm90LWRvd248L3RpdGxlPgo8cGF0aCBkPSJNMC4yIDEwLjRsMTQuNCAxNC40YzAuOCAwLjggMiAwLjggMi42IDBsMTQuNC0xNC40YzAuNC0wLjQgMC40LTEgMC4yLTEuNGwtMS40LTEuNGMtMC40LTAuNC0xLTAuNC0xLjQgMGwtMTIuNCAxMi40Yy0wLjQgMC40LTEgMC40LTEuNCAwbC0xMi4yLTEyLjJjLTAuNC0wLjQtMS0wLjQtMS40IDBsLTEuNCAxLjJjLTAuMiAwLjQtMC4yIDEgMCAxLjR6Ij48L3BhdGg+Cjwvc3ZnPgo=);
  transform: rotate(180deg);
  background-position: center right;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  width: 1.25rem;
  height: 2rem;
}

/* Turn the icon around when the accordion is closed. */
#knockout-app .accordion-row[data-accordion-closed="true"] h4::after {
  transform: rotate(0);
}

/* When the accordion is collapsed, all the content other than the h4 should be hidden. */
#knockout-app .accordion-row[data-accordion-closed="true"] td > *:not(h4) {
  max-height: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

/* Remove the h4 margin as well, so there isn't extra space in the cell. */
#knockout-app .accordion-row[data-accordion-closed="true"] h4 {
  margin-bottom: 0;
}

#knockout-app .table-scroll {
  position: relative;
  margin-bottom: 0;
}

/* Only show carousel buttons after the data has been loaded. */
#knockout-app .carousel-buttons {
  display: none;
}

/* Make the carousel buttons stay visible when you scroll down the page. */
#knockout-app[data-knockout-loaded="true"] .carousel-buttons {
  display: block;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* We haven't implemented snapping for rtl languages, so hide the non-functional buttons. */
html[dir="rtl"] #knockout-app .carousel-buttons {
  display: none;
}

/* Style these carousel buttons the same as the slick buttons. */
#knockout-app .carousel-buttons button {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: #1176a8;
  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjNweCIgaGVpZ2h0PSI0MnB4IiB2aWV3Qm94PSIwIDAgMjMgNDIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUxLjMgKDU3NTQ0KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5CYWNrPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlN5bWJvbHMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJHcm91cC02IiBmaWxsPSIjRkZGRkZGIj4KICAgICAgICAgICAgPHBhdGggZD0iTTIyLjgxOTgwNTIsMi4zMTM3MDg1IEwzLjgxMzcwODUsMjEuMzE5ODA1MiBMMjIuNSw0MC4wMDYwOTY3IEwyMSw0MS41MDYwOTY3IEwwLjc1MzA0ODMyNywyMS4yNTkxNDUgTDIxLjI1OTE0NSwwLjc1MzA0ODMyNyBMMjIuODE5ODA1MiwyLjMxMzcwODUgWiIgaWQ9IkJhY2siPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==);
  background-position: 45% 50%;
  background-repeat: no-repeat;
  background-size: 30%;
  padding: 0;
  margin: 0;
  border: 2px solid white;
  text-indent: -10000px;
  position: absolute;
  top: 11rem;
  left: .5rem;
}

#knockout-app .carousel-buttons button.next {
  left: auto;
  right: .5rem;
  transform: rotate(180deg);
}

#knockout-app .chosen-container {
  width: 215px !important;
}

/* If the map is visible on mobile, the move the buttons down to the cards below the map. */
@media only screen and (max-width: 917px) {
    #knockout-app[data-map-visible="true"] .carousel-buttons button {
      top: 43rem;
    }
}

/* If the map is visible on desktop, the button should be placed to the right of the single visible card. */
@media only screen and (min-width: 917px) {
  #knockout-app[data-map-visible="true"] .carousel-buttons button.next {
    right: auto;
    left: 38.5rem;
  }
}

/* Create round border for active button. */
#knockout-app .carousel-buttons button:focus {
  outline: none;
  box-shadow: 0 0 0 1px #4f5357;
}

/* Don't show the map by default. */
#knockout-app #map {
  display: none;
}

/* If map is activated on mobile, display it above the carousel. */
#knockout-app[data-map-visible="true"] #wrapper {
  display: flex;
  flex-direction: column-reverse;
}

/* If the map is activated, start off with a mobile height of 320px. */
#knockout-app[data-map-visible="true"] #map {
  display: block;
  width: 100%;
  height: 32rem;
  margin-bottom: 1.5rem;
}

/* If map is activated on desktop, display it and the carousel side-by-side. */
@media only screen and (min-width: 917px) {

  #knockout-app[data-map-visible="true"] #wrapper {
    flex-direction: row;
    min-height: 100vh;
  }

  /* When the map is active, the carousel should only be one card wide. */
  #knockout-app[data-map-visible="true"] .table-scroll {
    flex: 0 0 43.6rem;
  }

  /* The map should take up the rest of the horizontal space, and the entire height of the screen when scrolled into view. */
  #knockout-app[data-map-visible="true"] #map {
    height: 100vh;
    margin-bottom: 0;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0;
  }
}

/* The introduction text with buttons on the left. */
#block-schoolfinderintro .field--name-body {
  display: flex;
  margin: 3rem;
}

/* Display the text above the buttons on mobile. */
@media only screen and (max-width: 917px) {
  #block-schoolfinderintro .field--name-body {
    flex-wrap: wrap;
  }
}

#block-schoolfinderintro .field--name-body p {
  max-width: 1200px;
}

#block-schoolfinderintro .field--name-body .button {
  white-space: nowrap;
  border-width: 1px;
  margin-left: 1.5rem;
}

#block-schoolfinderintro .field--name-body .button.secondary {
  background: #f2f6fa;
  border: 1px solid #c2c8cf;
  color: #1f2230;
}

.dashboard {
  margin-bottom: 5px;
}
