.exit-offer,
.exit-offer * {
  box-sizing: border-box;
}

.exit-offer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  margin: 0;
  padding: 0;
  color: var(--eo-text, #fff);
  font-family: inherit;
  line-height: 1.4;
}

.exit-offer.is-open { display: block; }

/* Важное правило: стили шаблона не должны раскрывать блок успешной отправки. */
.exit-offer [hidden],
.exit-offer__state[hidden],
.exit-offer__state--success[hidden] {
  display: none !important;
}

.exit-offer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--eo-overlay, .72));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: eoFade .18s ease-out;
}

.exit-offer__dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1180px, calc(100vw - 48px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--eo-radius, 26px);
  outline: 0;
  background: var(--eo-modal, #4a4a4a);
  color: var(--eo-text, #fff);
  box-shadow: 0 28px 90px rgba(0,0,0,.42);
  animation: eoUp .22s ease-out;
}

/* Без картинки справа popup должен быть компактным, а не занимать 1180px. */
.exit-offer__dialog--single {
  width: min(700px, calc(100vw - 48px));
}

.exit-offer__content {
  position: relative;
  width: 100%;
}

.exit-offer__content--with-visual {
  display: grid;
  grid-template-columns: minmax(420px, .95fr) minmax(360px, 1.05fr);
  min-height: 610px;
}

.exit-offer__content--single {
  display: block;
  min-height: 0;
}

.exit-offer__main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 58px 34px 54px 68px;
}

.exit-offer__content--single .exit-offer__main {
  display: block;
  padding: 54px 58px 46px;
}

.exit-offer__state {
  width: 100%;
  max-width: 500px;
  margin: 0;
  padding: 0;
  color: var(--eo-text, #fff);
}

.exit-offer__content--single .exit-offer__state {
  max-width: none;
}

/* Сбрасываем распространенные стили h2 из тем OpenCart. */
.exit-offer .exit-offer__title,
.exit-offer .exit-offer__success-title {
  float: none;
  width: auto;
  border: 0;
  background: none;
  color: var(--eo-text, #fff) !important;
  font-family: inherit !important;
  text-align: left;
  text-transform: none;
  text-shadow: none;
}

.exit-offer .exit-offer__title {
  margin: 0 0 28px !important;
  padding: 0 !important;
  font-size: 40px !important;
  line-height: 1.14 !important;
  font-weight: 800 !important;
  letter-spacing: -.025em;
}

.exit-offer__content--single .exit-offer__title {
  margin-bottom: 24px !important;
  font-size: 36px !important;
}

.exit-offer__description {
  margin: 0 0 8px;
  padding: 0;
  color: var(--eo-text, #fff);
  font-size: 18px;
  line-height: 1.48;
  font-weight: 400;
  opacity: .96;
}

.exit-offer__offer {
  margin: 0 0 30px;
  padding: 0;
  color: var(--eo-text, #fff);
  font-size: 29px;
  line-height: 1.25;
  font-weight: 800;
}

.exit-offer__caption {
  margin: 0 0 16px;
  padding: 0;
  color: var(--eo-text, #fff);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 400;
  opacity: .96;
}

.exit-offer__form {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.exit-offer__grid {
  display: flex;
  flex-wrap: wrap;
  width: calc(100% + 12px);
  margin: -6px;
  padding: 0;
}

.exit-offer__field {
  min-width: 0;
  margin: 0;
  padding: 6px;
}

.exit-offer__field--w25 { width: 25%; }
.exit-offer__field--w50 { width: 50%; }
.exit-offer__field--w75 { width: 75%; }
.exit-offer__field--w100 { width: 100%; }

.exit-offer .exit-offer__label {
  display: block;
  float: none;
  width: auto;
  margin: 0 0 6px;
  padding: 0;
  color: var(--eo-text, #fff);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  text-align: left;
}

.exit-offer__required {
  margin-left: 2px;
  color: var(--eo-accent, #57c347);
}

.exit-offer .exit-offer__field input,
.exit-offer .exit-offer__field select,
.exit-offer .exit-offer__field textarea {
  display: block;
  float: none;
  width: 100%;
  max-width: none;
  min-height: 58px;
  margin: 0;
  padding: 0 24px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  outline: 0;
  background: #fff;
  background-image: none;
  color: #222;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 400;
  text-indent: 0;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
}

.exit-offer .exit-offer__field select {
  padding-right: 42px;
  -webkit-appearance: menulist;
  appearance: auto;
}

.exit-offer .exit-offer__field textarea {
  min-height: 100px;
  padding-top: 17px;
  padding-bottom: 17px;
  border-radius: 25px;
  resize: vertical;
  -webkit-appearance: none;
}

.exit-offer .exit-offer__field input:focus,
.exit-offer .exit-offer__field select:focus,
.exit-offer .exit-offer__field textarea:focus {
  border-color: var(--eo-accent, #57c347);
  box-shadow: 0 0 0 3px rgba(255,255,255,.13);
}

.exit-offer .exit-offer__field.has-error input,
.exit-offer .exit-offer__field.has-error select,
.exit-offer .exit-offer__field.has-error textarea {
  border-color: #ff9b9b;
}

.exit-offer__field-error {
  display: none;
  min-height: 0;
  margin: 0;
  padding: 4px 8px 0;
  color: #ffd1d1;
  font-size: 12px;
  line-height: 1.3;
}

.exit-offer__field.has-error .exit-offer__field-error { display: block; }

.exit-offer__global-error {
  display: none;
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid rgba(255,130,130,.45);
  border-radius: 12px;
  background: rgba(150,0,0,.28);
  color: #ffe0e0;
  font-size: 13px;
  line-height: 1.4;
}

.exit-offer__global-error.is-visible { display: block; }

.exit-offer .exit-offer__submit,
.exit-offer .exit-offer__reward {
  display: flex;
  float: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  margin: 12px 0 0;
  padding: 0 22px;
  border: 0 !important;
  border-radius: 999px;
  outline: 0;
  background: var(--eo-accent, #57c347) !important;
  background-image: none !important;
  color: #fff !important;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  text-shadow: none;
  box-shadow: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, opacity .15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.exit-offer .exit-offer__submit:hover,
.exit-offer .exit-offer__reward:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: #fff !important;
}

.exit-offer .exit-offer__submit[disabled] {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.exit-offer__privacy {
  display: flex;
  float: none;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
  color: var(--eo-text, #fff);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  text-align: left;
  opacity: .9;
}

.exit-offer__privacy-check {
  display: inline-flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  background: var(--eo-accent, #57c347);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.exit-offer__privacy-text {
  display: block;
  min-width: 0;
  padding-top: 2px;
}

.exit-offer .exit-offer__privacy a {
  color: inherit !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.exit-offer__close {
  position: absolute;
  right: 22px;
  top: 14px;
  z-index: 5;
  display: block;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--eo-text, #fff) !important;
  font: 300 47px/44px Arial, sans-serif !important;
  text-align: center;
  text-shadow: none;
  box-shadow: none;
  cursor: pointer;
  opacity: .9;
  -webkit-appearance: none;
  appearance: none;
}

.exit-offer__close:hover,
.exit-offer__close:focus {
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: var(--eo-text, #fff) !important;
  opacity: 1;
}

.exit-offer__visual {
  position: relative;
  min-width: 0;
  min-height: 610px;
  overflow: hidden;
  border-radius: 0 var(--eo-radius,26px) var(--eo-radius,26px) 0;
  background: rgba(255,255,255,.06);
}

.exit-offer__visual:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--eo-modal,#4a4a4a) 0%, transparent 20%);
  pointer-events: none;
}

.exit-offer__visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 610px;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
}

.exit-offer__state--success {
  text-align: left;
}

.exit-offer__success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin: 0 0 22px;
  border-radius: 50%;
  background: var(--eo-accent,#57c347);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  font-weight: 700;
}

.exit-offer .exit-offer__success-title {
  margin: 0 0 14px !important;
  padding: 0 !important;
  font-size: 38px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

.exit-offer__success-text {
  margin: 0 0 28px;
  color: var(--eo-text,#fff);
  font-size: 18px;
  line-height: 1.5;
}

.exit-offer .exit-offer__reward {
  width: auto;
  min-width: 240px;
  max-width: 100%;
  margin-top: 24px;
  padding-left: 28px;
  padding-right: 28px;
}

.exit-offer__hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

html.exit-offer-open,
body.exit-offer-open {
  overflow: hidden !important;
}

@keyframes eoFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes eoUp {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 16px)) scale(.985); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 980px) {
  .exit-offer__dialog,
  .exit-offer__dialog--single {
    width: min(650px, calc(100vw - 28px));
    max-height: calc(100vh - 24px);
  }

  .exit-offer__content--with-visual {
    display: block;
    min-height: 0;
  }

  .exit-offer__main,
  .exit-offer__content--single .exit-offer__main {
    display: block;
    padding: 48px 38px 36px;
  }

  .exit-offer__state { max-width: none; }
  .exit-offer__visual { display: none; }

  .exit-offer .exit-offer__title,
  .exit-offer__content--single .exit-offer__title {
    margin-bottom: 21px !important;
    font-size: 32px !important;
  }

  .exit-offer__offer {
    margin-bottom: 24px;
    font-size: 23px;
  }
}

@media (max-width: 560px) {
  .exit-offer__dialog,
  .exit-offer__dialog--single {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    border-radius: min(var(--eo-radius,26px), 20px);
  }

  .exit-offer__main,
  .exit-offer__content--single .exit-offer__main {
    padding: 42px 18px 24px;
  }

  .exit-offer .exit-offer__title,
  .exit-offer__content--single .exit-offer__title {
    padding-right: 30px !important;
    font-size: 27px !important;
  }

  .exit-offer__description { font-size: 15px; }
  .exit-offer__offer { font-size: 20px; }

  .exit-offer__field--w25,
  .exit-offer__field--w50,
  .exit-offer__field--w75 { width: 100%; }

  .exit-offer .exit-offer__field input,
  .exit-offer .exit-offer__field select { min-height: 54px; }

  .exit-offer__close {
    right: 8px;
    top: 7px;
    width: 42px;
    height: 42px;
    font-size: 40px !important;
    line-height: 40px !important;
  }

  .exit-offer__privacy { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .exit-offer__dialog,
  .exit-offer__overlay { animation: none; }

  .exit-offer .exit-offer__submit,
  .exit-offer .exit-offer__reward { transition: none; }
}
