.c-modal-open-button {
  cursor: pointer;
}

.c-modal-contents {
  margin: auto;
  overflow: visible;
  background-color: transparent;
  border: none;
  padding: 0;
  width: min(1000px, 100%);
  transition: 0.2s opacity;

  @media screen and (max-width: 800px) {
    max-width: initial;
  }

  &[open] {
    opacity: 1;

    @starting-style {
      opacity: 0;
    }
  }

  &::backdrop {
    background: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    overscroll-behavior-y: none;

    @media screen and (max-width: 800px) {
      background: rgba(0, 0, 0, 0.9);
    }
  }
}

.c-modal-contents__inner {
  width: 100%;
  aspect-ratio: 16 / 9;

  iframe {
    width: 100%;
    height: 100%;
    vertical-align: bottom;
  }
}

.c-modal-close-button {
  --close-button-circle-size: 60px;
  --close-button-line-size: 30px;

  cursor: pointer;
  position: absolute;
  bottom: -75px;
  right: 0;
  z-index: 1;
  width: var(--close-button-circle-size);
  aspect-ratio: 1/1;
  background: transparent;
  border: 2px solid #fff;

  @media screen and (max-width: 800px) {
    position: fixed;
    bottom: 0;
    right: 0;
  }

  &::before,
  &::after {
    content: '';
    display: inherit;
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--close-button-line-size);
    height: 2px;
    background-color: #fff;
    transition: inherit;
  }

  &::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  &::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}
