/* Modal positioning */
body.sm-modal-open:after {
  background: #222;
  content: '';
  display: block;
  height: 100%;
  opacity: .6;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

#main-header {
  z-index: 1;
}

#sm-bodymovin,
.sm-modal {
  height: auto;
  left: 50%;
  max-height: 90%;
  max-width: 900px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  z-index: -1;
  min-height: 50%;
}

#sm-modal {
  width: 100%;
}

#sm-bodymovin.event-modal,
#sm-modal.event-modal {
  max-height: 350px;
  max-width: 600px;
}

.sm-modal-open #sm-bodymovin {
  border-radius: 5px;
  /*display: block !important;*/
  display: flex !important;
  overflow: hidden;
  overflow-y: auto;
  text-align: center;
  opacity: 1;
  z-index: 101;
}

#sm-modal-close {
  /* Initial state for the close button transition */
  transition: opacity 0.4s ease 0.1s, color 0.2s, transform 0.2s;
  opacity: 0;
  border: none;
  background: none;
  position: absolute;
  top: 0;
  right: 0;
  font-size: 30px;
  padding: 0 10px;
  cursor: pointer;
  z-index: 1;
  color: #000000;
  line-height: 30px;
  border-left: 1px solid #a1a1a1;
  border-bottom: 1px solid #a1a1a1;
  border-radius: 0;
}

/* Show the close button when the modal is open */
.sm-modal-open #sm-modal-close {
  opacity: 14;
}

#sm-modal-close:focus {
  outline: none;
  transform: scale(1.1);
}

.sm-modal-open .sm-modal {
  z-index: 13;
}

.sm-modal-inner {
  /* Set the initial state for the content transition */
  opacity: 0;
  transform: scale(0.8) translate3D(0, -20px, 0);
  transition: opacity 0.2s, transform 0.8s cubic-bezier(.09, .52, .25, 1);
  /*text-align: center;*/
  height: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 1em;
  position: relative;
  width: 100%;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 5px;
}

/* Make the content transitions when the modal is open */
.sm-modal-open .sm-modal-inner {
  opacity: 1;
  transform: scale(1) translate3D(0, 0, 0);
}

#sm-bodymovin.event-modal .sm-modal-inner {
  max-height: 375px;
  text-align: left;
  padding-top: 30px;
}

#sm-modal-inner-container {
  max-width: 100%;
  height: 100%;
  width: 100%;
}

#sm-modal-image {
  position: relative;
  display: inline-block;
  width: 38%;
  margin-right: 2%;
  vertical-align: top;
  height: 100%;
}

#sm-modal-content {
  position: relative;
  display: inline-block;
  width: 59%;
  vertical-align: top;
  min-height: 100%;
  font-size: 16px;
  line-height: 1.4;
}

.sm-modal-more-link {
  color: #ed1f24;
}

#sm-modal-title {
  font-size: 20px;
  line-height: 1.4;
  font-weight: bold;
}

#sm-modal-view {
  position: absolute;
  right: 10px;
  bottom: 10px;
}

#sm-modal-view > a {
  color: #ed1f24;
  border: 1px solid #a1a1a1;
  border-radius: 20px;
  padding: 4px 16px 4px 9px;
  position: relative;
}

#sm-modal-view > a::after {
  content: " ";
  display: block;
  position: absolute;
  background: url("/wp-content/themes/sstc/assets/images/plain-sstc-marker.png") 0 0 no-repeat;
  background-size: cover;
  width: 22px;
  height: 34px;
  right: -3px;
  bottom: 9px;
}

#sm-modal-contact .socialLink {
  margin: 0 5px;
  display: inline-block;
  max-width: 40px;
}
#sm-modal-contact .socialLink:first-of-type {
  margin-left: 0;
}

.sm-modal-carousel {
  height: 100%;
}
.sm-modal-carousel #scroll-backward,
.sm-modal-carousel #scroll-forward {
  display: inline-block;
  position: absolute;
  top: 50%;
  margin-top: -28px;
  z-index: 1000;
}
.sm-modal-carousel #scroll-backward {
  left: 0;
}
.sm-modal-carousel #scroll-forward {
  right: 0;
}
.sm-modal-carousel.slick-slider .slick-list,
.sm-modal-carousel.slick-slider .slick-track {
  height: 100% !important;
}
.sm-modal-carousel.slick-slider .slick-slide img {
  margin: auto;
  max-height: 100%;
  max-width: 100%;
}

@media (min-width: 1200px) {
  #sm-bodymovin,
  .sm-modal {
    min-height: 500px;
  }
}

@media (max-width: 599px) {
  #sm-modal-image {
    display: none;
  }
  #sm-modal-content {
    width: auto;
  }
  #sm-modal-view {
    position: static;
    display: block;
    text-align: right;
    padding: 5px 0;
  }
}

@media(min-width: 600px) and (max-width: 730px) {
  #sm-modal-content {
    width: 57%;
  }
}


/* Modal updated */
#sm-modal-content-updated p {
  line-height: 24px;
}

#sm-modal-content-top {
  display: flex;
}

#sm-modal-content-top-left,
#sm-modal-content-top-right {
  text-align: left;
}

#sm-modal-content-top-left {
  flex-basis: 66%;
  padding-right: 20px;
}

#sm-modal-content-descimage {
  float: left;
  margin-bottom: 10px;
  margin-right: 10px;
  margin-top: 10px;
  max-width: 200px;
}

#sm-modal-content-name {
  font-weight: bold;
  font-size: 19px;
}

#sm-modal-content-description {
  font-size: 17px;
}

#sm-modal-content-top-right {
  display: flex;
  flex-basis: 33%;
  flex-direction: column;
}

#sm-modal-content-contact-title {
  font-weight: bold;
  font-size: 19px;
}

#sm-modal-content-updated #sm-modal-contact {
  font-size: 17px;
}

#sm-modal-contact-phone,
#sm-modal-contact-address,
#sm-modal-contact-social {
  margin-bottom: 20px;
}

#sm-modal-content-updated #sm-modal-contact-social a {
  display: inline-block;
  margin-right: 10px;
  max-width: 40px;
}

#sm-modal-view-on-map-btn {
  border: 1px solid #a1a1a1;
  border-radius: 20px;
  color: #ed1f24;
  padding: 4px 16px;
  text-decoration: none;
}

#sm-modal-content-bottom .sm-modal-carousel {
  height: 200px;
  margin-top: 20px;
}

#sm-modal-content-bottom .sm-modal-carousel > div > img,
#sm-modal-content-bottom .slick-slide > img {
  padding: 0 10px;
}

#sm-modal-view {
  position: absolute;
  left: 0;
  right: 10px;
  bottom: -5px;
  text-align: right;
}

#sm-modal-view > a {
  color: #ed1f24;
  border: 1px solid #a1a1a1;
  border-radius: 20px;
  padding: 4px 16px 4px 9px;
  position: relative;
  display: inline-block;
  margin-left: 10px;
  text-decoration: none;
}
#sm-modal-view > a:hover {
  text-decoration: underline;
}
#sm-modal-view > a::after {
  content: " ";
  display: block;
  position: absolute;
  background: url("../images/plain-sstc-marker.png") 0 0 no-repeat;
  background-size: cover;
  width: 22px;
  height: 34px;
  right: -3px;
  bottom: 9px;
}
#sm-modal-view > a.externalLink {
  padding-right: 9px;
  margin-left: 0;
  float: left;
}
#sm-modal-view > a.externalLink::after {
  display: none;
}


/* Model Content responsiveness */
@media (max-width: 900px) {
  #sm-modal-content-top {
    display: block;
  }
  #sm-modal-content-top-left {
    padding-right: 0;
  }
  #sm-modal-content-descimage {
    max-width: 50%;
    max-height: 200px;
  }
}

@media (max-width: 600px) {
  #sm-modal-content-descimage {
    float: none;
    max-width: 100%;
  }
}