#modal {
  display: none;
  position: fixed;
  /*top: 50%;
  left: 50%;*/
  box-sizing: border-box;
  z-index: 9000000;
  -moz-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

#modal{
top: 50%;
left: 50%;
}



/* We have to create a sibling modal-background element as it cannot be done with :before or :after pseudo-elements because they can't be positioned beside the element */
#modal-background {
  display: none;
  position: fixed;
  background: #000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  z-index: 900000;
}

/* Modal styles */
#modal.styled {
  width: 50%;
  max-height: 350px;
  min-width: 100px;
  overflow: auto;
  background: #fff;
  padding: 12px 14px;
  border: 1px solid;
  border-color: #aaa #999 #888;
  border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  box-shadow: 0 3px 14px -4px #000;
  -ms-box-shadow: 0 3px 14px -4px #000;
  -moz-box-shadow: 0 3px 14px -4px #000;
  -webkit-box-shadow: 0 3px 14px -4px #000;
  box-shadow: 0 3px 14px -4px #000;
}

/* Demo styles */
.dummy-text {
  margin: 50px;
}
