/**
 * Modals ($modals)
 */

/* 1. Ensure this sits above everything when visible */
.popup {
    position: absolute;
    z-index: 10000; /* 1 */
    top: 0;
    left: 0;
    visibility: hidden;
    width: 100%;
    height: 100%;
}

.popup.is-visible {
    visibility: visible;
}

.popup-overlay {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: hsla(0, 0%, 0%, 0.5);
  visibility: hidden;
  opacity: 0;
  -webkit-transition: visibility 0s linear 0.3s, opacity 0.3s;
  transition: visibility 0s linear 0.3s, opacity 0.3s;
}

.popup.is-visible .popup-overlay {
  opacity: 1;
  visibility: visible;
  -webkit-transition-delay: 0s;
          transition-delay: 0s;
}

.popup-wrapper {
  position: absolute;
  z-index: 9999;
  top: 6em;
  left: 50%;
  width: 700px;
  margin-left: -350px;
  background-color: #fff;
  box-shadow: 0 0 1.5em hsla(0, 0%, 0%, 0.35);
}

.popup-transition {
  -webkit-transition: all 0.3s 0.12s;
  transition: all 0.3s 0.12s;
  -webkit-transform: translateY(-10%);
          transform: translateY(-10%);
  opacity: 0;
}

.popup.is-visible .popup-transition {
  -webkit-transform: translateY(0);
          transform: translateY(0);
  opacity: 1;
}

.popup-content {
  padding: 0 24px 24px 24px;
}

.popup-header {
  position: relative;
  background-color: #fff;
  padding: 24px 24px 0;
}

.popup-close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 1em;
  color: #aaa;
  background: none;
  border: 0;
}

.popup-close:hover {
  color: #777;
}

.popup-heading {
  font-size: 1.125em;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color:#3b3a3a;
}

.popup-content > *:first-child {
  margin-top: 0;
}

.popup-content > *:last-child {
  margin-bottom: 0;
}

@media only screen and (max-width: 767px) { 
	.popup-wrapper {
		width: 92%;
		top: 4%;
		left: auto;
		margin: 0 4%;
	}
}