/* MODAL CALCULATION */

.calc_block.modals {
  filter: drop-shadow(0 0 30px #00000030);
  display: none;
  padding: 30px;
  flex-basis: 100%;
  position: fixed;
  top: 0;
  bottom: 0;
  left: -10px;
  right: 80%;
  margin: 0;
  animation: slide-left .3s alternate cubic-bezier(0.215, 0.610, 0.355, 1);
  background: white;
  z-index: 999999;
  font-family: 'Roboto';
}

@media (max-width:1024px) {
  .calc_block.modals {
    right: 20px;
    left: 20px;
    top: 20px;
    bottom: auto;
    animation: slide-top .3s alternate cubic-bezier(0.215, 0.610, 0.355, 1);
  }
}

.modal-title {
  margin-bottom: 20px;
  align-items: flex-start;
}

.modal-title h3 {
  font-weight: 900;
  font-size: 28px;
}

.calc_block.modals .close {
  text-decoration: none;
  color: #000000;
  padding: 5px 10px;
  background: var(--border);
  border-radius: 5px;
  z-index: 9999;
  position: relative;
  margin: 0 0 0 auto;
  display: table;
}

.calc_block.modals>h4 {
  text-decoration: none;
  color: black;
  border-radius: 5px;
  display: table;
  font-size: 24px;
  font-weight: 400;
}

.calc_block.modals>h4 #total {
  font-weight: 600;
}

.calc_block.modals .close:hover {
  background: var(--border-dark)
}

#total-modal.show {
  display: block;
}

/* NEW MODAL */
@keyframes modal {
  from {
    opacity: 0;
    margin-top: -5px;
  }

  to {
    opacity: 1;
    margin-top: 0;
  }

}

.overlay {
  z-index: 999;
  position: fixed;
  /* display: block; */
  display: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.modal {
  --modal-max-width: clamp(250px, 100%, 900px);
  --modal-max-height: clamp(250px, 100%, 500px);
  --modal-margin: 20px;
  display: none;
  align-items: center;
  position: fixed;
  background: rgb(255, 255, 255);
  box-shadow: 0 0 25px rgb(73, 73, 73);
  border-radius: 20px;
  padding: 30px;
  box-sizing: border-box;
  font-family: 'Arial';
  width: 100%;
  height: 100%;
  max-height: var(--modal-max-height);
  max-width: var(--modal-max-width);
  left: calc(50% - (var(--modal-max-width) / 2));
  top: calc(50% - (var(--modal-max-height) / 2));
  z-index: 1000;
  animation: modal ease .3s both;
  overflow: hidden;
}

.modal img {
  width: 100%;
  max-width: 300px;
  max-height: 100px;
  object-fit: contain;
  margin: auto;
  display: table;
}

@media (max-width:500px) {
  .modal {
    --modal-max-width: clamp(100px, 100%, 900px);
    --modal-max-height: clamp(350px, 100%, 620px);
    --modal-margin: 20px;
  }
}


.modal.active,
.overlay.active {
  display: block !important;
}

.modal-form,
.modal-form form {
  margin-top: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.modal-form input {
  padding: 15px;
  border: none;
  background: var(--border);
  border-radius: 5px;
  margin: 5px 0;
  font-size: 16px;
  font-weight: 500;
}

.js-modal-close {
  position: absolute;
  right: 30px;
  top:30px;
  font-size: 32px;
  font-weight: 600;
  cursor: pointer;
}
@media (max-width:500px) {
  .js-modal-close {
    right:10px;
    top:10px;
  }
}

.js-modal-close:hover {
  opacity: 0.5;
}

.js-modal-title {
  font-size: 24px;
  font-weight: 600;
  text-wrap: balance;
}

.modal-text {
  overflow-y: auto;
  height: calc(100% - 40px);
  display: block;
  /* white-space: pre-line; */
  margin: 10px 0;
}

.modal-text::-webkit-scrollbar {
  appearance: none;
  width: 5px;
  background: white;
  border-radius: 100px;
}

.modal-text::-webkit-scrollbar-thumb {
  background: rgb(0, 0, 0);
  padding: 10px;
  border-radius: 100px;
}

.modal-text::-webkit-scrollbar-track {
  background: rgb(255, 255, 255);
  padding: 10px;
}

.modal-text li {
  display: flex;
  margin: 10px 0;
  line-height: 100%;
}

.modal-text li:before {
  content: '●';
  font-size: 14px;
  margin-right: 10px;
  line-height: 90%;
}

.modal-text b {
  display: inline-block;
  margin: 10px 0;
}