/*
 * Schedule dashboard overrides for Django.
 *
 * Drupal loads openy_system/modal.css before openy_repeat/repeat.css so repeat
 * wins on modal chrome. Modal session rows also need the same presentation as
 * .schedule-dashboard__content rows, which repeat.css does not scope to modals.
 */

.schedule-dashboard__content .schedules-data__header {
  display: none;
  color: var(--ylb-color-dark-grey-2, #231f20);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ylb-color-light-grey-3, #ccc);
}

@media (min-width: 768px) {
  .schedule-dashboard__content .schedules-data__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 0 12px;
  }

  .schedule-dashboard__content .schedules-data__header > div {
    flex: 0 1 auto;
    padding: 8px 12px 12px;
  }
}

@media (min-width: 576px) and (max-width: 1199.98px) {
  .schedule-dashboard__content .schedules-data__header .instructor-column {
    margin-left: -40px;
  }
}

@media (min-width: 992px) {
  .schedule-dashboard__content .schedules-data__header .instructor-column {
    margin-left: -20px;
  }
}

.schedule-dashboard__modal--body .body--content .schedules-data__row {
  color: var(--ylb-color-dark-grey-2, #231f20);
  border: 1px solid var(--ylb-color-light-grey-3, #ccc);
  border-bottom: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0 12px;
}

.schedule-dashboard__modal--body .body--content .schedules-data__row > div {
  padding: 24px 12px;
}

.schedule-dashboard__modal--body .body--content .schedules-data__row:nth-child(even) {
  background-color: var(--ylb-color-light-grey-1, #f2f2f2);
}

.schedule-dashboard__modal--body .body--content .schedules-data__row:nth-child(odd) {
  background-color: #fff;
}

.schedule-dashboard__modal--body .body--content .schedules-data__row:first-child {
  border-top-left-radius: var(--schedules-border-radius, 8px);
  border-top-right-radius: var(--schedules-border-radius, 8px);
}

.schedule-dashboard__modal--body .body--content .schedules-data__row:last-child {
  border-bottom: 1px solid var(--ylb-color-light-grey-3, #ccc);
  border-bottom-left-radius: var(--schedules-border-radius, 8px);
  border-bottom-right-radius: var(--schedules-border-radius, 8px);
}

.schedule-dashboard__modal--body .body--content .schedules-data__row .duration,
.schedule-dashboard__modal--body .body--content .schedules-data__row .time {
  font-size: 14px;
  font-family: var(--ylb-font-family-verdana), Verdana, sans-serif;
  font-weight: 700;
  line-height: 20px;
}

.schedule-dashboard__modal--body .body--content .schedules-data__row .duration {
  font-weight: 400;
}

.schedule-dashboard__modal--body .body--content .schedules-data__row .location-column,
.schedule-dashboard__modal--body .body--content .schedules-data__row .location-column .room {
  font-size: 14px;
  font-family: var(--ylb-font-family-verdana), Verdana, sans-serif;
  font-weight: 400;
  line-height: 20px;
  color: var(--ylb-color-black, #000);
}

.schedule-dashboard__modal--body .body--content .schedules-data__row .addtocalendar {
  top: 0;
  left: -10px;
  float: none;
  display: flex;
  gap: 10px;
}

.schedule-dashboard__content .schedules-data__row .register-column,
.schedule-dashboard__modal--body .body--content .schedules-data__row .register-column {
  margin-top: 0;
  padding-top: 0;
  text-align: left;
}

.schedule-dashboard__content .schedules-data__row .register-column a,
.schedule-dashboard__modal--body .body--content .schedules-data__row .register-column a {
  background: none;
  background-color: transparent;
  color: var(--ylb-color-black, #000);
  font-weight: 400;
  border-radius: 0;
  padding: 0;
  text-decoration: underline;
}

.schedule-dashboard__content .schedules-data__row .register-column a:hover,
.schedule-dashboard__modal--body .body--content .schedules-data__row .register-column a:hover {
  background: none;
  background-color: transparent;
  color: var(--ylb-color-black, #000);
}

.schedule-dashboard__sidebar .navbar.navbar-default > .navbar-header {
  flex: 1 1 auto;
  width: 100%;
}

.schedule-dashboard__sidebar .navbar.navbar-default .navbar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/*
 * Category filters are a long full-width list. Keep each row to one line and
 * scroll the list so the rest of the schedule stays on screen.
 */
.schedule-dashboard__sidebar #schedules-filters #form-group-category .checkboxes {
  max-height: 240px;
  overflow-y: auto;
}

.schedule-dashboard__sidebar #schedules-filters #form-group-category .checkboxes .checkbox-wrapper {
  padding: 0;
}

.schedule-dashboard__sidebar #schedules-filters #form-group-category .checkboxes .checkbox-wrapper input:checked + label,
.schedule-dashboard__sidebar #schedules-filters #form-group-category .checkboxes .checkbox-wrapper input:not(:checked) + label {
  padding: 4px 10px 4px 35px;
}

.schedule-dashboard__sidebar #schedules-filters #form-group-category .checkboxes .checkbox-wrapper input:checked + label:before,
.schedule-dashboard__sidebar #schedules-filters #form-group-category .checkboxes .checkbox-wrapper input:checked + label:after,
.schedule-dashboard__sidebar #schedules-filters #form-group-category .checkboxes .checkbox-wrapper input:not(:checked) + label:before,
.schedule-dashboard__sidebar #schedules-filters #form-group-category .checkboxes .checkbox-wrapper input:not(:checked) + label:after {
  top: 6px;
}

@media (min-width: 992px) {
  .schedule-dashboard__modal--body .body--content .schedules-data__row {
    padding: 0 12px;
  }

  .schedule-dashboard__modal--body .body--content .schedules-data__row > div {
    flex-basis: 0;
    flex-grow: 1;
    padding: 24px 12px;
  }

  .schedule-dashboard__modal--body .body--content .schedules-data__row > div:nth-child(even) {
    text-align: left;
  }
}
