/* All layout changes are scoped to the Stripe form. */
.ctcl-payment-tab-fieldset > form:has(.ctcl-stripe-settings), .ctcl-payment-tab-fieldset > .ctcl-st-form { grid-column: 1 / -1; }
.ctcl-payment-tab-fieldset form:has(.ctcl-stripe-settings) > fieldset, .ctcl-payment-tab-fieldset .ctcl-st-form > fieldset { padding: 0; border: 1px solid #deddec; border-radius: 18px; background: #fff; overflow: hidden; box-shadow: 0 8px 30px #29235409; }
.ctcl-st-form > fieldset > legend, form:has(.ctcl-stripe-settings) > fieldset > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; }
.ctcl-stripe-settings { --st-ink: #242238; --st-muted: #646378; --st-accent: #635bff; color: var(--st-ink); font-size: 13px; line-height: 1.6; scroll-margin-top: 55px; }
.ctcl-stripe-settings *, .ctcl-st-form * { box-sizing: border-box; }
.ctcl-stripe-settings :is(h2,h3,h4,p) { margin: 0; }
.ctcl-stripe-settings :is(h3,h4) { color: var(--st-ink); }
.ctcl-stripe-settings a { color: #5147ce; text-underline-offset: 3px; }
.ctcl-st-hero { display: flex; gap: 28px; align-items: center; padding: 32px 36px; background: linear-gradient(115deg,#21184a,#40308b 65%,#635bce); color: #e4e0f7; }
.ctcl-st-brand { color: #fff; font-size: 34px; font-weight: 800; letter-spacing: -1.7px; line-height: 1; flex: 0 0 auto; }
.ctcl-st-brand > span { display: inline-block; color: #b9b2ff; font-size: 20px; vertical-align: top; padding: 0 0 0 7px; letter-spacing: 0; }
.ctcl-st-hero-copy { flex: 1; }
.ctcl-st-eyebrow { color: var(--st-muted); font-size: 10px; font-weight: 700; letter-spacing: 1.7px; }
.ctcl-st-hero .ctcl-st-eyebrow { color: #c6bfeb; }
.ctcl-st-hero h2 { color: #fff; font-size: 25px; line-height: 1.3; letter-spacing: -.6px; margin: 5px 0 8px; }
.ctcl-st-status { border: 1px solid #ffffff40; border-radius: 30px; padding: 5px 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.ctcl-st-status::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #c2bdd8; margin-right: 7px; }
.ctcl-st-status.is-enabled::before { background: #91e5bf; }
.ctcl-st-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(260px,1fr); }
.ctcl-st-fields { padding: 32px 36px; min-width: 0; }
.ctcl-st-section + .ctcl-st-section { margin-top: 28px; padding-top: 28px; border-top: 1px solid #eeedf4; }
.ctcl-st-section-heading { display: flex; gap: 12px; margin-bottom: 23px; align-items: flex-start; }
.ctcl-st-step { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; background: #f3f1ff; border: 1px solid #e4e0fc; border-radius: 9px; color: #6257c4; font-size: 11px; font-weight: 650; }
.ctcl-st-section-heading h3 { font-size: 16px; font-weight: 650; margin: 0 0 4px; }
.ctcl-st-section-heading p { color: var(--st-muted); }
.ctcl-stripe-settings .ctcl-st-field { margin-top: 18px; }
.ctcl-stripe-settings label:not(.ctcl-st-switch-row) { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #45425a; }
.ctcl-stripe-settings input:not([type=checkbox]) { width: 100%; min-height: 42px; border: 1px solid #d5d2e2; border-radius: 8px; padding: 9px 12px; background: #fff; color: var(--st-ink); box-shadow: 0 1px 2px #29235404; font-size: 13px; }
.ctcl-stripe-settings input:focus { border-color: var(--st-accent); box-shadow: 0 0 0 3px #635bff18; outline: none; }
.ctcl-stripe-settings .ctcl-st-help { font-size: 11px; color: var(--st-muted); margin: 8px 0 0; line-height: 1.7; }
.ctcl-st-switch-row { display: flex; align-items: center; gap: 14px; position: relative; cursor: pointer; }
.ctcl-st-switch-row > span:first-child { flex: 1; }
.ctcl-st-switch-row strong { display: block; font-size: 13px; font-weight: 600; }
.ctcl-st-switch-row small { display: block; color: var(--st-muted); font-size: 11px; }
.ctcl-st-switch-row input { position: absolute; right: 0; width: 40px; height: 24px; opacity: 0; margin: 0; cursor: pointer; }
.ctcl-st-switch { flex: 0 0 40px; height: 24px; border-radius: 20px; background: #c5c2d1; pointer-events: none; transition: background .15s; }
.ctcl-st-switch::after { content: ''; display: block; height: 18px; width: 18px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; transition: transform .15s; }
.ctcl-st-switch-row input:checked + .ctcl-st-switch { background: var(--st-accent); }
.ctcl-st-switch-row input:checked + .ctcl-st-switch::after { transform: translateX(16px); }
.ctcl-st-switch-row input:focus-visible + .ctcl-st-switch { outline: 2px solid var(--st-accent); outline-offset: 3px; }
.ctcl-st-mode-row { padding: 14px 16px; background: #f7f6fc; border-radius: 10px; }
.ctcl-st-mode-row input { right: 16px; }
.ctcl-st-credentials { padding: 18px; margin-top: 16px; border: 1px solid #e7e5ee; border-radius: 12px; }
.ctcl-st-credentials[data-active=true] { border-color: #bcb6f8; background: #fcfbff; }
.ctcl-st-credential-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ctcl-st-credential-heading h4 { font-size: 13px; font-weight: 650; }
.ctcl-st-active-tag { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: #5147ce; background: #eeebff; border-radius: 4px; padding: 2px 6px; visibility: hidden; }
.ctcl-st-credentials[data-active=true] .ctcl-st-active-tag { visibility: visible; }
.ctcl-st-key-control { display: flex; align-items: center; position: relative; }
.ctcl-stripe-settings .ctcl-st-key-control input { padding-right: 61px; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 12px; }
.ctcl-st-reveal { position: absolute; right: 7px; border: 0; background: #f4f2fa; color: #605783; border-radius: 5px; padding: 5px 8px; font-size: 10px; cursor: pointer; }
.ctcl-st-reveal:hover { background: #eae6fa; }
.ctcl-st-webhook input { font-size: 11px !important; color: #61577d !important; background: #f8f7fc !important; }
.ctcl-st-webhook > a { display: inline-block; margin-top: 9px; font-size: 11px; font-weight: 600; }
.ctcl-st-preview { padding: 32px; border-left: 1px solid #eeedf4; background: #f8f7fc; min-width: 0; }
.ctcl-st-preview-card { padding: 23px; border: 1px solid #e2dfef; border-radius: 15px; box-shadow: 0 8px 24px #25204406; background: #fff; margin-top: 20px; }
.ctcl-st-preview-top { display: flex; gap: 10px; align-items: center; font-weight: 650; color: var(--st-ink); }
.ctcl-st-card-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; background: #efecff; color: #635bce; font-size: 22px; }
.ctcl-st-preview-label { flex: 1; overflow-wrap: anywhere; }
.ctcl-st-check { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #635bff; color: #fff; font-size: 11px; }
.ctcl-st-preview-card > p { color: var(--st-muted); margin: 11px 0 18px; font-size: 11px; }
.ctcl-st-preview-tabs { display: flex; gap: 8px; margin-bottom: 17px; }
.ctcl-st-preview-tabs span { flex: 1; text-align: center; font-size: 10px; padding: 8px 3px; border: 1px solid #e6e3f0; border-radius: 7px; color: #676279; }
.ctcl-st-preview-tabs span:first-child { color: #5147ce; background: #f7f5ff; border-color: #bcb6f8; }
.ctcl-st-preview-input, .ctcl-st-preview-inputs > div { border: 1px solid #dedbe7; border-radius: 7px; padding: 10px 12px; color: #898398; font-size: 11px; }
.ctcl-st-preview-input { display: flex; justify-content: space-between; }
.ctcl-st-preview-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ctcl-st-preview-pay { display: flex; justify-content: space-between; background: #635bff; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 600; padding: 11px 14px; margin: 22px 0 14px; }
.ctcl-st-preview-card .ctcl-st-powered { text-align: center; font-size: 10px; margin: 0; }
.ctcl-st-powered strong { color: #605783; font-size: 14px; letter-spacing: -.5px; margin-left: 4px; }
.ctcl-stripe-settings .ctcl-st-preview-note { color: var(--st-muted); font-size: 10px; text-align: center; margin: 13px 12px 0; line-height: 1.7; }
.ctcl-st-environment { margin-top: 30px; padding: 20px; border-top: 1px solid #e3dfed; }
.ctcl-st-env-label { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: #76669b; }
.ctcl-st-environment h4 { margin: 8px 0; font-size: 14px; }
.ctcl-st-environment p { color: var(--st-muted); font-size: 11px; }
.ctcl-st-environment .ctcl-st-currency { margin-top: 15px; font-size: 10px; }
.ctcl-st-save-status { padding: 18px 36px 0; color: var(--st-muted); font-size: 11px; }
.ctcl-st-save-status.is-dirty { color: #8c5c16; }
.ctcl-st-form .ctcl-form-submit-button { padding: 14px 36px 24px; border-top: 0; margin: 0; }
.ctcl-st-form .ctcl-form-submit-button .button-primary { background: #635bff; border-color: #635bff; border-radius: 8px; padding: 5px 19px; font-size: 12px; font-weight: 600; min-height: 40px; }
.ctcl-st-form .ctcl-form-submit-button .button-primary:hover { background: #5147ce; border-color: #5147ce; }
@media (max-width: 1000px) { .ctcl-st-layout { grid-template-columns: minmax(0,1.35fr) minmax(240px,1fr); } .ctcl-st-fields,.ctcl-st-preview { padding: 26px; } }
@media (max-width: 700px) { .ctcl-st-layout { grid-template-columns: 1fr; } .ctcl-st-preview { border-left: 0; border-top: 1px solid #eeedf4; } .ctcl-st-hero { padding: 25px; flex-wrap: wrap; gap: 20px; } .ctcl-st-hero-copy { min-width: 200px; } .ctcl-st-hero h2 { font-size: 22px; } .ctcl-st-save-status { padding: 18px 26px 0; } .ctcl-st-form .ctcl-form-submit-button { padding: 14px 26px 24px; } }
@media (prefers-reduced-motion: reduce) { .ctcl-st-switch,.ctcl-st-switch::after { transition: none; } }

@media (min-width: 1100px) { .ctcl-st-credential-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; } .ctcl-st-credentials { padding: 15px; } .ctcl-st-credential-heading { flex-wrap: wrap; gap: 5px; } }
