.modal.billie-modal {

  :where(ul, ol) {
    list-style: revert;
  }

  :where(li) {
    display: list-item;
    list-style: inherit;
  }

  .modal-header,
  .modal-footer {
    position: sticky;
    background-color: $white;
    z-index: 10;
    box-shadow: none;
    border-bottom: 0;
    transition: box-shadow .3s ease;
    padding: 0;
  }

  .modal-dialog {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .modal-content {
    width: 100%;
  }

  .modal-box__content {
    display: flex;
    flex-direction: column;
    max-height: 100vh;
  }

  .modal-box__header::after {
    border: 0;
  }

  .modal-header {
    top: 0;
    border-bottom: 1px solid $gray-200;
    margin-right: -15px;
  }

  .billie-modal__heading {
    margin-bottom: 8px;
  }

  .modal-box__footer-row {
    width: 100%;
  }

  ul.billie-modal__list,
  ol.billie-modal__list {
    padding-left: 20px;
  }

  .modal-footer {
    justify-content: center;
    bottom: 0;
    border-top: 0;

    .modal-box__inner-columns {
      margin: 0;
    }
  }

  .modal-box__container {
    padding: 0;
  }

  .modal-box__inner-columns {
    padding: 16px;
    margin: 0 16px;
  }

  .modal-box__header .close  {
    right: 23px;
    top: 8px;
  }

  .modal-box__inner-columns .btn {
    width: 100%;
  }

  .modal-body {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;

    .modal-box__inner-columns {
      padding: 16px 16px 24px;
    }
  }

  .modal-content {
    &[data-scroll-state='middle'],
    &[data-scroll-state='bottom'] {
      .modal-header {
        box-shadow: 0 0 15px rgba(0, 0, 0, .2);
        border-bottom: 0;
      }
    }

    &[data-scroll-state='middle'],
    &[data-scroll-state='top'] {
      .modal-footer {
        box-shadow: 0 -2px 4px rgba(0, 0, 0, .05);
      }
    }
  }
}

@include media-breakpoint-up(sm) {
  .modal.billie-modal {
    .modal-content {
      width: 476px;
      height: 628px;
    }

    .modal-dialog {
      margin: 0 auto;
      justify-content: center;
      max-width: 100%;
      height: auto;
    }

    .modal-box__header .close  {
      right: 8px;
      top: 8px;
    }

    .modal-body {
      margin-right: 0;

      .modal-box__inner-columns {
        margin: 0;
      }
    }

    .modal-header {
      margin-right: 0;

      .modal-box__inner-columns {
        margin: 0;
      }
    }

    .modal-footer {
      margin-right: 0;
    }

    .modal-box__container {
      margin: 0 auto;
    }
  }

  .modal.billie-modal.modal-box_full {
    background: transparent;
  }
}

@include media-breakpoint-up(md) {
  .modal.billie-modal {
    .modal-content {
      height: auto;
    }

    .modal-dialog {
      justify-content: center;
    }

    .modal-box__inner-row {
      margin: 0;
    }

    .modal-box__columns,
    .modal-box__inner-columns {
      flex: 0 0 100%;
      max-width: 100%;
    }

    .modal-box__inner-columns .btn {
      width: auto;
    }
  }
}
