.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.modal.is-open {
  opacity: 1;
  pointer-events: all;
  margin-right: 15px;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.modal__content {
  position: relative;
  background: #fff;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.is-open .modal__content {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 30px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal__close:hover {
  /* background: #f5f5f5; */
}

.modal__content--large { max-width: 800px; }
.modal__content--small { max-width: 400px; }
.modal__content--fullscreen {
  max-width: 95%;
  max-height: 95%;
  width: 95%;
  height: 95%;
}

body.modal-open, body.modal-open>.header-wrap{
  overflow: hidden;
  margin-right: 15px;
}

button.modal-open {
    display: flex;
    align-items: center;
}

button.modal-open svg{
    margin-right: 15px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
@media screen and (max-width:500px) {
    button.modal-open span{
        display: none;
    }
    button.modal-open svg{
        margin-right: 0px;
    }
}

@media (hover: none) and (pointer: coarse) {
  body.modal-open, body.modal-open>.header-wrap,.modal.is-open {
    margin-right: 0;
  }
}
