/* Modals */

/* Kill the scroll on the body */
.modal-open {
  overflow: hidden;
}

/* Container that the modal scrolls within */
.modal {
  display: none;
  overflow: hidden;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  -webkit-overflow-scrolling: touch;

  /* Prevent Chrome on Windows from adding a focus outline. For details, see
     https://github.com/twbs/bootstrap/pull/10951. */
  outline: 0;
}

/* When fading in the modal, animate it to slide down */
.modal.fade .modal-dialog {
  -webkit-transform: translate(0, -25%);
  -ms-transform: translate(0, -25%);
  -o-transform: translate(0, -25%);
  transform: translate(0, -25%);
  -webkit-transition: -webkit-transform 0.3s ease-out;
  -moz-transition: -moz-transform 0.3s ease-out;
  -o-transition: -o-transform 0.3s ease-out;
  transition: transform 0.3s ease-out;
}

.modal.in .modal-dialog {
  -webkit-transform: translate(0, 0);
  -ms-transform: translate(0, 0);
  -o-transform: translate(0, 0);
  transform: translate(0, 0);
}

.modal-open .modal {
  overflow-x: hidden;
  overflow-y: auto;
}

.vertical-alignment-helper {
  display: table;
  height: 100%;
  width: 100%;
  pointer-events:none; /* This makes sure that we can still click outside of the modal to close it */
}

.vertical-align-center {
  /* To center vertically */
  display: table-cell;
  vertical-align: middle;
  pointer-events:none;
}

/* Shell div to position the modal with bottom padding */
.modal-dialog {
  position: relative;
  width: auto;
  margin: 10px;
}

.modal.in.modal--centered .modal-dialog {
	top: 50%;
	transform: translate(0, -50%);
}

/* Actual modal */
.modal-content {
  position: relative;
  background-color: #fff;
  background-clip: padding-box;
  /* Remove focus outline from opened modal */
  outline: 0;

  /* Bootstrap sets the size of the modal in the modal-dialog class, we need to inherit it */
  width:inherit;
  max-width:inherit; /* For Bootstrap 4 - to avoid the modal window stretching full width */
  height:inherit;
  /* To center horizontally */
  margin: 0 auto;
  pointer-events: all;
}

/* Modal background */
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  background-color: #000;
}

/* Fade for backdrop */
.modal-backdrop.fade {
  opacity: 0;
  filter: alpha(opacity=0);
}

.modal-backdrop.in {
  opacity: 0.8;
  filter: alpha(opacity=80);
}

/* Modal header
   Top section of the modal w/ title and dismiss */
.modal-header {
  padding: 15px;
  border-bottom: 1px solid #e5e5e5;
  min-height: 16.42857px;
}

/* Close icon */
.modal .close {
	display: block;
	font-family: "Oswald", sans-serif;
	font-size: 16px;
	line-height: 1;
  position: absolute;
  right: 10px;
  text-transform: uppercase;
  top: 8px;
  z-index: 100;
}

/* Title text within header */
.modal-title {
  margin: 0;
  line-height: 1.42857;
}

/* Modal body
   Where all modal content resides (sibling of .modal-header and .modal-footer) */
.modal-body {
  position: relative;
  padding: 15px;
}

/* Footer (for actions) */
.modal-footer {
  padding: 15px;
  text-align: right;
  border-top: 1px solid #e5e5e5;
}

.modal-footer:before,
.modal-footer:after {
  content: " ";
  display: table;
}

.modal-footer:after {
  clear: both;
}

/* Measure scrollbar width for padding body during modal show/hide */
.modal-scrollbar-measure {
  position: absolute;
  top: -9999px;
  width: 50px;
  height: 50px;
  overflow: scroll;
}

/* Scale up the modal */
@media (min-width: 768px) {
  /* Automatically set modal's width for larger viewports */
  .modal-dialog {
    width: 600px;
    margin: 0 auto;
  }

  /* Modal sizes */
  .modal-sm { width: 300px; }
}

@media (min-width: 960px) {
  .modal-lg { width: 900px; }
}
