:root {
  --icx-ink: #17152d;
  --icx-muted: #696779;
  --icx-border: #e5e4ea;
  --icx-surface: #f7f7f9;
  --icx-accent: #5136d4;
  --icx-accent-dark: #4028b8;
  --icx-coral: #f35a4c;
  --icx-danger: #c83443;
}

body.icx-modal-open { overflow: hidden; }

.icx-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(81, 54, 212, .14), transparent 34%),
    radial-gradient(circle at 88% 84%, rgba(243, 90, 76, .1), transparent 30%),
    rgba(18, 17, 28, .72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.icx-overlay.is-open { display: flex; }
.icx-modal, .icx-modal * { box-sizing: border-box; }

.icx-modal {
  position: relative;
  display: flex;
  width: min(930px, 100%);
  max-height: calc(100vh - 48px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(12, 10, 24, .28);
  color: var(--icx-ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: left;
}

.icx-modal::before {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--icx-accent) 0%, #7439da 62%, var(--icx-coral) 100%);
  content: "";
  pointer-events: none;
}

.icx-modal-header {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 72px;
  flex: 0 0 auto;
  align-items: center;
  gap: 20px;
  padding: 12px 72px 12px 26px;
  border-bottom: 1px solid var(--icx-border);
  background: linear-gradient(90deg, #fff 0%, #fff 70%, #fbfaff 100%);
}

.icx-logo-wrap { display: flex; min-width: 0; align-items: center; }
.icx-logo-wrap img { display: block; width: auto; max-width: 200px; height: 44px; object-fit: contain; object-position: left center; }
.icx-logo-wrap strong { color: var(--icx-ink); font-size: 19px; font-weight: 800; }

.icx-header-security {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #6e6b7b;
  font-size: 12px;
  font-weight: 650;
}

.icx-header-security svg,
.icx-modal-footer svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #39825b;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.icx-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }

.icx-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 3;
  display: grid !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  place-items: center;
  border: 1px solid #dedde4 !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #4e4b5b !important;
  font: 400 23px/1 Arial, sans-serif !important;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.icx-close:hover { border-color: #c9c7d1 !important; background: #f5f5f7 !important; color: #17152d !important; }

.icx-modal-layout {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-areas: "form summary";
  grid-template-columns: minmax(0, 1fr) 300px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #bbb7c7 transparent;
  scrollbar-width: thin;
}

.icx-modal-layout::-webkit-scrollbar { width: 7px; }
.icx-modal-layout::-webkit-scrollbar-track { background: transparent; }
.icx-modal-layout::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: #bbb7c7; background-clip: padding-box; }

.icx-checkout-main {
  grid-area: form;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  background: #fff;
}

.icx-order-panel {
  grid-area: summary;
  min-width: 0;
  min-height: 0;
  position: sticky;
  top: 0;
  align-self: stretch;
  overflow: visible;
  padding: 29px 26px 26px;
  border-left: 1px solid var(--icx-border);
  background: linear-gradient(180deg, #faf9fd 0%, #f6f5f9 100%);
  box-shadow: inset 3px 0 0 #f0edfb;
  color: var(--icx-ink);
}

.icx-order-panel h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 19px;
  color: var(--icx-ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
}

.icx-panel-heading-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #ece8fc;
  color: var(--icx-accent);
}

.icx-panel-heading-icon svg { width: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.icx-summary-product {
  display: grid;
  align-items: center;
  gap: 11px;
  padding-bottom: 20px;
  border-bottom: 1px solid #dedde3;
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.icx-summary-product-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #dedbe9;
  border-radius: 9px;
  background: linear-gradient(145deg, #fff 0%, #f4f1ff 100%);
  color: var(--icx-accent);
}

.icx-summary-product-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.icx-summary-product-copy { min-width: 0; }
.icx-summary-product-copy small { display: block; margin-bottom: 3px; color: #7a7787; font-size: 10px; line-height: 1.25; }
.icx-package-pill { display: block; overflow: hidden; margin: 0; padding: 0; background: none; color: #242135; font-size: 12px; font-weight: 750; line-height: 1.35; text-overflow: ellipsis; white-space: normal; }
.icx-summary-price { color: var(--icx-ink); font-size: 12px; font-weight: 750; white-space: nowrap; }

.icx-summary-row,
.icx-summary-total {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.icx-summary-row { padding: 18px 0; border-bottom: 1px solid #dedde3; color: #6e6b7b; font-size: 11px; }
.icx-summary-row strong { max-width: 155px; color: #4f4c5c; font-size: 11px; font-weight: 650; line-height: 1.4; text-align: right; }
.icx-summary-row-label { display: inline-flex; align-items: center; gap: 6px; }
.icx-summary-row-label svg { width: 15px; fill: none; stroke: #777288; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.icx-summary-total { padding: 19px 0 22px; color: var(--icx-ink); font-size: 14px; font-weight: 750; }
.icx-summary-total strong { color: var(--icx-ink); font-size: 18px; font-weight: 800; }

.icx-summary-benefits {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid #dedde3;
  list-style: none;
}

.icx-summary-benefits li { display: flex; align-items: center; gap: 8px; color: #5f5c6b; font-size: 11px; font-weight: 550; }
.icx-summary-benefits li span { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; border: 1px solid #d7eadf; border-radius: 6px; background: #edf7f1; color: #2f7a51; }
.icx-summary-benefits li span svg { width: 12px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.icx-summary-help { margin: 24px 0 0; color: #7a7787; font-size: 10px; line-height: 1.55; }
.icx-summary-help a { color: #4f3ab4; font-weight: 650; text-decoration: none; word-break: break-word; }
.icx-summary-help a:hover { text-decoration: underline; }

.icx-progress {
  display: grid;
  align-items: center;
  gap: 11px;
  padding: 15px 32px;
  border-bottom: 1px solid #eceaf2;
  background: linear-gradient(90deg, #fbfaff 0%, #fff 100%);
  color: #9693a0;
  font-size: 10px;
  font-weight: 650;
  grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto;
}

.icx-progress span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.icx-progress i { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid #dcd9e5; border-radius: 9px; background: #fff; color: #8b8798; font-style: normal; transition: .2s; }
.icx-progress i svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.icx-progress em { display: flex; flex-direction: column; color: #827e8d; font-style: normal; line-height: 1.2; }
.icx-progress em small { margin-bottom: 2px; color: #aaa6b3; font-size: 8px; font-weight: 550; }
.icx-progress b { width: 100%; height: 2px; border-radius: 999px; background: #e4e1ea; transition: background .2s; }
.icx-progress span.is-active em { color: #2c2839; }
.icx-progress span.is-active em small { color: var(--icx-accent); }
.icx-progress span.is-active i { border-color: var(--icx-accent); background: linear-gradient(145deg, var(--icx-accent), #6e3edc); box-shadow: 0 5px 13px rgba(81, 54, 212, .2); color: #fff; }
.icx-progress span.is-complete i { border-color: #39825b; background: #39825b; color: #fff; }
.icx-progress span.is-complete + b { background: #7a67dd; }

.icx-step { padding: 21px 32px 29px; }
.icx-step[hidden] { display: none !important; }
.icx-step-kicker { display: block; margin: 0 0 7px; color: #706b81; font-size: 11px; font-weight: 650; }

.icx-step h2 {
  margin: 0 0 7px;
  color: var(--icx-ink);
  letter-spacing: -.025em;
  font-size: 29px;
  font-weight: 780;
  line-height: 1.18;
}

.icx-step-intro,
.icx-step > p { margin: 0 0 21px; color: var(--icx-muted); font-size: 13px; line-height: 1.55; }

.icx-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ecebf0;
  color: #373445;
  font-size: 12px;
  font-weight: 750;
}

.icx-section-label svg { width: 18px; height: 18px; fill: none; stroke: var(--icx-accent); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }

.icx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.icx-modal .icx-field {
  display: block;
  margin: 0 0 13px;
  color: #373445;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.icx-field em { color: var(--icx-danger); font-style: normal; }

.icx-modal .icx-field input {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 6px 0 0 !important;
  padding: 0 13px !important;
  border: 1px solid #d7d5de !important;
  border-radius: 8px !important;
  outline: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--icx-ink) !important;
  font: 500 13px/1.2 Inter, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  transition: border-color .15s, box-shadow .15s !important;
}

.icx-modal .icx-field input::placeholder { color: #aaa7b2 !important; opacity: 1; }
.icx-modal .icx-field input:hover { border-color: #bdbac6 !important; }
.icx-modal .icx-field input:focus { border-color: var(--icx-accent) !important; box-shadow: 0 0 0 3px rgba(81, 54, 212, .1) !important; }
.icx-field small { display: block; margin-top: 5px; color: #85818f; font-size: 9px; font-weight: 500; line-height: 1.4; }

.icx-error { min-height: 19px; margin: 1px 0 6px; color: var(--icx-danger); font-size: 11px; font-weight: 650; }

.icx-primary {
  display: flex !important;
  width: 100% !important;
  min-height: 48px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px;
  padding: 0 20px !important;
  border: 1px solid var(--icx-accent) !important;
  border-radius: 8px !important;
  background: linear-gradient(100deg, #5136d4 0%, #6939db 74%, #8b40c9 100%) !important;
  box-shadow: 0 8px 20px rgba(81, 54, 212, .18) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s !important;
}

.icx-primary:hover { border-color: var(--icx-accent-dark) !important; background: linear-gradient(100deg, #4429c2 0%, #5b2fc6 100%) !important; box-shadow: 0 10px 24px rgba(64, 40, 184, .24) !important; transform: translateY(-1px); }
.icx-primary:disabled { cursor: wait; opacity: .58; transform: none; }
.icx-primary i { display: inline-flex; font-style: normal; }
.icx-primary i svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.icx-privacy { margin: 9px 0 0 !important; color: #8d8997 !important; text-align: center; font-size: 9px !important; }

.icx-back { margin: 0 0 17px; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; color: #4f3ab4 !important; font-size: 11px !important; font-weight: 650 !important; cursor: pointer; }
.icx-summary { display: flex; justify-content: space-between; gap: 20px; margin: 18px 0; padding: 14px 15px; border: 1px solid var(--icx-border); border-radius: 8px; background: var(--icx-surface); font-size: 12px; }
.icx-summary strong { color: var(--icx-ink); }
#icx-payment-element { min-height: 120px; margin: 18px 0; }

.icx-success { padding-top: 55px; text-align: center; }
.icx-success-icon { display: grid; width: 62px; height: 62px; margin: 0 auto 18px; place-items: center; border: 1px solid #cee6d8; border-radius: 50%; background: #f1f8f4; color: #2f7a51; font-size: 29px; font-weight: 750; }
.icx-success .icx-primary { max-width: 240px; margin: 22px auto 0; }

.icx-modal-footer {
  display: flex;
  min-height: 43px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 26px;
  border-top: 1px solid var(--icx-border);
  background: linear-gradient(90deg, #fff 0%, #faf9fc 50%, #fff 100%);
  color: #85818f;
  font-size: 9px;
  font-weight: 550;
}

.icx-modal-footer span { display: inline-flex; align-items: center; gap: 5px; }
.icx-modal-footer strong { color: #565260; font-size: 10px; font-weight: 700; }

@media (max-width: 720px) {
  .icx-overlay { align-items: flex-end; padding: 0; }
  .icx-modal { width: 100%; max-height: 96vh; border-width: 1px 0 0; border-radius: 16px 16px 0 0; }
  .icx-modal-header { min-height: 66px; padding: 10px 60px 10px 18px; }
  .icx-logo-wrap img { max-width: 174px; height: 40px; }
  .icx-header-security { display: none; }
  .icx-close { top: 13px; right: 15px; }
  .icx-modal-layout { display: flex; flex-direction: column; overflow-y: auto; }
  .icx-order-panel { position: static; flex: 0 0 auto; order: -1; overflow: visible; padding: 17px 20px; border-bottom: 1px solid var(--icx-border); border-left: 0; box-shadow: inset 0 -2px 0 #f0edfb; }
  .icx-order-panel h3 { margin-bottom: 13px; }
  .icx-summary-product { padding-bottom: 14px; }
  .icx-summary-row { padding: 13px 0 0; border: 0; }
  .icx-summary-total, .icx-summary-benefits, .icx-summary-help { display: none; }
  .icx-checkout-main { flex: 0 0 auto; overflow: visible; }
  .icx-progress { gap: 7px; padding: 13px 20px; }
  .icx-progress i { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; }
  .icx-progress i svg { width: 15px; }
  .icx-progress em { font-size: 9px; }
  .icx-progress em small { display: none; }
  .icx-step { padding: 18px 20px 25px; }
  .icx-step h2 { font-size: 25px; }
  .icx-grid { grid-template-columns: 1fr; gap: 0; }
  .icx-section-label { margin-top: 17px; }
  .icx-modal-footer { padding: 9px 17px; }
  .icx-modal-footer span:nth-child(2) { display: none; }
}

@media (max-width: 380px) {
  .icx-logo-wrap img { max-width: 155px; }
  .icx-step h2 { font-size: 23px; }
  .icx-progress { padding-right: 14px; padding-left: 14px; }
  .icx-modal-footer { font-size: 8px; }
}

/* Payment method chooser */
#icx-overlay .icx-field select{width:100%;min-height:48px;padding:12px;border:1px solid #d9d3e7;border-radius:10px;background:#fff;color:#241944;font:inherit} #icx-overlay [hidden]{display:none!important} #icx-paypal-buttons{margin:20px 0;min-height:48px;position:relative;z-index:1}

/* Alternative payment buttons share the payment screen. */
.icx-payment-divider { display:flex; align-items:center; gap:14px; margin:24px 0 20px; color:#807a91; font-size:12px; font-weight:600; }
.icx-payment-divider::before,.icx-payment-divider::after { content:""; height:1px; background:#e5e4ea; flex:1; }
#icx-paypal-section { margin-top:20px; }
#icx-paypal-buttons { position:relative; z-index:0; min-height:48px; }
#icx-paypal-section[aria-busy="true"] { pointer-events:none; opacity:.6; }
#icx-payment-divider[hidden],#icx-paypal-section[hidden] { display:none !important; }
