.exit-feedback-dialog {
  position: fixed;
  inset: 0;
  display: grid;
  width: min(100% - 32px, 560px);
  max-width: 560px;
  max-height: min(90dvh, 760px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(106, 69, 227, .16);
  border-radius: 22px;
  background: #fff;
  color: var(--ink, #0b1530);
  box-shadow: 0 26px 90px rgba(11, 21, 48, .28);
  font-family: var(--font, system-ui, sans-serif);
}

.exit-feedback-dialog:not([open]) {
  display: none;
}

.exit-feedback-dialog[open] {
  animation: exit-feedback-enter .2s ease-out both;
}

.exit-feedback-dialog::backdrop {
  background: rgba(11, 21, 48, .64);
  backdrop-filter: blur(4px);
}

.exit-feedback {
  position: relative;
  padding: clamp(25px, 5vw, 42px);
}

.exit-feedback__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #e7eaf3;
  border-radius: 50%;
  background: #fff;
  color: #263248;
  font: 400 26px/1 var(--font, system-ui, sans-serif);
  cursor: pointer;
}

.exit-feedback__close:hover {
  border-color: var(--purple, #6a45e3);
  color: var(--purple, #6a45e3);
}

.exit-feedback__eyebrow {
  margin: 0 48px 8px 0;
  color: var(--purple, #6a45e3);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.exit-feedback h2 {
  margin: 0 42px 4px 0;
  color: var(--ink, #0b1530);
  font-size: clamp(1.65rem, 5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.15;
}

.exit-feedback__subheading {
  margin: 0;
  color: #526078;
  font-size: .95rem;
}

.exit-feedback__offer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 22px 0 18px;
  padding: 16px 18px;
  border: 1px solid #e4dcff;
  border-radius: 15px;
  background: linear-gradient(115deg, #f4f0ff, #fff8ec);
}

.exit-feedback__percent {
  color: var(--purple, #6a45e3);
  font-size: clamp(2.15rem, 9vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: .95;
  white-space: nowrap;
}

.exit-feedback__offer-copy {
  display: grid;
  gap: 4px;
}

.exit-feedback__offer-copy strong {
  color: #17213a;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.exit-feedback__offer-copy span {
  color: #526078;
  font-size: .78rem;
  line-height: 1.5;
}

.exit-feedback__intro {
  margin: 0 0 16px;
  color: #526078;
  font-size: .87rem;
  line-height: 1.6;
}

.exit-feedback__form {
  display: grid;
  gap: 14px;
}

.exit-feedback__label,
.exit-feedback__question {
  display: block;
  margin: 0 0 6px;
  color: #263248;
  font-size: .82rem;
  font-weight: 700;
}

.exit-feedback__question {
  margin-bottom: 9px;
}

.exit-feedback__form input[type="email"],
.exit-feedback__form input[type="text"] {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #dce1ea;
  border-radius: 9px;
  background: #fff;
  color: var(--ink, #0b1530);
  font: 400 .88rem/1.5 var(--font, system-ui, sans-serif);
}

.exit-feedback__form input:focus-visible {
  border-color: var(--purple, #6a45e3);
  outline: 3px solid rgba(106, 69, 227, .2);
  outline-offset: 1px;
}

.exit-feedback__reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.exit-feedback__reason {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e7eaf3;
  border-radius: 9px;
  color: #364258;
  font-size: .77rem;
  line-height: 1.35;
  cursor: pointer;
}

.exit-feedback__reason:has(input:checked) {
  border-color: var(--purple, #6a45e3);
  background: #f7f4ff;
  color: #352078;
}

.exit-feedback__reason input,
.exit-feedback__consent input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  accent-color: var(--purple, #6a45e3);
}

.exit-feedback__other[hidden] {
  display: none;
}

.exit-feedback__consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #364258;
  font-size: .77rem;
  line-height: 1.5;
  cursor: pointer;
}

.exit-feedback__consent input {
  margin-top: 2px;
}

.exit-feedback__consent-note {
  margin: -8px 0 0 25px;
  color: #64748b;
  font-size: .7rem;
  line-height: 1.5;
}

.exit-feedback__submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--navy, #0f3256);
  color: #fff;
  font: 800 .86rem/1.2 var(--font, system-ui, sans-serif);
  letter-spacing: .035em;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.exit-feedback__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--navy-d, #0b2640);
}

.exit-feedback__submit:disabled {
  cursor: wait;
  opacity: .7;
}

.exit-feedback__status {
  margin: 0;
  color: #b42318;
  font-size: .78rem;
  line-height: 1.5;
}

.exit-feedback__status[data-state="success"] {
  color: #17663a;
}

.exit-feedback__footer {
  margin: 12px 0 0;
  color: #64748b;
  font-size: .73rem;
  text-align: center;
}

body.exit-feedback-open {
  overflow: hidden;
}

@keyframes exit-feedback-enter {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .exit-feedback-dialog {
    width: min(100% - 20px, 440px);
    max-height: min(92dvh, 760px);
    border-radius: 17px;
  }

  .exit-feedback {
    padding: 24px 19px;
  }

  .exit-feedback__reasons {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .exit-feedback__reason {
    min-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .exit-feedback-dialog[open] {
    animation: none;
  }

  .exit-feedback__submit {
    transition: none;
  }
}
