/* Configuration forms: stable type scale and spacing, independent of legacy modal rules. */
body.sy-form-open{overflow:hidden}
.modal.sy-form-drawer{position:fixed!important;inset:0!important;padding:0!important;align-items:stretch!important;justify-content:flex-end!important;background:rgba(20,28,45,.32);z-index:1100}
.modal.sy-form-drawer .modal-box{margin:0!important;width:520px!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border:0!important;display:flex!important;flex-direction:column!important;background:var(--sy-surface,#fff);box-shadow:-12px 0 40px #16213a16;overflow:hidden}
.modal.sy-form-drawer.sy-form-wide .modal-box{width:720px!important}
.modal.sy-form-drawer .modal-h:first-child{flex:none;padding:22px 24px!important;min-height:72px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line,#e8ebf1)}
.modal.sy-form-drawer .modal-h .t{font-size:18px!important;line-height:26px;font-weight:600!important;color:var(--ink,#272b35)}
.modal.sy-form-drawer .modal-b{padding:24px!important;overflow:auto;flex:1;min-height:0;overscroll-behavior:contain}
.modal.sy-form-drawer .dlg-fields,.modal.sy-form-drawer .form-grid,.modal.sy-form-drawer .sy-account-form-grid{display:grid!important;grid-template-columns:1fr!important;gap:20px 20px!important}
.modal.sy-form-drawer.sy-form-wide .dlg-fields,.modal.sy-form-drawer.sy-form-wide .form-grid,.modal.sy-form-drawer.sy-form-wide .sy-account-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.modal.sy-form-drawer .fld{margin:0!important;min-width:0}.modal.sy-form-drawer .fld.full{grid-column:1/-1}
.modal.sy-form-drawer .fld>label{display:block;margin:0 0 8px!important;font-size:14px!important;font-weight:500!important;color:var(--ink,#272b35);line-height:20px}
.modal.sy-form-drawer label em{font-style:normal;color:#e45159;font-size:13px}
.modal.sy-form-drawer input:not([type=checkbox]):not([type=radio]),.modal.sy-form-drawer select,.modal.sy-form-drawer .sy-select-trigger{height:36px!important;min-height:36px!important;font-size:14px!important;line-height:20px!important;padding:7px 11px!important;border-radius:6px!important;box-shadow:none!important;width:100%;box-sizing:border-box}
.modal.sy-form-drawer textarea{width:100%;min-height:104px;padding:10px 11px!important;font-size:14px!important;line-height:22px!important;border-radius:6px!important;box-sizing:border-box;resize:vertical}
.modal.sy-form-drawer .btn,.modal.sy-form-drawer .ghost-btn,.modal.sy-form-drawer .tbtn{height:36px!important;min-height:36px!important;padding:0 16px!important;font-size:14px!important;line-height:34px!important;width:auto!important;border-radius:6px!important;font-weight:500!important}
.modal.sy-form-drawer .sy-form-close{border:0;background:none;color:var(--ink3,#8d94a3);font-size:26px;line-height:30px;width:32px;height:32px;cursor:pointer;border-radius:6px}.sy-form-close:hover{background:var(--sy-bg,#f5f6fa)}
.modal.sy-form-drawer .sy-form-footer{display:flex!important;flex:none;align-items:center;justify-content:flex-end!important;gap:12px!important;padding:16px 24px!important;min-height:69px;border-top:1px solid var(--line,#e8ebf1);background:var(--sy-surface,#fff);margin:0!important}
.modal.sy-form-drawer .sy-form-footer .btn,.modal.sy-form-drawer .sy-form-footer .ghost-btn{min-width:80px}
.modal.sy-form-drawer .sy-form-group{margin-bottom:28px}.modal.sy-form-drawer .sy-form-group:last-child{margin-bottom:0}.modal.sy-form-drawer .sy-form-group h3{margin:0 0 18px;font-size:14px;font-weight:600;padding-bottom:12px;border-bottom:1px solid var(--line,#e8ebf1)}
.modal.sy-form-drawer small,.modal.sy-form-drawer .live-note,.modal.sy-form-drawer p,.modal.sy-form-drawer .sy-account-field-help{font-size:12px!important;line-height:20px!important;color:var(--ink3,#8992a3)}
.modal.sy-form-drawer .commerce-variant-row{padding:16px;margin-top:20px;border:1px solid var(--line);border-radius:8px}.modal.sy-form-drawer .commerce-checkboxes,.modal.sy-form-drawer .commerce-checkbox{margin:20px 0;font-size:14px}
.modal.sy-form-drawer form{display:flex;flex-direction:column;flex:1;min-height:0}.modal.sy-form-drawer .sy-account-store-picker{margin:20px 0}
.sy-form-error{border:1px solid #f3c6c8;background:#fff5f5;color:#be3942;padding:10px 12px;margin-bottom:20px;font-size:13px;border-radius:6px}.sy-form-error[hidden]{display:none}.sy-field-error{display:block;color:#be3942!important;margin-top:6px}.sy-form-drawer [aria-invalid=true]{border-color:#df5660!important}
#syDiscardForm{position:fixed;inset:0;margin:auto;width:360px;max-width:calc(100vw - 32px);padding:24px;border:1px solid var(--line);border-radius:12px;color:var(--ink);background:var(--sy-surface,#fff)}#syDiscardForm::backdrop{background:#16203550}#syDiscardForm h3{font-size:16px;margin:0 0 12px}#syDiscardForm p{font-size:14px;margin-bottom:24px}#syDiscardForm footer{display:flex;justify-content:flex-end;gap:12px}#syDiscardForm button{font-size:14px;height:36px;padding:0 16px;width:auto}
@media(max-width:600px){.modal.sy-form-drawer.sy-form-wide .form-grid,.modal.sy-form-drawer.sy-form-wide .dlg-fields,.modal.sy-form-drawer.sy-form-wide .sy-account-form-grid{grid-template-columns:1fr!important}.modal.sy-form-drawer .modal-b{padding:20px!important}}
/* Legacy add forms already contain a grid; do not place that grid in half a column. */
.modal.sy-form-drawer .dlg-fields:has(>.form-grid){display:block!important;width:100%!important;max-width:none!important}
.modal.sy-form-drawer .dlg-fields>.form-grid{width:100%!important;max-width:none!important}
.modal.sy-form-drawer .modal-b{max-height:none!important}

/* Independent configuration tasks use a content-sized dialog. Complex editors retain drawers. */
.modal.sy-form-drawer.sy-form-centered{padding:24px!important;align-items:center!important;justify-content:center!important}
.modal.sy-form-drawer.sy-form-centered .modal-box{width:560px!important;max-width:100%!important;height:auto!important;max-height:calc(100dvh - 48px)!important;border:1px solid var(--sy-border,#e4e9f2)!important;border-radius:12px!important;box-shadow:0 20px 64px #16213a26}
.modal.sy-form-drawer.sy-form-centered.sy-form-wide .modal-box{width:860px!important}
.modal.sy-form-drawer.sy-form-centered .modal-h:first-child{padding:16px 24px!important;min-height:60px}
.modal.sy-form-drawer.sy-form-centered .modal-b{flex:0 1 auto;padding:20px 24px!important}
.modal.sy-form-drawer.sy-form-centered .sy-form-footer{padding:12px 24px!important;min-height:61px}
.modal.sy-form-drawer.sy-form-centered .sy-form-group{margin:0 0 20px}
.modal.sy-form-drawer.sy-form-centered .sy-form-group:last-child{margin-bottom:0}
.modal.sy-form-drawer.sy-form-centered .sy-form-group h3{margin:0 0 14px;padding-bottom:8px}
.modal.sy-form-drawer.sy-form-centered .form-grid{gap:16px 24px!important}
@media(max-width:600px){
 .modal.sy-form-drawer.sy-form-centered{padding:12px!important}
 .modal.sy-form-drawer.sy-form-centered .modal-box{max-height:calc(100dvh - 24px)!important}
 .modal.sy-form-drawer.sy-form-centered .modal-h:first-child,.modal.sy-form-drawer.sy-form-centered .modal-b,.modal.sy-form-drawer.sy-form-centered .sy-form-footer{padding:16px!important}
}

@media(min-width:850px){
 .modal.sy-form-drawer.sy-form-wide .sy-customer-form-group>.form-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
 .modal.sy-form-drawer.sy-form-wide .sy-customer-form-group>.form-grid:not(:has(>.fld:nth-child(3))){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
