body:has(.modal.is-open) {
  overflow: hidden;
}

.slide-nav-container {
  max-width: var(--section-max);
  margin: 1rem auto;
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  padding: .5rem 0;
}

.modal {
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(10px);
  z-index: -1;
}

.modal.is-open {
  position: fixed;
  z-index: 999;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: start;
  overflow: auto;
  padding: 4rem 0;
}

button.modal-close {
  border: 0;
  display: block;
  position: absolute;
  right: 0;
  top: 0;
  padding: 1.5rem 3rem;
  background: transparent;
}

header.modal-header,
.modal-header,
.modal-rte {
  max-width: 75%;
  margin: 0 auto;
}

.modal-content {
  width: 100%;
  max-width: 900px;
  background: #fff;
  border-radius: 24px;
  padding: 4rem 5rem;
  position: relative;
}

.modal-image {
  margin: 2rem 0 0;
}

.modal-image img {
  display: block;
  width: 100%;
}

button.modal-close::before { 
  content: "\2715";
  font-family: var(--typography-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-mid-gray);
  cursor: pointer;
}

button.modal-nav {
  border: 0;
  border-radius: 60px;
  display: block;
  position: fixed;
  top: 50%;
  background: #fff;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  transform: translateY(-50%);
  padding: 0;
}

button.slide-nav {
  border: 0;
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.10), 0px 2px 5px 0px rgba(0, 0, 0, 0.10);
  border-radius: 60px;
  display: block;
  background: #fff;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

button.modal-prev {
  left: calc(50vw - (900px / 2) - 3rem); {# 50vw - container max width / 2 - spacing #}
}

button.modal-next {
  right:  calc(50vw - (900px / 2) - 3rem);
}

button.modal-nav::before,
button.slide-nav::before {
  content: '';
  background: url("https://39563058.fs1.hubspotusercontent-na1.net/hubfs/39563058/raw_assets/public/via/images/icons/chevron.svg") center no-repeat;
  display: block;
  width: 2rem;
  height: 2rem;
  background-size: auto;
}

button.modal-next::before,
button.slide-next::before {
  transform: scale(-1);
}

@media screen and (max-width: 1080px) {
    .modal-content {
        max-width: 760px;
        padding: 3rem 2rem;
        width: 100%;
    }
    button.modal-prev {
      display: none;
      left: calc(50vw - ((100vw - 8rem) / 2) - 2.5rem); {# 50vw - container max width / 2 - spacing #}
    }

    button.modal-next {
      display: none;
      right:  calc(50vw - ((100vw - 8rem) / 2) - 2.5rem);
    }
}

@media screen and (max-width: 768px) {
  .modal-content {
    max-width: calc(100vw - 1.5rem);
    padding: 3.33rem 1.5rem 3rem;
    width: 100%;
  }

  header.modal-header, .modal-header, .modal-rte {
    max-width: 100%;
  }
  button.modal-close {
    padding: 1.33rem 1.25rem 1.5rem;
}
}

@keyframes mmfadeIn {
    from { opacity: 0; }
      to { opacity: 1; }
}

@keyframes mmfadeOut {
    from { opacity: 1; }
      to { opacity: 0; }
}

@keyframes mmslideIn {
  from { opacity: 0; transform: translateY(-10%) scale(.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mmslideOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(10%) scale(.95); }
}
{#

.modal[aria-hidden="false"] .modal-overlay {
  /* animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); */
}
.modal[aria-hidden="true"] .modal-overlay {
  /* animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); */
}
.modal[aria-hidden="false"] .modal-content {
  animation: mmslideIn .33s cubic-bezier(0, 0, .2, 1);
}

.modal[aria-hidden="true"] .modal-content {
  animation: mmslideOut .33s cubic-bezier(0, 0, .2, 1);
}

.modal .modal-content,
.modal .modal-overlay {
  will-change: transform;
}
#}
