.site-order-popup[hidden] {
  display: none;
}

.site-order-popup {
  position: fixed;
  inset: 0;
  z-index: 999;
}

.site-order-popup__overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  background: rgba(18, 18, 18, 0.84);
}

.site-order-popup__dialog {
  position: relative;
  width: min(100%, 560px);
  min-height: 0;
  max-height: min(80vh, 640px);
  padding: 36px 32px 32px;
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #4b4b4b 0%, #434343 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  color: #fff;
}

.site-order-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.site-order-popup__close svg {
  width: 15px;
  height: 15px;
}

.site-order-popup__title {
  margin: 0 44px 8px 0;
}

.site-order-popup__subtitle {
  max-width: 32ch;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
}

.site-order-popup__status {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.site-order-popup__status.is-success {
  background: rgba(33, 108, 56, 0.88);
}

.site-order-popup__status.is-error {
  background: rgba(134, 45, 45, 0.9);
}

.site-order-popup__form {
  display: grid;
  gap: 14px;
}

.site-order-popup__field {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  min-height: 56px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #565656;
}

.site-order-popup__field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font: inherit;
}

.site-order-popup__field input::placeholder {
  color: #aaabc2;
  opacity: 1;
}

.site-order-popup__field.is-invalid {
  box-shadow: inset 0 0 0 1px rgba(255, 110, 110, 0.95);
}

.site-order-popup__field-error {
  display: block;
  width: 100%;
  margin-top: 8px;
  color: #ff9b9b;
  font-size: 12px;
  line-height: 1.4;
}

.site-order-popup__consent {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding-top: 0;
  padding-bottom: 0;
  color: #aaabc2;
  font-size: 14px;
  line-height: 1.5;
}

.site-order-popup__consent input {
  flex: 0 0 auto;
  align-self: flex-start;
  width: 16px;
  height: 16px;
  margin: 10px 0 0;
  accent-color: #4d7ef7;
}

.site-order-popup__consent span {
  display: block;
  flex: 1 1 auto;
}

.site-order-popup__consent a {
  color: #fff;
  text-decoration: underline;
}

.site-order-popup__submit {
  width: 100%;
  min-height: 56px;
}

@media (max-width: 640px) {
  .site-order-popup__dialog {
    max-height: calc(100vh - 32px);
    padding: 24px 20px 20px;
    border-radius: 16px;
  }

  .site-order-popup__close {
    top: 12px;
    right: 12px;
  }

  .site-order-popup__title {
    margin-right: 40px;
  }

  .site-order-popup__subtitle {
    max-width: none;
  }
}
