@use '@carbon/colors';
@use '@carbon/type';

.sidebar {
  width: 12rem;
  min-height: 8rem;
  overscroll-behavior: contain;
  margin-right: 1rem;
}

.sidebarList {
  max-height: 100%;
}

.sidenavActions {
  margin-left: 0.6rem;
}

@media all and (device-width: 600px) and (device-height: 1024px) and (orientation: portrait) {
  .sidebar {
    width: 11rem;
    max-height: 500px;
    margin-right: 20px;
    position: fixed;
  }

  .sidebarList {
    max-height: 200px;
    overflow-y: scroll;
  }
}

.link {
  margin: 0.375rem 0 0.375rem 0.5rem;
  font-size: 1rem;
  line-height: 1.43;
  letter-spacing: 0.16px;
  color: colors.$gray-100;
  cursor: pointer;

  :hover {
    outline: none;
  }
}

.section {
  border-left: 0.5rem solid colors.$teal-20;
  display: flex;
  align-items: center;
  height: 2rem;
  padding: 0.25rem 0.5rem;
  background-color: colors.$white;
  cursor: pointer;
}

/* Tablet */
:global(.omrs-breakpoint-lt-desktop) {
  .section {
    height: 3rem;
  }
}

.sectionLink {
  @include type.type-style('body-01');
  color: colors.$gray-100;
}

.activeSection {
  @extend .section;
  border-left: 0.5rem solid colors.$teal-50;
  background-color: #ededed;

  .sectionLink {
    font-weight: 600;
  }
}

.sectionDone {
  @extend .section;
  border-left: 0.5rem solid colors.$teal-80;
  background-color: colors.$green-10;
}

.erroredSection {
  @extend .section;
  border-left: 0.5rem solid colors.$red-60;
  color: colors.$red-70 !important;
  background-color: colors.$red-20;
}

.activeErroredSection {
  @extend .erroredSection;
  font-weight: 600;
}

.divider {
  border: 0;
  border-top: 1px solid colors.$gray-40;
  margin: 2.5rem 0.5rem 1rem;
}

.button {
  width: 11rem;
}

.topMargin {
  margin-top: 1.5rem;
}

.saveButton {
  @extend .button;
  margin-bottom: 0.625rem;
}

.closeButton {
  @extend .button;
}

.toggleContainer {
  margin-bottom: 0.5rem;
}
