.asx-stripe-developer-card,
.asx-stripe-developer-card *,
.asx-stripe-overlay,
.asx-stripe-overlay *,
.asx-stripe-crm-button,
.asx-stripe-crm-button * {
  box-sizing: border-box;
}

.asx-stripe-developer-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin: 0 0 22px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid #7966dc;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 0%, rgba(183, 167, 255, .34), transparent 30%),
    linear-gradient(125deg, #33246f, #5942b7 58%, #725bd3);
  box-shadow: 0 17px 42px rgba(54, 38, 116, .22);
}

.asx-stripe-card-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-content: center;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 21px;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px rgba(255, 255, 255, .18);
}

.asx-stripe-card-mark span { font-size: 28px; font-weight: 900; line-height: 1; }
.asx-stripe-card-mark small { margin-top: 4px; color: #ddd7ff; font-size: 7px; font-weight: 850; letter-spacing: .16em; }
.asx-stripe-card-copy { min-width: 0; }
.asx-stripe-card-copy > span { color: #d8d1ff; font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.asx-stripe-card-copy h2 { margin: 5px 0 6px; color: #fff; font-size: 21px; line-height: 1.12; }
.asx-stripe-card-copy p { max-width: 720px; margin: 0; color: #e0dcf7; font-size: 11px; line-height: 1.5; }
.asx-stripe-card-status { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }

.asx-stripe-status,
.asx-stripe-mode {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
}

.asx-stripe-status { color: #e7e4f7; background: rgba(15, 11, 37, .3); }
.asx-stripe-status i { width: 7px; height: 7px; border-radius: 50%; background: #b7accf; }
.asx-stripe-status.connected i { background: #baff70; box-shadow: 0 0 0 3px rgba(186, 255, 112, .14); }
.asx-stripe-status.warning i { background: #ffd884; }
.asx-stripe-status.loading i { background: #d7ccff; }
.asx-stripe-status-retry { padding: 5px 9px; border: 1px solid currentColor; border-radius: 8px; color: inherit; background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.asx-stripe-status-retry:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.asx-stripe-verification { display: block; margin: 8px 0 0; color: inherit; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.asx-stripe-refresh-warning { display: block; margin-top: 4px; }
.asx-stripe-developer-card .asx-stripe-verification { color: #eeeaff; }
.asx-stripe-form [data-asx-stripe-summary] { color: var(--text, #171912); }
.asx-stripe-mode { color: #352b60; background: #e7e2ff; }
.asx-stripe-mode.live { color: #193714; background: #cfff9c; }

.asx-stripe-developer-card > button {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 12px;
  color: #302266;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  cursor: pointer;
}

.asx-stripe-developer-card > button:hover,
.asx-stripe-developer-card > button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .24);
  outline-offset: 3px;
  transform: translateY(-1px);
}

.asx-stripe-developer-card > button b { font-size: 17px; }

.asx-stripe-crm-button {
  display: grid;
  width: 100%;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  margin-bottom: 7px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, #6350bf 42%, var(--border, #dfe2d8));
  border-radius: 12px;
  color: var(--text, #171912);
  background: color-mix(in srgb, #ece8ff 72%, var(--bg-card, #fff));
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.asx-stripe-crm-button:hover,
.asx-stripe-crm-button:focus-visible { border-color: #6350bf; outline: 2px solid rgba(99, 80, 191, .2); }
.asx-stripe-crm-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: #fff; background: #6350bf; font-size: 13px; font-weight: 900; }
.asx-stripe-crm-button > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.asx-stripe-crm-button strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.asx-stripe-crm-button small { color: var(--text-muted, #707369); font-size: 8px; }
.asx-stripe-crm-button > b { color: #6350bf; font-size: 18px; }

body.asx-stripe-open { overflow: hidden; }

.asx-stripe-overlay {
  position: fixed;
  z-index: 160000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(21, 17, 38, .62);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.asx-stripe-dialog {
  display: grid;
  width: min(720px, calc(100vw - 36px));
  max-height: min(860px, calc(100vh - 36px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border, #dfe2d8);
  border-radius: 22px;
  color: var(--text, #171912);
  background: var(--bg-card, #fff);
  box-shadow: 0 32px 100px rgba(18, 14, 37, .34);
}

.asx-stripe-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border, #dfe2d8);
  background: color-mix(in srgb, #f0edff 58%, var(--bg-card, #fff));
}

.asx-stripe-dialog > header span { color: #6350bf; font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.asx-stripe-dialog > header h2 { margin: 5px 0 4px; font-size: 24px; letter-spacing: -.035em; line-height: 1.08; }
.asx-stripe-dialog > header p { margin: 0; color: var(--text-muted, #707369); font-size: 10px; line-height: 1.45; }
.asx-stripe-dialog > header button { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border, #dfe2d8); border-radius: 12px; color: var(--text, #171912); background: var(--bg-card, #fff); font: inherit; font-size: 22px; cursor: pointer; }
.asx-stripe-dialog > header button:hover,
.asx-stripe-dialog > header button:focus-visible { border-color: #6350bf; outline: 3px solid rgba(99, 80, 191, .14); }

.asx-stripe-body { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.asx-stripe-loading { display: grid; min-height: 360px; place-content: center; place-items: center; gap: 12px; color: var(--text-muted, #707369); }
.asx-stripe-loading span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; color: #fff; background: #6350bf; font-size: 18px; font-weight: 900; animation: asx-stripe-pulse 1.15s ease-in-out infinite; }
.asx-stripe-loading strong { font-size: 11px; }
@keyframes asx-stripe-pulse { 50% { opacity: .66; transform: scale(.96); } }

.asx-stripe-form { display: grid; gap: 15px; padding: 20px 22px 0; }
.asx-stripe-connection-summary { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 12px; padding: 13px; border: 1px solid color-mix(in srgb, #6350bf 30%, var(--border, #dfe2d8)); border-radius: 15px; background: color-mix(in srgb, #f0edff 50%, var(--bg-card, #fff)); }
.asx-stripe-logo { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; color: #fff; background: #6350bf; font-size: 19px; font-weight: 900; box-shadow: 0 8px 19px rgba(99, 80, 191, .24); }
.asx-stripe-connection-summary > div:last-child { display: grid; min-width: 0; gap: 4px; }
.asx-stripe-connection-summary small { color: var(--text-muted, #707369); font-size: 8px; font-weight: 750; }
.asx-stripe-connection-summary strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.asx-stripe-connection-summary div > span { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.asx-stripe-connection-summary .asx-stripe-status { color: var(--text-muted, #707369); background: var(--surface-soft, #f4f5f0); }

.asx-stripe-charge-state { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #b7d998; border-radius: 12px; color: #365b1c; background: #eff9e5; }
.asx-stripe-charge-state.warning { border-color: #e3c574; color: #765815; background: #fff8de; }
.asx-stripe-charge-state > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .65); font-weight: 900; }
.asx-stripe-charge-state strong { font-size: 9px; }

.asx-stripe-field { display: grid; gap: 6px; }
.asx-stripe-field > span { font-size: 10px; font-weight: 780; }
.asx-stripe-field input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--border, #dfe2d8); border-radius: 11px; outline: 0; color: var(--text, #171912); background: var(--bg-card, #fff); font: inherit; font-size: 11px; }
.asx-stripe-field input:focus { border-color: #6350bf; box-shadow: 0 0 0 4px rgba(99, 80, 191, .12); }
.asx-stripe-field > small { color: var(--text-muted, #707369); font-size: 8px; line-height: 1.45; }
.asx-stripe-webhook > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.asx-stripe-webhook button { min-height: 46px; padding: 0 13px; border: 1px solid var(--border, #dfe2d8); border-radius: 11px; color: var(--text, #171912); background: var(--surface-soft, #f4f5f0); font: inherit; font-size: 9px; font-weight: 780; cursor: pointer; }

.asx-stripe-security { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #dce4d2; border-radius: 12px; background: #f6f8f2; }
.asx-stripe-security > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: #e8efdf; font-size: 14px; }
.asx-stripe-security div { display: grid; gap: 2px; }
.asx-stripe-security strong { font-size: 9px; }
.asx-stripe-security small { color: #687060; font-size: 8px; line-height: 1.4; }

.asx-stripe-form-status { min-height: 18px; color: var(--text-muted, #707369); font-size: 9px; font-weight: 700; }
.asx-stripe-form-status.success { color: #4d7c20; }
.asx-stripe-form-status.warning { color: #8a6615; }
.asx-stripe-form-status.error { color: #a43d31; }

.asx-stripe-form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 -22px;
  padding: 13px 22px;
  border-top: 1px solid var(--border, #dfe2d8);
  background: color-mix(in srgb, var(--bg-card, #fff) 94%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.asx-stripe-form-actions > div { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.asx-stripe-form-actions button,
.asx-stripe-load-error button { min-height: 44px; padding: 0 13px; border: 1px solid var(--border, #dfe2d8); border-radius: 11px; color: var(--text, #171912); background: var(--bg-card, #fff); font: inherit; font-size: 9px; font-weight: 790; cursor: pointer; }
.asx-stripe-form-actions button.primary { border-color: #6350bf; color: #fff; background: #6350bf; }
.asx-stripe-form-actions button.danger { border-color: #efc5be; color: #a0392e; background: #fff5f3; }
.asx-stripe-form-actions button:disabled { opacity: .55; cursor: wait; }
.asx-stripe-form-actions button:focus-visible,
.asx-stripe-load-error button:focus-visible { outline: 3px solid rgba(99, 80, 191, .16); outline-offset: 2px; }

.asx-stripe-load-error { display: grid; min-height: 340px; place-content: center; place-items: center; gap: 9px; padding: 24px; text-align: center; }
.asx-stripe-load-error > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #a0392e; background: #fff0ed; font-size: 19px; font-weight: 900; }
.asx-stripe-load-error strong { font-size: 13px; }
.asx-stripe-load-error small { max-width: 450px; color: var(--text-muted, #707369); font-size: 9px; line-height: 1.45; }

@media (max-width: 900px) {
  .asx-stripe-developer-card { grid-template-columns: 64px minmax(0, 1fr); }
  .asx-stripe-card-mark { width: 60px; height: 60px; border-radius: 18px; }
  .asx-stripe-developer-card > button { grid-column: 1 / -1; justify-content: center; }
}

@media (max-width: 720px) {
  .asx-stripe-overlay { display: block; padding: 0; }
  .asx-stripe-dialog { width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .asx-stripe-dialog > header { padding: 16px; }
  .asx-stripe-dialog > header h2 { font-size: 22px; }
  .asx-stripe-form { padding: 16px 14px 0; }
  .asx-stripe-form-actions { align-items: stretch; flex-direction: column; margin: 0 -14px; padding: 11px 14px max(11px, env(safe-area-inset-bottom)); }
  .asx-stripe-form-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .asx-stripe-form-actions > div .primary { grid-column: 1 / -1; grid-row: 1; }
  .asx-stripe-form-actions > .danger { width: 100%; }
  .asx-stripe-form-actions button { min-height: 48px; }
  .asx-stripe-developer-card { grid-template-columns: 52px minmax(0, 1fr); gap: 13px; padding: 17px; border-radius: 16px; }
  .asx-stripe-card-mark { width: 50px; height: 50px; border-radius: 15px; }
  .asx-stripe-card-mark span { font-size: 21px; }
  .asx-stripe-card-copy h2 { font-size: 18px; }
  .asx-stripe-webhook > div { grid-template-columns: 1fr; }
  .asx-stripe-webhook button { min-height: 44px; }
}

@media (max-width: 430px) {
  .asx-stripe-developer-card { grid-template-columns: 1fr; }
  .asx-stripe-card-mark { display: none; }
  .asx-stripe-connection-summary { grid-template-columns: 42px minmax(0, 1fr); }
  .asx-stripe-logo { width: 40px; height: 40px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .asx-stripe-loading span { animation: none; }
  .asx-stripe-developer-card > button { transition: none; }
}
