/* Estää body-scrollin kun modal on auki */
body.modal-open {
  overflow: hidden;
}

/* Mahdollistaa modalin sisäisen skrollauksen */
.modal-block .modal-content {
  max-height: 85vh; /* Rajoita korkeus, jotta se voi skrollata */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}



.modal-block.aligncenter {
  display: flex;
  justify-content: center;
}

.modal-block.alignleft {
  display: flex;
  justify-content: flex-start;
}

.modal-block.alignright {
  display: flex;
  justify-content: flex-end;
}

.modal-block .modal-trigger {
  /*
  background-color: #008CBA;
  color: white;
  padding: 10px 20px;
  border: none;
  */
  cursor: pointer;
}

.modal-block .modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.modal-block .modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  color: #000;
  padding: 40px 30px;
  width: 70%;
  border-radius: 0.5em;
  margin-bottom: 2em;
  margin-top: 1em;
}

@media (max-width: 850px) {
  .modal-block .modal-content {
    width: 80%;
  }
}
@media (max-width: 525px) {
  .modal-block .modal-content {
    width: 95%;
  }
}

.modal-block .modal-close {
  position: absolute;
  /* top: 0; */
  top: -0.5em;
  right: 0;
  padding: 10px;
  cursor: pointer;
  font-size: 40px;
}
