.first-order-discount {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.first-order-discount.is-visible {
  visibility: visible;
  opacity: 1;
}

.first-order-discount__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 20, 0.72);
  backdrop-filter: blur(2px);
}

.first-order-discount__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(320px, 1.15fr);
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.3s ease;
}

.first-order-discount.is-visible .first-order-discount__dialog {
  transform: translateY(0) scale(1);
}

.first-order-discount__close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.first-order-discount__close span {
  position: absolute;
  top: 16px;
  left: 9px;
  width: 16px;
  height: 2px;
  background: #333;
  transform: rotate(45deg);
}

.first-order-discount__close span:last-child {
  transform: rotate(-45deg);
}

.first-order-discount__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  padding: 48px 28px;
  overflow: hidden;
  background: linear-gradient(145deg, #effcf1 0%, #ccefd4 100%);
}

.first-order-discount__visual::before,
.first-order-discount__visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.first-order-discount__visual::before {
  width: 180px;
  height: 180px;
  top: -70px;
  left: -70px;
}

.first-order-discount__visual::after {
  width: 110px;
  height: 110px;
  right: -35px;
  bottom: -30px;
}

.first-order-discount__visual svg {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 270px;
  filter: drop-shadow(0 20px 18px rgba(16, 117, 43, 0.2));
}

.first-order-discount__badge {
  position: absolute;
  top: 55px;
  right: 32px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: #fff;
  background: #ff8f18;
  box-shadow: 0 10px 24px rgba(212, 101, 0, 0.28);
  font-size: 24px;
  font-weight: 700;
}

.first-order-discount__content {
  padding: 54px 46px 44px;
}

.first-order-discount__content h2 {
  margin: 0 0 16px;
  color: #222;
  font-size: 31px;
  line-height: 1.15;
}

.first-order-discount__content h2 span {
  color: #15a536;
}

.first-order-discount__content > p {
  margin: 0 0 24px;
  color: #666;
  font-size: 15px;
  line-height: 1.55;
}

.first-order-discount__form {
  display: grid;
  gap: 14px;
}

.first-order-discount__field,
.first-order-discount__field label,
.first-order-discount__consent label {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.first-order-discount__field {
  min-width: 0;
}

.first-order-discount__input-wrap {
  position: relative;
}

.first-order-discount__label {
  display: block;
  margin-bottom: 6px;
  color: #333;
  font-size: 13px;
  font-weight: 600;
}

.first-order-discount__input {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #dfe4e1;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.first-order-discount__input:focus {
  border-color: #15a536;
  outline: none;
  box-shadow: 0 0 0 3px rgba(21, 165, 54, 0.12);
}

.first-order-discount__input.is-invalid {
  border-color: #e05252;
}

.first-order-discount__field-error {
  display: none;
  margin-top: 5px;
  color: #c93636;
  font-size: 12px;
  line-height: 1.3;
}

.first-order-discount__field-error.is-visible {
  display: block;
}

.first-order-discount__form label.error {
  display: none !important;
}

.first-order-discount__input-wrap .select-country {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 45px;
  height: 48px;
  margin: 0;
}

.first-order-discount__input-wrap .select-country__head {
  top: 0 !important;
  height: 48px !important;
  padding-top: 15px !important;
}

.first-order-discount__input-wrap .select-country__list {
  top: 48px;
}

.first-order-discount__consent {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: flex-start;
  gap: 9px;
  color: #777;
  font-size: 11px;
  line-height: 1.45;
}

.first-order-discount__consent input {
  margin: 3px 0 0;
}

.first-order-discount__consent .first-order-discount__field-error {
  grid-column: 2;
  margin-top: -4px;
}

.first-order-discount__consent a {
  color: #15a536;
}

.first-order-discount__submit {
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #15a536;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.first-order-discount__submit:hover {
  background: #11872c;
}

.first-order-discount__submit:active {
  transform: translateY(1px);
}

.first-order-discount__submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.first-order-discount__message {
  display: none;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.first-order-discount__message.is-success,
.first-order-discount__message.is-error {
  display: block;
}

.first-order-discount__message.is-success {
  color: #126b28;
  background: #e8f7eb;
}

.first-order-discount__message.is-error {
  color: #a32626;
  background: #fdecec;
}

body.first-order-discount-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .first-order-discount {
    padding: 12px;
  }

  .first-order-discount__dialog {
    display: block;
    max-height: calc(100vh - 24px);
  }

  .first-order-discount__visual {
    min-height: 150px;
    padding: 18px;
  }

  .first-order-discount__visual svg {
    width: 165px;
  }

  .first-order-discount__badge {
    top: 18px;
    right: calc(50% - 112px);
    width: 58px;
    height: 58px;
    font-size: 19px;
  }

  .first-order-discount__content {
    padding: 28px 24px 26px;
  }

  .first-order-discount__content h2 {
    font-size: 26px;
  }
}
