.details-wrapper {
  --details-block-height: 42rem;
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  width: 100%;
  min-height: var(--details-block-height);

  .header-wrap,
  .details-wrap {
    min-height: var(--details-block-height);
  }

  .header-wrap {
    flex: 0 0 40%;
    position: relative;
    background-color: var(--new-pink);
    color: var(--new-skyblue-1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;

    .bubbly-frame {
      position: absolute;
      top: -1px;
      right: 0;
      left: 0;
      width: 100%;
      height: 600px;
      background-color: var(--new-yellow);
      -webkit-mask: url("/assets/svgs/top-bubbly-frame.svg") top center / 101%
        auto no-repeat;
      mask: url("/assets/svgs/top-bubbly-frame.svg") top center / 101% auto
        no-repeat;
    }
  }

  .details-wrap {
    flex: 0 0 60%;
    background-color: var(--new-yellow-1);
    margin: 0;
    width: auto;
    color: var(--new-orange-2);
    display: flex;
    align-items: center;
    text-align: left;
    justify-content: center;
    flex-direction: column;
    padding: 2rem 3rem;

    .detail:first-of-type {
      padding: 0 0 2rem;
      border-bottom: 1px solid var(--new-orange-2);
    }

    .detail {
      width: 100%;
      padding: 2rem 0;
      border-bottom: 1px solid var(--new-orange-2);

      p:not(:first-of-type) {
        margin-top: 0.6rem;
      }
    }

    .detail:last-of-type {
      padding: 2rem 0 0;
      border: none;
    }

    p {
      font-size: 1.5rem;
      width: 100%;
      margin: 0;
      text-align: justify;
    }

    .details-more-info {
      padding: 0;
      border: 0;
      background: none;
      color: inherit;
      font: inherit;
      cursor: pointer;
      font-size: 1.5rem;
      margin-top: 1rem;
      width: 100%;
      text-align: center;
    }

    .details-more-info:hover {
      text-decoration: underline;
    }

    h3 {
      margin-bottom: 0.8rem;
    }
  }
}

.details-modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 2rem;

  &[hidden] {
    display: none;
  }

  .details-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(58, 52, 46, 0.45);
    backdrop-filter: blur(6px);
  }

  .details-modal-content {
    position: relative;
    z-index: 1;
    width: min(700px, 100%);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    padding: 4rem 3rem;
    background: var(--new-yellow-1);
    color: var(--new-orange-2);
    text-align: left;

    p {
      font-size: 1.4rem;
      margin: 1rem 0;
      text-align: justify;
    }

    p.separator-up {
      margin-top: 1.5rem;
      padding-top: 1rem;
      border-top: 1px solid var(--new-orange-2);
    }

    ul {
      margin: 0;
      padding: 0;
      list-style: none;
      /* padding-bottom: 1rem; */
      /* border-bottom: 1px solid var(--new-orange-2); */
    }

    ul.links {
      margin: 0;
      padding: 0;
      list-style: none;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-around;
    }

    a {
      width: 33%;
      font-size: 1.4rem;
      color: var(--new-orange-2);
    }

    li {
      font-size: 1.2rem;
      display: block;
      line-height: 2.2rem;
    }
  }

  .details-modal-close,
  .details-modal-bottom-close {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  .details-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    font: 2rem/1 sans-serif;
  }

  .details-modal-bottom-close {
    display: none;
  }
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .details-wrapper {
    flex-direction: column;
    min-height: auto;

    .header-wrap,
    .details-wrap {
      width: 100%;
      flex-basis: auto;
      min-height: auto;
    }

    .header-wrap {
      order: 1;
      padding: 6rem 1rem;
      h2 {
        margin: 0;
      }

      .bubbly-frame {
        top: -6%;
      }
    }

    .details-wrap {
      order: 2;
      padding: 5rem 2rem;

      p {
        font-size: 1.2rem;
      }

      .details-more-info {
        font-size: 1.2rem;
        text-decoration: underline;
      }
    }
  }

  .details-modal {
    padding: 0;

    .details-modal-content {
      width: 100%;
      max-height: 100%;
      height: 100%;
      padding: 5rem 2rem 6rem;
      p {
        font-size: 1.2rem;
      }
    }

    .details-modal-bottom-close {
      position: fixed;
      left: 0;
      bottom: 0px;
      width: 100vw;
      padding: 1.6rem 0;
      background: var(--new-orange-2);
      color: var(--new-yellow-1);
      display: inline-block;
      font: inherit;
    }
  }
}
