.dlg-avoidSelection{
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.dlg-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 50%;
  max-width: 500px;
  min-width: 320px;
  height: auto;
  z-index:999999999;
  visibility: hidden;
  transform: translateX(-50%) translateY(-50%);
  -webkit-transform: translateX(-50%) translateY(-50%);
  -ms-transform: translateX(-50%) translateY(-50%);
  -o-transform:translateX(-50%) translateY(-50%);
  -moz-transform: translateX(-50%) translateY(-50%);
}
.dlg-title{
  max-height: 90px;
  margin: 0;
  text-align: center;
  font-size: 1.5em;
  height: 90px;
}
.dlg-content {
  position: relative;
  margin: 0 auto;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 20px;
  padding: 0 2em 0 2em;
}
.dlg-center{
  padding-left: 25%;
  padding-right: 25%;
}

.dlg-XButton:hover,
.dlg-XButton:active{
  transform: scale(1.5,1.5);
  -webkit-transform: scale(1.5,1.5);
  -ms-transform: scale(1.5,1.5);
  -o-transform: scale(1.5,1.5);
  -moz-transform: scale(1.5,1.5);
  -ms-transform-origin: center center;
  -webkit-transform-origin: center center;
  transform-origin: center center;
}
.dlg-XButton {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  transition: transform 0.8s;
  -webkit-transition: -webkit-transform 0.8s;
  -moz-transition: -moz-transform 0.8s;
  -ms-transition: -ms-transform 0.8s;
  -o-transition: -o-transform 0.8s;
  position: absolute;
  top: 10px;
  right: 15px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  cursor: pointer;
}
.dlg-XButton:after {
  font-family: Verdana !important;
  font-size: 20px;
  display: block;
  content: "×";
}
@media (max-width: 768px) {
  .dlg-title{
    box-shadow: 0 4px 8px -5px rgba(0, 0, 0, 0.8);
  }
  .dlg-modal {
    width: 100%;
    height: 100%;
    left: 50% !important;
    top: 50% !important;
    max-width: 100%;
  }
  .dlg-content{
    color: #5c7d98;
    position: relative;
    margin: 0 auto;
    height:100%;
    max-height:100%;
    overflow-y: scroll;
    padding: 15px 40px 30px;
  }
  .dlg-content:after{
    padding-bottom: 120px;
    content:"";
    display:block;
  }
}
.dlg-showModal {
  visibility: visible;
}
.dlg-overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  visibility: hidden;
  top: 0;
  left: 0;
  z-index: 1040;
  opacity: 0;
  background: rgba(0, 0, 0, 0.8);
  -webkit-transition: -webkit-transform 0.3s, opacity 0.3s, visibility 0.3s;
  -moz-transition: -webkit-transform 0.3s, opacity 0.3s, visibility 0.3s;
  -ms-transition:-webkit-transform 0.3s, opacity 0.3s, visibility 0.3s;
  -o-transition: -webkit-transform 0.3s, opacity 0.3s, visibility 0.3s;
  transition: -webkit-transform 0.3s, opacity 0.3s, visibility 0.3s;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
}
.dlg-showModal ~ .dlg-overlay {
  opacity: 1;
  visibility: visible;
}
.dlg-wrapper{
  height: 100%;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.8);
  background-color:#FFF;
  overflow: hidden;
  color: #5c7d98;
}
.dlg-MainContainer{
  -webkit-overflow-scrolling: touch;
  -webkit-transition: -webkit-transform 0.5s;
  -moz-transition: -moz-transform 0.5s;
  -o-transition: -o-transform 0.5s;
  transition: transform 0.5s;
  -ms-transition: -ms-transform 0.5s;
  -ms-transform-origin: center top;
  -webkit-transform-origin:  center top;
  transform-origin: center top;
}
.dlg-MainContainer.dlg-effect{
  -webkit-transform: scale(0.8);
  -moz-transform:  scale(0.8);
  -o-transform:  scale(0.8);
  -ms-transform:  scale(0.8);
  transform:  scale(0.8);
}
.dlg-effect .dlg-wrapper {
  -webkit-transform: translateY(-20%);
  -moz-transform: translateY(-20%);
  -o-transform: translateY(-20%);
  -ms-transform: translateY(-20%);
  transform: translateY(-20%);
  opacity: 0;
  -webkit-transition: -webkit-transform 0.5s,opacity 0.5s,visibility 0.5s;
  -moz-transition: -moz-transform 0.5s,opacity 0.5s,visibility 0.5s;
  -o-transition: -o-transform 0.5s,opacity 0.5s,visibility 0.5s;
  transition: transform 0.5s,opacity 0.5s,visibility 0.5s;
  -ms-transition: -ms-transform 0.5s,opacity 0.5s,visibility 0.5s;
}
.dlg-showModal.dlg-effect .dlg-wrapper {
  -webkit-transform: translateY(0);
  -moz-transform: translateY(0);
  -o-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
  opacity: 1;
}

.dlg-modal h3 {
  max-height: 90px;
  margin: 0;
  font-size:14px;
  font-weight: bold;
  text-align: center;
  padding-top: 34px;
}
.dlg-content >  p {
  margin-top: 20px;
}
.dlg-content button {
  display: block;
  margin: 0 auto;
  font-size: 0.8em;
}
