/* Local extension: preserve the console's tokens and native dialog behavior. */
body.console-active #appView #rechargeButton { width: auto; min-height: 44px; padding: 10px 16px; gap: 6px; background: var(--color-accent); color: var(--color-accent-ink); border-color: transparent; font-weight: 700; flex-shrink: 0; }
body.console-active #appView #rechargeButton .button-label { display: inline; white-space: nowrap; }
body.console-active #appView #rechargeButton:hover { background: var(--color-accent-hover); color: var(--color-accent-ink); }
body.console-active #appView #rechargeButton:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
@media (max-width: 600px) { body.console-active #appView #rechargeButton { padding-inline: 10px; } body.console-active #appView #rechargeButton .ui-icon { display: none; } }
#rechargeDialog { width: min(35rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; }
#rechargeDialog .dialog-body { padding: clamp(1rem, 4vw, 1.75rem); }
.online-recharge { color: var(--color-ink); }
.online-recharge-intro { margin: 0 0 1.25rem; color: var(--color-muted); line-height: 1.6; }
#onlineRechargeForm { display: grid; gap: .75rem; }
#onlineRechargeForm[hidden], .online-recharge [hidden] { display: none; }
#onlineRechargeForm label { font-weight: 650; }
#onlineRechargeAmount { width: 100%; min-height: 3rem; padding: .75rem; box-sizing: border-box; border: 1px solid var(--color-rule-2); border-radius: var(--radius-sm); background: var(--color-paper); color: var(--color-ink); font: inherit; font-size: 1rem; caret-color: var(--color-accent); }
#onlineRechargeAmount[aria-invalid="true"] { border-color: var(--color-error); }
.online-recharge :focus-visible, .online-recharge-help summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.online-recharge ::selection { background: var(--color-accent-soft-2); color: var(--color-ink); }
.online-recharge .button { min-height: 2.75rem; }
.online-recharge-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.online-recharge-presets .button { padding-inline: .5rem; }
.online-recharge-muted { color: var(--color-muted); font-size: .875rem; line-height: 1.6; margin: .35rem 0; overflow-wrap: anywhere; }
.online-recharge-notice { padding: .8rem 0; margin: .5rem 0; line-height: 1.6; overflow-wrap: anywhere; }
.online-recharge-notice[data-state="error"] { color: var(--color-error-ink); }
.online-recharge-notice[data-state="success"] { color: var(--color-success-ink); }
.online-recharge-history { border-top: 1px solid var(--color-rule); padding-top: 1.1rem; margin-top: .5rem; }
.online-recharge-history-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.online-recharge-history h3 { font-size: 1rem; margin: 0; }
.online-recharge-history-head .button { font-size: .875rem; padding-inline: .75rem; flex-shrink: 0; }
#onlineRechargeOrders { max-height: 22rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--color-rule-2) transparent; }
.online-recharge-order { padding: 1rem 0; border-bottom: 1px solid var(--color-rule); }
.online-recharge-order:last-child { border-bottom: 0; }
.online-recharge-order-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.online-recharge-order-head strong { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.online-recharge-order-head span { font-size: .875rem; }
.online-recharge-order[data-status="paid"] .online-recharge-order-head span { color: var(--color-success-ink); }
.online-recharge-order[data-status="held"] .online-recharge-order-head span { color: var(--color-warning-ink); }
.online-recharge-order > p { margin: .3rem 0; line-height: 1.6; overflow-wrap: anywhere; }
.online-recharge-order-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.online-recharge-order-actions .button { font-size: .875rem; }
.online-recharge-help { border-top: 1px solid var(--color-rule); margin-top: 1rem; padding-top: .5rem; }
.online-recharge-help summary { padding: .8rem 0; min-height: 2.75rem; box-sizing: border-box; cursor: pointer; color: var(--color-ink-2); }
.online-recharge-help .recharge-layout { padding-top: .5rem; }
@media (prefers-reduced-motion: no-preference) { .online-recharge-order[data-status="paid"] { animation: recharge-confirmed 240ms var(--ease-out); } @keyframes recharge-confirmed { from { background: var(--color-success-soft); } to { background: transparent; } } }
@media (max-width: 25rem) { .online-recharge-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .online-recharge-presets .button:first-child { grid-column: 1 / -1; } .online-recharge-order-actions .button { flex: 1; } }
