
/* Errors remain visible until corrected or retried; never toast-only. */
.cg-error-summary:not(:empty){display:block;border:2px solid #b42318;border-left-width:6px;background:#fff1f0;color:#7a1812;border-radius:8px;padding:14px 16px;margin:12px 0 20px;font-size:14px;line-height:1.5;scroll-margin:100px;outline-offset:3px;overflow-wrap:anywhere}
.cg-error-summary:not(:empty)::before{content:"Não foi possível continuar";display:block;font-weight:700;margin-bottom:4px}
.cg-error-summary:empty{display:none}
.cg-error-summary .error{padding:0;margin:0;background:none;border:0}
[aria-invalid="true"]{border:2px solid #b42318!important;background:#fff8f7!important}
.cg-field-error{display:block;color:#a21b15;font-size:12px;margin-top:5px;line-height:1.4}
.cg-law-dialog{max-width:640px;width:calc(100vw - 40px);max-height:80vh;border:1px solid #ccd8e2;border-radius:12px;padding:24px;color:#153047}
.cg-law-dialog::backdrop{background:#10233480}
.cg-law-dialog p{line-height:1.6}.cg-law-dialog h2{margin-top:0}

#dialog .dialog-head h2{flex:1;min-width:0}#dialog .dialog-head [data-context-help]{flex-shrink:0;margin-left:auto}#dialog .dialog-head{gap:10px}.errorlist.cg-error-summary{list-style-position:inside}

.law-field{display:grid;grid-template-columns:minmax(0,1fr) 28px;gap:8px;align-items:end;min-width:0}.law-field>label{min-width:0;margin:0}.law-hint{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;min-width:26px;padding:0;margin:0 0 8px;border:1px solid #b8c8d5;border-radius:50%;background:transparent;color:#456478;font-family:inherit;font-size:13px;font-weight:600;line-height:1;cursor:pointer}.law-hint:hover{background:#e7f1f8;color:#164463}.law-hint:focus-visible{outline:2px solid #216c98;outline-offset:3px}

/* Keep legal hints outside the control width and on the label baseline. */
:is(#main,#dialog) .law-field{display:block;position:relative;align-self:start;margin:0 0 15px;padding:0;min-width:0}:is(#main,#dialog) .law-field>label{margin:0;min-width:0}:is(#main,#dialog) .law-field>.law-hint{position:absolute;top:-4px;right:0;width:22px;height:22px;min-width:22px;margin:0;font-size:12px}:is(#main,#dialog) .law-field input,:is(#main,#dialog) .law-field select,:is(#main,#dialog) .law-field textarea{width:100%}
