.atp-coupon-overlay,
.atp-coupon-overlay * {
  box-sizing: border-box;
}

.atp-coupon-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.atp-coupon-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.atp-coupon-dialog {
  position: relative;
  width: min(100%, 624px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 42px 46px 43px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28), 0 5px 0 #ff9d00;
  transform: translateY(22px) scale(0.98);
  transition: transform 0.25s ease;
  font-family: Arial, Helvetica, sans-serif;
  scrollbar-width: thin;
}

.atp-coupon-overlay.is-open .atp-coupon-dialog {
  transform: translateY(0) scale(1);
}

.atp-coupon-close {
  position: absolute;
  top: 30px;
  right: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #858585;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  text-decoration: none !important;
  transition: color 0.2s ease, transform 0.2s ease;
}

.atp-coupon-close:hover,
.atp-coupon-close:focus {
  color: #111111;
  transform: rotate(90deg);
  outline: none;
}

.atp-coupon-heading-wrap {
  padding-left: 20px;
  padding-right: 44px;
  border-left: 7px solid #ff9d00;
}

.atp-coupon-heading-wrap h2 {
  margin: 0;
  color: #000000;
  font-size: clamp(28px, 4vw, 35px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.7px;
  text-transform: uppercase;
}

.atp-coupon-subheading {
  margin: 12px 0 14px;
  color: #111111;
  font-size: 20px;
  line-height: 1.45;
}

.atp-coupon-form {
  margin: 0;
}

.atp-coupon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}

.atp-field {
  position: relative;
}

.atp-field input,
.atp-field select,
.atp-field textarea {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #ffffff;
  color: #151515;
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.atp-field input,
.atp-field select {
  height: 57px;
  padding: 0 15px;
}

.atp-field textarea {
  min-height: 150px;
  padding: 13px 15px;
  resize: vertical;
}

.atp-field input::placeholder,
.atp-field textarea::placeholder {
  color: #6b6b6b;
  opacity: 1;
}

.atp-field input:focus,
.atp-field select:focus,
.atp-field textarea:focus {
  border-color: #ff9d00;
  box-shadow: 0 0 0 3px rgba(255, 157, 0, 0.14);
}

.atp-field.has-error input,
.atp-field.has-error select {
  border-color: #c62828;
}

.atp-full-field {
  margin-top: 12px;
}

.atp-phone-field {
  display: flex;
  align-items: center;
  height: 57px;
  overflow: hidden;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.atp-phone-field:focus-within {
  border-color: #ff9d00;
  box-shadow: 0 0 0 3px rgba(255, 157, 0, 0.14);
}

.atp-phone-field.has-error {
  border-color: #c62828;
}

.atp-phone-prefix {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 11px 0 13px;
  border-right: 1px solid #e1e1e1;
  color: #333333;
  font-size: 17px;
  white-space: nowrap;
}

.atp-us-flag {
  font-size: 19px;
  line-height: 1;
}

.atp-phone-field input {
  min-width: 0;
  height: 55px;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
}

.atp-submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 84px;
  margin-top: 12px;
  padding: 15px 25px;
  border: 0;
  border-radius: 999px;
  background: #000000;
  color: #ffffff !important;
  font-family: inherit;
  font-size: clamp(23px, 4vw, 29px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.atp-submit-button:hover,
.atp-submit-button:focus,
.atp-submit-button:active {
  background: #202020;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-2px);
  outline: none;
}

.atp-submit-button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.atp-form-message {
  display: none;
  margin: 12px 2px 0;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 15px;
  line-height: 1.4;
}

.atp-form-message.is-visible {
  display: block;
}

.atp-form-message.is-error {
  background: #fff0f0;
  color: #a50000;
}

.atp-form-message.is-success {
  background: #edf9ef;
  color: #146c2e;
}

.atp-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.atp-popup-open {
  overflow: hidden;
}

@media (max-width: 680px) {
  .atp-coupon-overlay {
    align-items: flex-start;
    padding: 10px;
    overflow-y: auto;
  }

  .atp-coupon-dialog {
    width: 100%;
    max-height: none;
    margin: 8px 0;
    padding: 34px 22px 28px;
    border-radius: 22px;
  }

  .atp-coupon-close {
    top: 19px;
    right: 20px;
    font-size: 34px;
  }

  .atp-coupon-heading-wrap {
    padding-left: 14px;
    padding-right: 35px;
    border-left-width: 6px;
  }

  .atp-coupon-heading-wrap h2 {
    font-size: 27px;
    line-height: 1.26;
  }

  .atp-coupon-subheading {
    font-size: 17px;
  }

  .atp-coupon-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .atp-full-field {
    margin-top: 10px;
  }

  .atp-field input,
  .atp-field select {
    height: 54px;
    font-size: 16px;
  }

  .atp-phone-field {
    height: 54px;
  }

  .atp-phone-field input {
    height: 52px;
  }

  .atp-field textarea {
    min-height: 120px;
    font-size: 16px;
  }

  .atp-submit-button {
    min-height: 66px;
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atp-coupon-overlay,
  .atp-coupon-dialog,
  .atp-coupon-close,
  .atp-submit-button {
    transition: none;
  }
}
