.modal {
  position: fixed;
  z-index: 9999999999;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100vw;
  max-height: 100vh;
  background: rgba(0, 0, 0, 0.8);
}

@media screen and (max-width: 768px) {

.modal {
    padding: 0 16px;
}
  }

[data-modal] {
  cursor: pointer;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid black;
  border-radius: var(--default-border-radius);
  background-color: var(--clr-neutral-100);
  outline: none;
}

.modal-content picture,
  .modal-content figure {
    display: flex;
    margin: 0;
  }

.modal-content .Picture img {
    -o-object-fit: initial;
       object-fit: initial;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 85vh;
    aspect-ratio: auto;
  }

.modal-close {
  position: fixed;
  z-index: 1;
  align-self: flex-end;
  padding: 10px;
  cursor: pointer;
}

.modal-close:hover svg path {
      fill: var(--clr-primary-01);
    }

@media screen and (max-width: 768px) {

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #ffffff;
}
  }

.modal-close svg {
    display: block;
    width: 24px;
    height: 24px;
  }

.modal-close svg path {
      fill: var(--clr-primary-02);
      transition: fill 250ms ease-in-out;
    }

.chevron {
  position: fixed;
  z-index: 1;
  padding: 0.65rem 0.75rem 0.85rem;
  font-size: 3rem;
  line-height: calc(100% - 0.25rem);
  text-align: center;
  background-color: #ffffff;
  cursor: pointer;
}

.chevron--left {
  left: 0;
}

.chevron--right {
  right: 0;
}

.modal.card .modal-close {
    margin: -6px -6px 0 0;
  }

@media screen and (min-width: 769px) {

.modal.card .modal-close {
      margin: -22px -22px 0 0;
  }
    }

.modal.card .modal-content {
    position: relative;
    overflow-y: auto;
    max-width: 1080px;
    max-height: 80vh;
    padding: 16px;
    border-radius: var(--default-border-radius);
  }

@media screen and (min-width: 769px) {

.modal.card .modal-content {
      padding: 32px;
  }
    }
