/* The ONE look of a wrong setting (js/field-marks.js). Nothing is framed and nothing moves: the wrong box's OWN edge turns red with a soft ring, its label turns
   red, and one small plain line with the reason sits in the free space right under it. Neighbouring wrong boxes never touch each other. A reason too long for the
   box is cut with "…" and opens in full on hover, focus or a tap. */
.err-field{position:relative;}
.err-over{display:contents;}
.err-field > .sm-label, .err-field > .pfw-ll .pfw-l, .err-field > .pf-label label, .err-field > .xslot-head .xslot-title{color:var(--danger,#ff5252);}
/* A box is red ONLY when it carries its own mark (red edge, red label and the reason). The older styles that turned every box inside a flagged section red --
   with no label and no reason -- are switched off */
:is(#simpleForm,#paramsForm,#fileSlots,#inputChoice) :is(.has-error,.req-missing) :is(input,select,textarea,.pl-select-trigger,.sm-in,.sm-opts,.sm-colors):not(.err-ctl){border-color:var(--border) !important;}
:is(#simpleForm,#paramsForm,#fileSlots,#inputChoice) :is(.has-error,.req-missing) .xslot-drop:not(.err-ctl){border-color:var(--border-strong,var(--border)) !important;}
/* a drop-down the page dresses after the mark was made */
:is(#simpleForm,#paramsForm) .err-field > .pl-select > .pl-select-trigger, :is(#simpleForm,#paramsForm) .err-field > .pf-input > .pl-select > .pl-select-trigger{border-color:var(--danger,#ff5252) !important;box-shadow:0 0 0 2px color-mix(in srgb, var(--danger,#ff5252) 28%, transparent) !important;}
/* the control itself: its edge changes colour (never its width); the ring is a shadow, which takes no room */
.err-ctl:is(input,textarea,select,.pl-select-trigger,.sm-in,.xslot-drop,.xslot-file), .err-field .err-ctl:is(input,textarea,.pl-select-trigger){border-color:var(--danger,#ff5252) !important;box-shadow:0 0 0 2px color-mix(in srgb, var(--danger,#ff5252) 28%, transparent) !important;}
.err-ctl:is(.sm-opts,.sm-colors,.pfw-chips,.ic-seg){border-radius:12px;box-shadow:0 0 0 1px var(--danger,#ff5252), 0 0 0 3px color-mix(in srgb, var(--danger,#ff5252) 22%, transparent);}
.err-inline{position:absolute;z-index:5;left:0;right:0;top:calc(100% + 3px);display:flex;align-items:center;gap:5px;height:15px;color:var(--danger,#ff5252);font-size:11.5px;font-weight:600;line-height:15px;cursor:default;}
.err-inline svg{flex:none;width:12px;height:12px;}
.err-inline span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.err-inline:hover, .err-inline:focus-visible{z-index:30;height:auto;align-items:flex-start;padding:4px 8px;left:-8px;right:-8px;border-radius:8px;background:var(--surface,#171a22);box-shadow:0 6px 18px rgba(0,0,0,.35);outline:none;}
.err-inline:hover svg, .err-inline:focus-visible svg{margin-top:1.5px;}
.err-inline:hover span, .err-inline:focus-visible span{white-space:normal;overflow-wrap:anywhere;}
#simpleForm:has(.err-field), #paramsForm:has(.err-field){overflow-x:visible;}
/* the older marks of the same problem are not drawn a second time (their text would take room) */
.req-missing{outline:none !important;}
.err-field > .sm-err, .err-field > .pf-err{display:none;}
/* the banners keep their four sides on every screen, also where the parameters take the whole page */
#rightPanel > .check-banner, #rightPanel > .error-banner, body.no-file-op:not(.result-mode) #rightPanel > .check-banner, body.no-file-op:not(.result-mode) #rightPanel > .error-banner{width:calc(100% - 28px) !important;max-width:880px;margin-left:auto !important;margin-right:auto !important;align-self:center;box-sizing:border-box;overflow-wrap:anywhere;}
@media (forced-colors:active){.err-ctl{outline:2px solid Mark;}}

/* Every row of a form keeps room for that one line ALL the time: the reason sits close under its own box with clear space before the next label, and nothing
   shifts when it appears */
.pfw .pfw-grid, .pfw .sf-pair{row-gap:26px;}
.pfw .pfw-card{padding-bottom:24px;}
.pfw .pfw-card > .pfw-grid ~ *{margin-top:18px;}
#simpleForm .sm-form, #simpleForm{row-gap:26px;}
#simpleForm .sm-details > .sm-field{margin-bottom:26px;}
#paramsForm .pf-field, #paramsForm .pf-group .pf-field{margin-bottom:26px;}
/* the fields moved under a choice of inputs ("One thing / A list") keep the same room */
#simpleForm .ex-body, #paramsForm .ex-body{row-gap:26px;}
.err-inline{top:calc(100% + 3px);height:14px;line-height:14px;}
