.payment-method-name,.payment-channel-display{display:inline-flex;align-items:center;gap:8px;vertical-align:middle}
.payment-channel-display{margin:0 0 16px;font-size:14px;font-weight:600;line-height:1.5}
.payment-method-image{display:inline-block;flex:none;vertical-align:middle}
.pay-item>span:has(>.payment-method-image){display:inline-flex;align-items:center;gap:8px}
.payment-add-actions,.payment-icon-editor{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.admin-grid.admin-grid--payment.payment-workspace{grid-template-columns:minmax(0,1fr)}
.payment-callback-settings>summary{cursor:pointer;list-style:none}
.payment-callback-settings>summary::-webkit-details-marker{display:none}
.payment-callback-settings:not([open])>summary{border-bottom:0}
.payment-icon-editor img{object-fit:contain;border:1px solid var(--border,#e2e8f0);border-radius:8px;padding:4px;background:#fff}
#payModal [hidden]{display:none!important}
#payModal .payment-key-field{min-height:80px;max-height:180px;resize:vertical;font-family:monospace;font-size:12px;line-height:1.5;word-break:break-all}
@media(max-width:600px){.payment-add-actions{gap:6px}.payment-add-actions .btn{padding:8px 10px;font-size:12px}}

/* Names and icons are backend configuration data, including long custom names. */
.payment-config-name{min-width:0;flex:1 1 0;white-space:normal;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
#rechargeModal .pay-item{justify-content:flex-start;white-space:normal;min-width:0;max-width:100%}
#rechargeModal .pay-item>input{flex:0 0 auto}

/* Payment choices keep their content width on every screen; long names wrap inside one choice. */
body.theme-yiciyuan :has(> .pay-item) {
  display:flex!important; flex-flow:row wrap!important; align-items:center!important;
  justify-content:flex-start!important; gap:8px!important; min-width:0;
}
body.theme-yiciyuan .pay-item {
  position:relative; display:inline-flex!important; flex:0 0 auto!important;
  flex-direction:row!important; align-items:center!important; justify-content:flex-start!important;
  width:auto!important; min-width:0!important; max-width:100%!important; min-height:40px!important;
  margin:0!important; padding:8px 9px!important; gap:6px!important; box-sizing:border-box;
  font-size:13px!important; line-height:1.4!important; white-space:normal!important; overflow-wrap:anywhere;
}
body.theme-yiciyuan .pay-item > input[type=radio] {
  position:absolute!important; inset:auto!important; width:1px!important; height:1px!important;
  margin:-1px!important; padding:0!important; border:0!important; overflow:hidden!important;
  clip-path:inset(50%); white-space:nowrap;
}
body.theme-yiciyuan .pay-item > span {
  flex:0 1 auto!important; min-width:0; max-width:100%; font-size:inherit!important;
  line-height:inherit!important; white-space:normal!important; overflow:visible!important;
  text-overflow:clip!important; overflow-wrap:anywhere;
}
body.theme-yiciyuan .pay-item .payment-method-image {
  flex:none; width:20px!important; height:20px!important; object-fit:contain;
}
body.theme-yiciyuan .pay-item:has(input:checked) { border-color:var(--c1); box-shadow:inset 0 0 0 1px var(--c1); }
body.theme-yiciyuan .pay-item:has(input:focus-visible) { outline:2px solid var(--c1); outline-offset:2px; }
@media(max-width:767px) {
  body.theme-yiciyuan :has(> .pay-item) { gap:6px!important; }
  body.theme-yiciyuan .pay-item { padding:7px 8px!important; gap:5px!important; font-size:12px!important; }
}
