.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100%;
  height: 100%;
  display: none;
}

.modal.show {
  display: block;
}

.modal.show-out {
  animation: fadeOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.85);
  animation: fadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.modal-overlay.out {
  animation: fadeOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.modal-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9375rem;
  overflow: auto;
  text-align: center;
}

.modal-inner:before {
  content: '';
  width: 0;
  height: 100%;
  display: inline-block;
  font-size: 0;
  vertical-align: middle;
}

.modal-container {
  position: relative;
  padding: 1.875rem 1.875rem 2.1875rem;
  width: 100%;
  max-width: 40.625rem;
  display: inline-block;
  font-size: 0.8125rem;
  text-align: left;
  vertical-align: middle;
  background: #f1f1f1;
  border-radius: 0.375rem;
}

.modal-container_white {
  background: #ffffff;
}

.modal-container_ex-large {
  max-width: 81.25rem;
}

.modal-container_ex-small {
  max-width: 23.75rem;
}

.modal-container_medium {
  max-width: 34.875rem;
}

.modal-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
  line-height: 1.2;
  color: #1c1c1c;
}

.modal-title {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  text-align: center;
  color: #1c1c1c;
}

.modal-text {
  font-size: 0.875rem;
  line-height: 1.125rem;
  text-align: center;
  color: #a1a1a1;
}

.modal-body p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #1c1c1c;
}

.modal-footer {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.125rem;
  flex-direction: column;
}

.modal .icon-cancel {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  background: url("/local/templates/main/assets/img/icon/cancel.svg") center/contain no-repeat;
  transition: opacity .2s ease-in-out;
}

.modal .icon-cancel:hover {
  opacity: .8;
}

@keyframes fadeIn {
  0% {
    background: rgba(0, 0, 0, 0);
  }
  100% {
    background: rgba(0, 0, 0, 0.85);
  }
}
@keyframes fadeOut {
  0% {
    background: rgba(0, 0, 0, 0.85);
  }
  100% {
    background: rgba(0, 0, 0, 0);
  }
}
.modal-order-auth .modal-container {
  background: #fff;
  max-width: 43.75rem;
  border-radius: 0.75rem;
  padding: 5rem 1.25rem;
}
.modal-order-auth .modal-header, .modal-order-auth .modal-body, .modal-order-auth .modal-footer {
  margin: 0 auto;
  max-width: 32.1875rem;
}
.modal-order-auth .modal-header {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.modal-order-auth .modal-body {
  font-size: 0.875rem;
  text-align: center;
}
.modal-order-auth .modal-footer {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
}
.modal-order-auth .modal-footer > * {
  font-size: 0.875rem;
}
@media (max-width: 767px) {
  .modal-order-auth .modal-header {
    font-size: 27px;
  }
  .modal-order-auth .modal-footer {
    flex-direction: column;
  }
  .modal-order-auth .modal-footer > * {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .modal-inner:before {
    height: auto;
  }
}
@media (max-width: 600px) {
  .modal-inner {
    padding: 10px;
  }

  .modal-container {
    padding: 24px 16px;
  }

  .modal-header .icon {
    width: 28px;
    height: 28px;
  }
}
