/* когда модалка открыта — блокируем скролл страницы */
body.modal-open {
  overflow: hidden;
}

.modal-blocker {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* показываем контейнер */
.modal-blocker.show {
  opacity: 1;
  pointer-events: auto;
}

/* затемнённый фон */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal {
  display: none;
}

.modal.is-open {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  max-width: 500px;
  width: 389px;
  padding: 0px;
  border-radius: var(--main_radius);
  box-shadow: 0px 0px 0px;
  color: #000;
  box-sizing: border-box;
  background: #fff;
  text-align: left;
}

.modal .modal_head{
  padding: 20px 20px 0 20px;
}
.modal .modal_content{
  padding: 0px 20px 20px 20px;
  overflow: hidden;
}

.modal {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.modal.show {
  opacity: 1;
  transform: scale(1);
}

.modal-blocker.no-anim,
.modal.modal-animated.no-anim {
  transition: none !important;
}

@media (max-width: 1000px){
  .modal-blocker{
    align-items: end;
  }
  .modal{
    transform: inherit!important;
    top: 100dvh;
    transition: opacity 0.35s ease, top 0.35s ease;
  }
  .modal.is-open{
    max-height: calc(-56px + 100dvh);
    height: 100%;
    max-width: none!important;
    width: 100%!important;
    border-bottom-left-radius: 0!important;
    border-bottom-right-radius: 0!important;
  }

  .modal.show{
    top: 0;
  }

  .modal .modal_content{
    max-height: none!important;
    height: 100%;
    flex: 1;
  }
}