/* BuySystem front UI — unified with the AllAutoInfo templates.
   Uses template tokens (--surface, --text, --line, --accent...) with safe fallbacks. */
.ui-dialog.modalfixed{padding:0;overflow:hidden;border:0;border-radius:var(--r-xl,18px)!important;background:var(--surface,#fff)!important;color:var(--text,#1c1b1d);box-shadow:var(--shadow-menu,0 20px 60px rgba(0,0,0,.35));max-width:calc(100vw - 1.5rem)}
.ui-dialog.modalfixed .ui-dialog-titlebar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:1rem 1.25rem .25rem;background:transparent;border:0}
.ui-dialog.modalfixed .ui-dialog-title{float:none;margin:0;font:700 1.05rem/1.3 var(--font-display,system-ui,sans-serif);white-space:normal}
.ui-dialog.modalfixed .ui-dialog-titlebar-close{position:static;margin:0;width:2rem;height:2rem;border:var(--hair,1px) solid var(--line,#e5e1e3);border-radius:50%;background:var(--surface-soft,#f5f3f4);padding:0;transform:none}
.ui-dialog.modalfixed .ui-dialog-content{padding:.5rem 1.25rem 1.25rem;overflow:auto;max-height:80vh}
.ui-dialog.modalfixed .ui-dialog-buttonpane{margin:0;padding:.75rem 1.25rem 1.25rem;border:0;background:transparent}
.ui-dialog.modalfixed .ui-dialog-buttonset{display:flex;gap:.5rem;justify-content:flex-end;flex-wrap:wrap}

#dlebuypopup{font:400 var(--fs-ui,.95rem)/1.5 var(--font-body,system-ui,sans-serif);color:var(--text,#1c1b1d)}
.ui-dialog #dlebuypopup{max-width:none;width:auto!important;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}
#dlebuypopup br:first-child{display:none}
#dlebuypopup center{display:block;text-align:left}
#dlebuypopup h3,.buySystem h3{margin:0 0 .75rem;font:700 1.05rem/1.3 var(--font-display,system-ui,sans-serif)}
#dlebuypopup ol,.buySystem ol{list-style:none;margin:0;padding:0;display:grid;gap:1rem}
#dlebuypopup li,.buySystem li{margin:0;padding:0;list-style:none}
#dlebuypopup dt,.buySystem dt{font-weight:600;margin:0 0 .35rem}
#dlebuypopup dd,.buySystem dd{margin:.25rem 0;color:var(--muted,#6f6a6d);font-size:.88rem}
#dlebuypopup p{margin:.5rem 0}

/* payment systems */
.bs-payments{display:grid;grid-template-columns:repeat(auto-fill,minmax(9.5rem,1fr));gap:.5rem}
.bs-payments .payment-option{position:relative;display:flex;align-items:center;gap:.55rem;margin:0;padding:.65rem .8rem;border:var(--hair,1px) solid var(--line,#e5e1e3);border-radius:var(--r-lg,12px);background:var(--surface-soft,#f7f5f6);color:inherit;cursor:pointer;transition:border-color .15s,background .15s}
.bs-payments .payment-option:hover{border-color:var(--accent,#8b7b83)}
.bs-payments .payment-option:has(input:checked){border-color:var(--accent-strong,#5f4f57);background:var(--accent-soft,#ece6e9);box-shadow:inset 0 0 0 1px var(--accent-strong,#5f4f57)}
.bs-payments .payment-option input[type=radio]{accent-color:var(--accent-strong,#5f4f57);margin:0;flex:none}
.bs-payments .payment-option .title,.bs-payments .payment-option span{font-weight:600;font-size:.9rem;line-height:1.25}
.bs-payments .payment-option img{max-height:1.4rem;width:auto}

/* controls */
.buySystem input[type=text],.buySystem input[type=number],.buySystem input[type=email],.buySystem select,
#dlebuypopup input[type=text],#dlebuypopup input[type=number],#dlebuypopup input[type=email],#dlebuypopup select{width:100%;max-width:100%;box-sizing:border-box;min-height:var(--control-h,2.6rem);padding:0 .8rem;border:var(--hair,1px) solid var(--line,#e5e1e3);border-radius:var(--r-lg,12px);background:var(--surface,#fff);color:var(--text,#1c1b1d);font:inherit}
.buySystem input:focus,#dlebuypopup input:focus,#dlebuypopup select:focus{outline:2px solid var(--accent,#8b7b83);outline-offset:1px}
.buySystem .input-mini{width:6.5rem}.buySystem .input-midi,#dlebuypopup .input-midi{width:12rem;max-width:100%}.buySystem .input-maxi{width:100%}
.buySystem .btn,#dlebuypopup .btn,#dlebuypopup input[type=submit],#dlebuypopup button[type=submit],.ui-dialog.modalfixed .ui-button{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:var(--control-h,2.6rem);padding:0 1.25rem;border:0;border-radius:var(--r-lg,12px);background:var(--accent-strong,#5f4f57);color:var(--accent-ink,#fff);font:600 .95rem/1 var(--font-body,system-ui,sans-serif);cursor:pointer;width:auto;transition:background .15s}
.buySystem .btn:hover,#dlebuypopup .btn:hover,#dlebuypopup input[type=submit]:hover,.ui-dialog.modalfixed .ui-button:hover{background:var(--accent,#8b7b83);color:var(--accent-ink,#fff)}
.ui-dialog.modalfixed .ui-button[disabled],#dlebuypopup .btn[disabled]{opacity:.6;cursor:default}
.ui-dialog.modalfixed .ui-button-icon-only{background:transparent;color:inherit}
.buySystem .label,.buySystem .label-info{display:inline-block;padding:.1rem .55rem;border-radius:var(--r-pill,99px);background:var(--accent-soft,#ece6e9);color:var(--text,#1c1b1d);font-size:.78rem;font-weight:600}

/* redirect / status screens */
#inputshow{color:var(--muted,#6f6a6d)}
#dlebuypopup #inputsubmit{min-width:10rem}
.buySystem table{width:100%;border-collapse:collapse;font-size:.88rem}
.buySystem table th,.buySystem table td{padding:.5rem .6rem;text-align:left;border-bottom:var(--hair,1px) solid var(--line,#e5e1e3)}
.buySystem table th{color:var(--muted,#6f6a6d);font-weight:600}
.buySystem table tbody tr:hover td{background:var(--surface-soft,#f7f5f6)}
.buysystem,.buysystemdiv{color:inherit}
@media (max-width:520px){.ui-dialog.modalfixed .ui-dialog-content{padding:.25rem 1rem 1rem}.bs-payments{grid-template-columns:1fr 1fr}}
