
details[open].drawer-wrapper .drawer {
  position: fixed;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  right: 0;
  top: $header-height;
  z-index: 40;
  width: $meta-sidebar-width;
  height: 100%;
  max-height: 100%;
  padding: $spacing-md $spacing $header-height $spacing;
  color: $white;
  background-color: $header;
  border-top: 1px solid $black;
}

details[open].drawer-wrapper .drawer-trigger::before {
  content: "";
  position: fixed;
  width: 100%;
  height: 100%;
  top: $header-height;
  left: 0;
  z-index: 2;
  background-color: rgba(0,0,0,.75);
}

.drawer-trigger {
  cursor: pointer;
}

details .drawer-trigger .close-btn {
  display: none;
}


details[open] .drawer-trigger .close-btn {
  position: fixed;
  display: inline-flex;
  right: 0;
  top: $header-height;
  cursor: pointer;
  color: $white;
  z-index: 41;
  border-radius: 0;

  &:hover, &:focus {
    background-color: $link-hover-color;
  }
}

.drawer-header {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
}

.drawer-title {
  font-size: $font-size-h4;
  padding-bottom: $spacing-xs;
}

.drawer-content {
  position: relative;
  flex: 1;
  overflow-y: scroll;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  padding-top: $spacing-xs;
  padding-bottom: $spacing;
}

.drawer-content::-webkit-scrollbar {
  display: none;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.drawer-footer {
  display: flex;
  align-items: center;
  height: $actionbar-height;
  background-color: $info;
  padding-left: $spacing;
  padding-right: $spacing;
  margin-left: (-$spacing);
  margin-right: (-$spacing);
}

.drawer-footer .btn {
  margin-right: $spacing-xs;
  &:last-child {
    margin-right: 0;
  }
}

.drawer-footer .btn-primary {
  color: $primary;
  background-color: $white;
  border-color: $white;
  &:hover, &:focus {
    color: $white;
    background-color: $link-hover-color;
    border-color: $link-hover-color;
  }
}

.drawer-footer .btn-secondary {
  color: $white;
  background-color: transparent;
  border-color: $white;
  &:hover, &:focus {
    color: $white;
    background-color: $link-hover-color;
    border-color: $link-hover-color;
  }
}

.drawer-content .section-header,
.drawer-content .section-collapsable .section-title {
  color: $white;
  &::before {
    background-color: $white;
  }
  &::after {
    border-color: $gray-darker;
  }
  .section-title {
    background-color: $header;
  }
}

.drawer-content .icon-user-story {
  color: $white;
}
