/* Compact checkout styled to match the current public marketplace. */
#buyModal.modal{
 position:fixed!important;inset:0!important;width:100%!important;height:100%!important;
 max-height:none!important;margin:0!important;padding:20px!important;background:none!important;
 overflow-y:auto!important;display:none;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
 color:#1d263e;font-size:13px;line-height:1.5;
}
#buyModal.modal.show,#buyModal.modal.in{display:flex!important;align-items:center}
#buyModal .modal-dialog{width:100%;max-width:380px;margin:auto!important;min-height:0!important;display:block}
#buyModal .modal-content{
 width:100%;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow:auto;
 border:1px solid #e7dff0;border-radius:14px;box-shadow:0 20px 65px rgba(30,15,52,.18);
 color:#1d263e;background:#fff;
}
#buyModal .modal-header{
 display:flex;align-items:center;justify-content:space-between;gap:12px;
 padding:14px 18px;border-bottom:1px solid #eee8f5;
 background:linear-gradient(110deg,#fcfaff,#f5effd);border-radius:13px 13px 0 0;
}
#buyModal .modal-title{margin:0;padding:0;font-family:inherit;font-size:18px;font-weight:650;line-height:1.35;letter-spacing:-.3px;color:#251c38}
#buyModal .modal-header p{margin:5px 0 0;font-size:12px;line-height:1.5;color:#737085}
#buyModal .close{
 display:flex;align-items:center;justify-content:center;float:none;margin:0;padding:0;
 width:30px;height:30px;flex:0 0 30px;border:1px solid #e9dff3;border-radius:8px;
 opacity:1;color:#766980;background:#fff;font-family:inherit;font-weight:400;
 font-size:23px;line-height:1;cursor:pointer;box-shadow:none;
}
#buyModal .close span{position:static;top:auto;display:block;line-height:1}
#buyModal .close:hover{color:#6315b8;background:#f5effb;border-color:#d6c1eb}
#buyModal .modal-body{padding:18px}
#buyModal .sac-payment-item{
 display:flex;gap:12px;align-items:center;margin:0 0 16px;padding:0;
 border:0;background:transparent;text-align:left;
}
#buyModal .sac-payment-item img{width:42px;height:42px;flex:0 0 42px;object-fit:cover;border-radius:8px;border:1px solid #e7e1ee}
#buyModal .sac-payment-item>div{min-width:0}
#buyModal .sac-payment-item h6{
 padding:0;font-family:inherit;font-size:13px;line-height:1.45;font-weight:600;
 margin:0 0 3px;overflow-wrap:anywhere;color:#27304a;letter-spacing:-.1px;
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
}
#buyModal #sac-payment-license{display:block;font-size:11px;line-height:1.5;color:#7b7387}
#buyModal .sac-payment-total{
 display:flex;align-items:center;justify-content:space-between;gap:14px;
 border:0;border-top:1px solid #eee8f5;padding:14px 0 0;margin:0 0 16px;
 font-size:12px;color:#70677d;
}
#buyModal .sac-payment-total strong{font-size:22px;line-height:1.2;color:#6315b8;font-weight:700;letter-spacing:-.5px;white-space:nowrap}
#buyModal .sac-payment-method{display:flex;gap:10px;align-items:center;margin:0 0 18px;text-align:left}
#buyModal .sac-payment-method>div{min-width:0}
#buyModal .sac-payment-symbol{
 display:flex;align-items:center;justify-content:center;width:34px;height:34px;
 flex:0 0 34px;border:1px solid #e8dcf4;border-radius:9px;background:#f5effb;color:#6315b8;font-size:21px;
}
#buyModal .sac-payment-method strong{display:block;font-size:13px;font-weight:600;line-height:1.4;color:#27304a}
#buyModal .sac-payment-method div>span{display:block;color:#7b7387;font-size:11px;line-height:1.5;margin-top:2px}
#buyModal #payment-form-passimpay{margin:0}
#buyModal .sac-payment-button{
 display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:40px;
 margin:0 0 3px;padding:10px 15px;border:1px solid #6716bd;border-radius:8px;
 background:#7017d9;color:#fff;font-family:inherit;font-weight:600;font-size:13px;
 line-height:1.4;cursor:pointer;transition:background .15s;
}
#buyModal .sac-payment-button:hover{background:#5d10ba;border-color:#5d10ba}
#buyModal .sac-payment-button:disabled{opacity:.65;cursor:wait}
#buyModal .sac-payment-button:focus-visible,#buyModal .close:focus-visible{outline:3px solid #c8a3ef;outline-offset:3px}
#buyModal #sac-payment-error:empty{display:none}
#buyModal #sac-payment-error{margin:12px 0 0;padding:10px 12px;border:1px solid #ead4d8;border-radius:8px;background:#fff7f8;color:#9b3546;font-size:12px;line-height:1.5;text-align:left}
#buyModal .sac-payment-redirect{font-size:11px;line-height:1.5;text-align:center;color:#7b7387;margin:10px 0 0}
#buyModal .modal-footer{
 display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:7px;
 padding:12px 18px;border-top:1px solid #eee8f5;background:#faf8fd;
 color:#7b7387;font-size:11px;line-height:1.5;text-align:left;border-radius:0 0 13px 13px;
}
#buyModal .modal-footer svg{width:14px;height:14px;flex:0 0 14px;color:#85679e}
#buyModal .modal-footer>span{margin:0}
@media(max-width:480px){
 #buyModal.modal{padding:12px!important}
 #buyModal .modal-content{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
 #buyModal .modal-header{padding:15px 16px}
 #buyModal .modal-body{padding:16px}
 #buyModal .sac-payment-item{padding:0}
 #buyModal .modal-footer{padding:11px 16px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){#buyModal .sac-payment-button{transition:none}}

/* Dedicated SVG dismiss control avoids legacy text-close positioning. */
#buyModal .sac-payment-close{
 display:flex;align-items:center;justify-content:center;flex:0 0 34px;
 width:34px;height:34px;margin:0;padding:0;border:0;border-radius:7px;
 background:transparent;color:#766980;cursor:pointer;box-shadow:none;
}
#buyModal .sac-payment-close svg{display:block;width:18px;height:18px;pointer-events:none}
#buyModal .sac-payment-close:hover{background:#eee6f8;color:#6315b8}
#buyModal .sac-payment-close:focus-visible{outline:2px solid #a773db;outline-offset:2px}
#buyModal .sac-payment-button{box-shadow:inset 0 1px 0 #ffffff30,0 2px 0 #49108a!important}
