.modal-content {
  background-color: white; 
  padding: 0; 
  position: relative;
	border-radius: 3px;
  -webkit-border-radius: 3px;
  -moz-border-radius:  3px;
  -khtml-border-radius: 3px;
  z-index: 0;
  display: block;
  width: 100%;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

.modal {
  display: none;
  background: rgb(200, 200, 200);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 3px 3px 3px 3px;
  -webkit-border-radius: 5px;
  -moz-border-radius:  5px;
	-khtml-border-radius: 5px;
  border-radius: 5px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  /*
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2), 0 0 0 1000px rgba(0, 0, 0, 0.5);
  top: 50%;
  left: 50%;
  -webkit-transform: translate3d(-50%, -50%, 0) scale(1, 1);
  -ms-transform: translate3d(-50%, -50%, 0) scale(1, 1);
  transform: translate3d(-50%, -50%, 0) scale(1, 1);
  -moz-transform: translate3d(-50%, -50%, 0) scale(1, 1);
  zoom: 1;*/
  position: relative;
}

.modal .modal-cancel {
	position: absolute;
	top: 1em;
  right: 1em;
  padding: 0;
  z-index: 1;
  display: block;
  text-decoration: none;
  color: transparent;
  width: 1em;
  height: 1em;
  overflow: visible;
}

.modal-cancel:after {
	content: "✕";
  color: rgba(0, 0, 0, 0.5) !important;
  padding: 0;
  font-size: 120%;
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  padding: 0;
  z-index: 2;
}

.modal-cancel:hover:after {
	color: rgba(0, 0, 0, 0.5);
  background-color: rgba(255, 255, 255, 0.5);
}

.modal-buttons {
  background-color: rgba(240, 240, 240, 0.8);
  margin: 3px 0 0 0;
  border-radius: 0 0 3px 3px;
  border-top: solid 1px rgba(0, 0, 0, 0.05);
  -webkit-border-radius: 0 0 3px 3px;
  -moz-border-radius:  0 0 3px 3px;
  -khtml-border-radius: 0 0 3px 3px;
  padding: 1em;
  text-align: right;
}

.modal-content {
  margin: 0;
  padding: 0;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content > h1:first-child, .modal-content > h2:first-child, .modal-content > h3:first-child {
	background-color: rgba(0, 0, 0, 0.05);
  padding: 1em;
  margin: 0px -3px 0 -3px !important;
  border-bottom: solid 1px rgba(0, 0, 0, 0.05);
}

.modal-content > .content > h1:first-child, .modal-content > .content > h2:first-child, .modal-content > .content > h3:first-child {
	background-color: rgba(0, 0, 0, 0.05);
  padding: 1em;
  margin: -1em -1em 1em -1em;
  border-bottom: solid 1px rgba(0, 0, 0, 0.05);
}

.modal-content > .content > p:first-child {
	margin-top: 0;
}

.modal-content > .content > p:last-child {
	margin-bottom: 0;
}

.modal-page-cover {
	background: rgb(220, 220, 220);
	background: rgba(0, 0, 0, 0.5); 
}

.modal-buttons a:link, .modal-buttons a:visited {
	color: black !important;
}

.modal .content {
	color: black;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1em;
  position: relative;
}

.modal .modal-title {
	color: black;
}

.modal .content :first-child {
  margin-top: 0;
}


#modal-container {
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: fixed;
}

.modal-container-2 {
  display: flex;
  /* Vertical align: */
  align-items: center;
  /* Horizontal align: */
  justify-content: center;

  /* Safari: */
  display: -webkit-flex;
  -webkit-align-items: center;
  -webkit-justify-content: center;
  
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: fixed;
}

.modal .modal-title {
	font-size: 13pt;
  padding: 1.5em 1em;
  line-height: 1em;
}


@media (max-width: 640px) {
	.modal {
  	position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    width: 100%  !important;
    margin: 0 !important;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding: 1em 1em 3.5em 1em;
    border-radius: 0 !important;
    transform: translate3d(0 , 0, 0);
  	-webkit-transform: translate3d(0, 0, 0);  
  	-ms-transform: translate3d(0, 0, 0);  
  	-moz-transform: translate3d(0, 0, 0);  
  	zoom: 1;    
  }
  
  .modal-buttons {
  	width: 100%;
    height: auto;
    position: absolute;
    bottom: 0;
    left: 0;
    top: auto;
    padding: 0.5em 1em;
    box-sizing: border-box;
    margin: 0 !important;
  }
  
  .modal-content {
    max-height: 100%;
    position: absolute;
    box-sizing: border-box;
    overflow-y: hidden;
    overflow-x: hidden;
    top: 0;
    bottom: 0;
    left: 0;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .modal .content {
  	height: 100%;
    padding-bottom: 4.5em;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;    
  }
}

/*

@-webkit-keyframes fadein {
  0% {
    opacity: 0; }
  100% {
    opacity: 1; } }
@-ms-keyframes fadein {
  0% {
    opacity: 0; }
  100% {
    opacity: 1; } }
@keyframes fadein {
  0% {
    opacity: 0; }
  100% {
    opacity: 1; } }
@-webkit-keyframes popin {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
    opacity: 0; }
  85% {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
    opacity: 1; }
  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 1; } }
@-ms-keyframes popin {
  0% {
    -ms-transform: scale(0);
    transform: scale(0);
    opacity: 0; }
  85% {
    -ms-transform: scale(1.05);
    transform: scale(1.05);
    opacity: 1; }
  100% {
    -ms-transform: scale(1);
    transform: scale(1);
    opacity: 1; } }
@keyframes popin {
  0% {
    -webkit-transform: scale(0);
    -ms-transform: scale(0);
    transform: scale(0);
    opacity: 0; }
  85% {
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
    opacity: 1; }
  100% {
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
    opacity: 1; } }
    
    */