/* The Modal (background) */
.tb-modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 999999;
  /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: black;
  /* Fallback color */
  background-color: rgba(255, 255, 255, 0.7);
  /* Black w/ opacity */
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

/* Modal Content/Box */
.tb-modal-content {
  background-color: #ffffff;
  padding: 32px;
  margin: 32px;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.2);
  max-width: 80%;
  /* Could be more or less, depending on screen size */
  max-height: 85%;
  overflow: hidden;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 16px;
}

.tb-modal-content .tb-table-container {
  overflow-x: hidden;
  overflow-y: auto;
}

/* The Close Button */
.tb-modal-close:hover,
.tb-modal-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.tb-modal-close {
  cursor: pointer;
}

@media only screen and (max-width: 1024px) {
  .tb-modal-content {
    padding: 16px !important;
    margin: 0 !important;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: 100%;
  }
  .tb-modal-open {
    position: fixed;
    overflow: hidden;
  }
}

@media only screen and (max-height: 767px) {
  .tb-modal-content {
    padding: 16px !important;
    margin: 0 !important;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: 100%;
  }
  .tb-modal-open {
    position: fixed;
    overflow: hidden;
  }
}

#tb-iemsgmodal {
  position: fixed;
  height: 100%;
  left: 0;
  z-index: 9999;
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
}

#tb-iemsgmodal .tb-modal-content {
  height: auto;
  width: 800px;
  z-index: 9999;
  position: fixed;
  top: 85px;
  padding: 32px !important;
  left: 0;
  right: 0;
  margin: auto !important;
}

#tb-iemsgmodal .tb-modal-title {
  padding-bottom: 24px;
}

#tb-iemsgmodal .tb-modal-subtitle {
  font-size: 1em;
  padding-bottom: 16px;
}

#tb-iemsgmodal .tb-modal-info {
  font-style: italic;
  font-size: .8em;
}

#tb-iemsgmodal .tb-modal-btn-wrap {
  text-align: center;
  padding-top: 42px;
}
