

dialog:has(.offer-editor){width:780px;max-width:calc(100vw - 32px)}
.offer-editor{color:var(--ink)}
.offer-editor header p{font-size:12px;margin:0 0 6px}.offer-editor header h2{margin:0 0 24px}
.offer-editor .ws-form{display:block}.offer-section{padding:20px 0;border-top:1px solid var(--line)}
.offer-section>label,.offer-section>.form-pair{margin-bottom:20px}
.offer-section label small{font-size:11px;font-weight:400;color:var(--muted);line-height:1.7}
.offer-status{border:0;padding:0;margin:0;display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.offer-status legend{font-size:13px;margin-bottom:10px;font-weight:600}
.offer-status label{display:flex;flex-direction:row;align-items:center;gap:6px;font-weight:400;font-size:13px}
.offer-status input{width:16px;height:16px;min-height:0;margin:0;accent-color:var(--blue)}
.offer-status small{width:100%;color:var(--muted);font-size:11px}
.offer-body-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.offer-body-heading h3{margin:0;font-size:14px}
.offer-view-switch{display:flex;gap:2px;padding:3px;border-radius:8px;background:var(--wash);border:1px solid var(--line)}
.offer-view-switch button{padding:6px 10px;border-radius:5px;font-size:12px;color:var(--muted)}
.offer-view-switch button[aria-pressed=true]{background:var(--paper);color:var(--ink);box-shadow:0 1px 3px #0001}
.offer-format{display:flex;gap:3px;align-items:center;flex-wrap:wrap;padding:8px;background:var(--wash);border:1px solid var(--line);border-radius:10px 10px 0 0}
.offer-format button{min-width:30px;min-height:32px;padding:5px 7px;border-radius:5px;font-size:12px;color:var(--ink)}
.offer-format button:hover{background:var(--line)}
.offer-color{position:relative;padding:5px 8px;border-bottom:3px solid currentColor;font-size:13px;cursor:pointer}
.offer-color input{position:absolute;inset:0;width:100%;height:100%;min-height:0;opacity:0;cursor:pointer}
.offer-rich{font-size:14px;line-height:1.9;overflow-wrap:anywhere;color:var(--ink)}
.offer-rich img,.offer-rich video{max-width:100%;height:auto;display:block;margin:12px 0}
.offer-rich a{color:var(--blue-dark);text-decoration:underline}.offer-rich ul,.offer-rich ol{padding-left:24px}.offer-rich h2{font-size:22px}.offer-rich p{margin:0 0 12px}
#offer-body,#offer-preview-body{min-height:220px;border:1px solid var(--line);padding:18px;border-radius:0 0 10px 10px;background:var(--paper)}
#offer-body{border-top:0;outline:none}#offer-body:focus{box-shadow:inset 0 0 0 2px var(--blue)}
#offer-preview-body{border-radius:10px}
#offer-media{display:flex;gap:8px;align-items:end;padding:12px;background:var(--wash);border-inline:1px solid var(--line)}
#offer-media label{flex:1;min-width:0;font-size:12px}#offer-media button{padding:10px 8px;white-space:nowrap;font-size:12px;color:var(--blue-dark)}
.offer-editor [hidden]{display:none!important}
#offer-plan-preview{margin-top:18px;padding:22px;text-align:center;border:1px solid var(--line);border-radius:10px;background:var(--wash)}
#offer-plan-preview>small,#offer-plan-preview p{font-size:12px;color:var(--muted)}#offer-plan-preview h3{margin:6px 0;font-size:16px}#offer-plan-preview strong{display:block;font-size:26px;margin:14px 0;font-variant-numeric:tabular-nums}#offer-plan-preview strong small{font-size:11px;font-weight:400}#offer-plan-preview button{width:100%;max-width:280px}
.offer-contract-note{margin-top:16px;color:var(--muted);font-size:12px;line-height:1.9}.offer-contract-note summary{cursor:pointer}
.offer-local-note{font-size:11px;color:var(--muted);line-height:1.8}.offer-warning{font-size:12px;color:var(--blue-dark)}
.offer-footer{position:sticky;bottom:-28px;display:flex;justify-content:flex-end;gap:8px;padding:16px 0;background:var(--paper);border-top:1px solid var(--line);margin-top:16px;z-index:2}
@media(max-width:800px){

 dialog:has(.offer-editor){max-width:100%;width:100%;max-height:100dvh;margin:auto 0 0;padding:20px 16px;border-radius:16px 16px 0 0}
 .offer-editor header h2{font-size:19px;margin-bottom:18px}.offer-section{padding:18px 0}.offer-section .form-pair{grid-template-columns:1fr}
 .offer-format{gap:2px;padding:6px}.offer-format button{min-height:36px}#offer-body,#offer-preview-body{padding:12px;font-size:16px;min-height:200px}
 .offer-footer{bottom:-20px;padding:12px 0 max(12px,env(safe-area-inset-bottom))}.offer-footer button{flex:1}
}
/* Isolate the form header and labels from the application's global header rules. */
.offer-editor header{display:block;position:static;height:auto;min-height:0;padding:0;border:0;background:transparent}
.offer-section>label,.offer-section .form-pair>label{display:flex;flex-direction:column;gap:8px;min-width:0;font-size:13px;font-weight:500}
.offer-section>label>input,.offer-section .form-pair select{width:100%;min-height:42px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit}
@media(max-width:800px){.offer-section>label>input,.offer-section .form-pair select{font-size:16px}}

/* Keep offer status beside its title, including when the table is narrow. */
.of-title-status{display:grid;gap:7px;justify-items:start}
.of-panel .mgr-table{min-width:0;table-layout:fixed}
.of-panel .mgr-table td{overflow-wrap:anywhere}
.of-panel .mgr-title-link{max-width:100%;overflow-wrap:anywhere}
@media(min-width:651px){
 .of-panel .mgr-table th:nth-child(1){width:36%}
 .of-panel .mgr-table th:nth-child(2){width:auto}
 .of-panel .mgr-table th:nth-child(3){width:72px}
 .of-panel .mgr-table th:nth-child(4){width:56px}
 .of-panel .mgr-table td:first-child{min-width:0;max-width:none}
 .of-panel .mgr-table th:last-child,.of-panel .mgr-table td:last-child{padding-inline:10px}
}
