:root {
  --uptrail-lead-ink: #123b35;
  --uptrail-lead-green: #0f8a68;
  --uptrail-lead-gold: #efa92f;
  --uptrail-wheel-bg: #0f172a;
}

.uptrail-exit-lead {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: 0;
  max-width: none;
  padding: 0;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(180deg, #0f172a 0%, #064e3b 100%);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 12px)) scale(.98);
  transition: opacity .25s cubic-bezier(0.16, 1, 0.3, 1), transform .25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.uptrail-exit-lead.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.uptrail-exit-lead::backdrop { background: rgba(2, 6, 23, 0.82); backdrop-filter: blur(12px); }
body.has-exit-wheel { overflow: hidden; }

.uptrail-confetti-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

.uptrail-exit-lead__shell {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  max-height: inherit;
  min-height: 460px;
  position: relative;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.uptrail-exit-lead__close {
  position: absolute;
  z-index: 20;
  right: 16px;
  top: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.1);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.uptrail-exit-lead__close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* LEFT SIDE: WHEEL STAGE */
.uptrail-wheel__visual {
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.4);
  border-right: 1px solid rgba(16, 185, 129, 0.2);
  position: relative;
  text-align: center;
}

.uptrail-wheel__badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-block;
  margin-bottom: 8px;
}

.uptrail-wheel__header h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #fef08a, #ffffff, #6ee7b7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.uptrail-wheel__header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 300;
}

/* WHEEL DISC & POINTER */
.uptrail-wheel__stage {
  position: relative;
  width: 290px;
  height: 290px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uptrail-wheel__pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid #fbbf24;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8));
}

.uptrail-wheel__disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.25), inset 0 0 0 6px #0f172a;
  position: relative;
  transition: transform 4.5s cubic-bezier(0.15, 0.9, 0.2, 1);
  will-change: transform;
}

.uptrail-wheel__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.uptrail-wheel__spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
  color: #020617;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.uptrail-wheel__spin-btn:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.06);
}

.uptrail-wheel__spin-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.uptrail-wheel__spin-btn span[data-spin-btn-text] {
  font-size: 10px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: uppercase;
}

.uptrail-wheel__spin-btn span[data-spin-btn-icon] {
  font-size: 14px;
}

.uptrail-wheel__footer-note {
  font-size: 11px;
  color: #fde68a;
  font-weight: 600;
  font-style: italic;
}

/* RIGHT SIDE: CONTENT & FORMS */
.uptrail-exit-lead__content {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(15, 23, 42, 0.8);
}

.uptrail-wheel-icon-wrap {
  width: 52px;
  height: 52px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
}

.uptrail-wheel-step h2,
.uptrail-wheel-step h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.uptrail-wheel-step p {
  margin: 0 0 16px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 300;
}

.uptrail-wheel-perks-box {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: grid;
  gap: 10px;
  font-size: 12px;
  color: #e2e8f0;
}

.uptrail-wheel-perks-box div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.uptrail-exit-lead__submit {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  color: #020617;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.uptrail-exit-lead__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #34d399, #10b981);
}

.uptrail-exit-lead__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* RESULT BANNER & FORM */
.uptrail-wheel-win-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.uptrail-win-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 4px;
}

.uptrail-win-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fde68a;
  font-weight: 800;
}

.uptrail-wheel-win-banner h3 {
  font-size: 22px;
  margin: 4px 0 2px;
  color: #ffffff;
}

.uptrail-wheel-win-banner p {
  margin: 0;
  font-size: 12px;
  color: #fef08a;
}

.uptrail-form-guide {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.uptrail-wheel-status {
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.1);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}

.uptrail-wheel-status.is-error {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

.uptrail-field-group {
  margin-bottom: 12px;
}

.uptrail-field-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #fde68a;
  margin-bottom: 4px;
}

.uptrail-field-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  background: #020617;
  border: 1px solid #334155;
  border-radius: 12px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.uptrail-field-group input:focus {
  border-color: #fbbf24;
}

.uptrail-exit-lead__trap {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.uptrail-exit-lead__consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 16px;
  cursor: pointer;
}

.uptrail-exit-lead__consent input {
  margin-top: 2px;
  accent-color: #10b981;
}

/* SUCCESS SCREEN */
.uptrail-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.uptrail-success-msg {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 16px;
  line-height: 1.5;
}

.uptrail-success-delivery {
  margin: -6px 0 14px;
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.uptrail-success-delivery.is-warning {
  color: #fcd34d;
}

.uptrail-coupon-box {
  background: #020617;
  border: 1px dashed rgba(245, 158, 11, 0.5);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.uptrail-coupon-box small {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #94a3b8;
  display: block;
  font-weight: 800;
}

.uptrail-coupon-box strong {
  display: block;
  font-family: monospace;
  font-size: 26px;
  color: #fbbf24;
  letter-spacing: 0.08em;
  margin: 6px 0;
}

.uptrail-coupon-box span {
  font-size: 12px;
  color: #34d399;
  font-weight: 700;
}

.uptrail-success-actions {
  display: grid;
  gap: 8px;
}

.uptrail-btn-copy {
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #f59e0b;
  color: #020617;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.uptrail-btn-copy:hover {
  background: #fbbf24;
}

.uptrail-btn-book {
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.uptrail-btn-book:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .uptrail-exit-lead {
    width: min(560px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }
  .uptrail-exit-lead__shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .uptrail-wheel__visual {
    border-right: 0;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    padding: 18px 16px;
  }
  .uptrail-wheel__stage {
    width: min(230px, 62vw);
    height: min(230px, 62vw);
    margin: 12px 0;
  }
  .uptrail-exit-lead__content { padding: 24px 20px; }
}
