.modal {
  display: none;
  -webkit-border-radius: 20px;
  border-radius: 20px;
  width: 100%;
  max-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
}

.modal.small {
  padding-top: calc(50vh - 200px);
  padding-left: calc(50% - 250px);
  padding-right: calc(50% - 250px);
}

.modal.medium {
  padding-top: calc(50vh - 300px);
  padding-left: calc(50% - 400px);
  padding-right: calc(50% - 400px);
}

.modal-content {
  overflow: hidden !important;
  position: relative;
  -webkit-border-radius: 20px;
  border-radius: 20px;
  font-size: 1.4rem;
  line-height: 2.1rem;
  color: var(--font-dark-gray);
  background-color: initial;
}

.modal-content > div:not(.close-modal) {
  display: inline-block;
  margin-top: 40px;
  background-color: white;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 20px 20px 20px;
  height: calc(100% - 60px);
  width: calc(100% - 40px);
}

.small>.modal-content {
  width: 500px;
  height: 400px;
  margin-bottom: 100px;
}

.medium>.modal-content {
  width: 800px;
  height: 600px;
  margin-bottom: 100px;
}

.close-modal {
  -webkit-border-top-left-radius: 20px;
  -webkit-border-top-right-radius: 20px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  position: absolute;
  top: 0;
  right: 0;
  display: inline-block;
  z-index: 1010;
  background-color: #8b2331 !important;
  background: url('/themes/custom/macewan_library/images/icons/Icon_X.svg') no-repeat;
  background-size: 26px;
  background-position: right 14px center;
  width: 100%;
  height: 40px;
  max-height: 40px;
  min-height: 40px;
  font-size: 26px;
  font-weight: bold;
  text-align: center;
  line-height: 34px;
  cursor: pointer;
  color: #8b2331;
}

.modal-content #cancellation-buttons button {
  background-color: var(--button-red);
  color: white;
  border: 1px solid var(--button-red);
  padding: 10px 30px;
  margin-top: 10px;
  cursor: pointer;
}

.modal-content #cancellation-buttons button:hover {
  background-color: white;
  color: var(--button-red);
}

.modal-content li {
  padding-bottom: 10px !important;
}

.modal-content p, .modal-content li {
  line-height: 1.9rem !important;
}

@media screen and (max-width: 768px) {
  .modal.small {
    padding-top: calc(50vh - 110px);
    padding-left: calc(50% - 160px);
    padding-right: calc(50% - 160px);
  }

  .modal.medium {
    padding: 20px;
  }

  .small > .modal-content {
    height: 220px;
    width: 320px;
    padding: 30px;
    position: relative;
    font-size: 1rem;
    line-height: 1.4rem;
  }

  .medium > .modal-content {
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    padding: 0;
  }
}

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

  .modal.small, .modal.medium {
    padding: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
  }

  .modal-content {
    background-color: white;
  }

  .small > .modal-content, .medium > .modal-content {
    height: calc(100% - 40px);
    width: calc(100% - 40px);
    padding: 20px;
    position: relative;
    font-size: 1rem;
    line-height: 1.4rem;
    margin-left: auto;
    margin-right: auto;
  }
}
