/* Shared public Field/States rules, scoped to the request, KP and short feedback pages. */
html:root body#top.form-fields-page { --form-error: #b72125; }
html:root[data-theme="dark"] body#top.form-fields-page { --form-error: #ff8888; }
html:root body#top.form-fields-page main#main-content :is(.rq,#kpForm,form[data-short-feedback]) :is(input,textarea,select):not([type="checkbox"]):not([type="hidden"]):not(.rq__trap) {
  min-width: 0 !important;
  width: 100% !important;
  min-height: var(--etl-field-min-height,48px) !important;
  padding: 12px 14px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 4px !important;
  background: var(--ui-page) !important;
  color: var(--ui-ink) !important;
  font: 400 16px/1.45 var(--ui-font) !important;
  box-shadow: none !important;
  appearance: auto;
}
html:root body#top.form-fields-page main#main-content :is(.rq,#kpForm,form[data-short-feedback]) select { appearance: auto !important; }
html:root body#top.form-fields-page main#main-content :is(.rq,#kpForm,form[data-short-feedback]) textarea { --etl-field-min-height: 112px; resize: vertical; }
html:root body#top.form-fields-page main#main-content :is(.rq,#kpForm,form[data-short-feedback]) :is(input,textarea,select):focus-visible {
  outline: 2px solid var(--ui-ink) !important;
  outline-offset: 2px !important;
}
html:root body#top.form-fields-page main#main-content :is(.rq,#kpForm,form[data-short-feedback]) :is(input,textarea,select):not([type="checkbox"]):not([type="hidden"]):not(.rq__trap)[aria-invalid="true"] {
  border-color: var(--form-error) !important;
}
html:root body#top.form-fields-page main#main-content :is(.rq,#kpForm,form[data-short-feedback]) :is(input,textarea,select):disabled {
  opacity: .65;
  cursor: wait;
}
html:root body#top.form-fields-page main#main-content :is(.rq__f > span,.cf-field > label,form[data-short-feedback] label:not(.etl-consent):not(.rate-consent)) {
  color: var(--ui-ink) !important;
  font: 500 14px/1.45 var(--ui-font) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
html:root body#top.form-fields-page main#main-content :is(.rq__row,#kpForm .cf-row) { gap: 16px; margin-bottom: 16px; }
html:root body#top.form-fields-page main#main-content :is(.rq__f,#kpForm .cf-field) { gap: 8px; }
html:root body#top.form-fields-page main#main-content :is(.rq__field-error,.form-field-error) {
  display: block;
  margin: 0;
  color: var(--form-error) !important;
  font: 400 13px/1.5 var(--ui-font) !important;
  text-transform: none;
}
html:root body#top.form-fields-page main#main-content #kpForm .form-field-error { margin-top: 6px; }
html:root body#top.form-fields-page main#main-content .rq__consent-field > .rq__field-error { margin: 6px 0 0 28px; }
html:root body#top.form-fields-page main#main-content :is(.rq__required-note,.form-required-note) {
  margin: 0 0 20px !important;
  color: var(--ui-muted) !important;
  font: 400 13px/1.5 var(--ui-font) !important;
}
html:root body#top.form-fields-page main#main-content :is(.rq__err,.form-feedback) {
  margin: 16px 0 !important;
  padding: 0 0 0 12px !important;
  border: 0 !important;
  border-left: 2px solid var(--form-error) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ui-ink) !important;
  font: 400 14px/1.6 var(--ui-font) !important;
}
html:root body#top.form-fields-page main#main-content .rq__err p { margin: 0 !important; font: inherit !important; color: inherit !important; }
html:root body#top.form-fields-page main#main-content .form-feedback[data-state="sending"] { border-color: var(--ui-line) !important; }
html:root body#top.form-fields-page main#main-content .rq__ai {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ui-muted) !important;
}
html:root body#top.form-fields-page main#main-content :is(.rq--done,.form-confirmed) { scroll-margin-block: 100px 80px; }
html:root body#top.form-fields-page main#main-content .form-confirmed { padding: 24px 0; border-top: 1px solid var(--ui-line); }
html:root body#top.form-fields-page main#main-content .form-confirmed h3 { margin: 0 0 12px; font: 600 26px/1.3 var(--ui-font) !important; }
html:root body#top.form-fields-page main#main-content .form-confirmed p { margin: 12px 0 20px !important; max-width: 55ch; color: var(--ui-muted); font: 400 16px/1.6 var(--ui-font); }
html:root body#top.form-fields-page main#main-content :is(.form-feedback,.form-confirmed,#kpForm,form[data-short-feedback],.form-field-error)[hidden] { display: none !important; }
@media (max-width:600px) {
  html:root body#top.form-fields-page main#main-content #kpForm .cf-row { grid-template-columns: minmax(0,1fr); }
}

html:root body#top.form-fields-page main#main-content .rq .rq__fields { min-width: 0; width: 100%; margin: 0; padding: 0; border: 0; }

/* Short forms share the same fields while keeping each page composition. */
html:root body#top.form-fields-page main#main-content form[data-short-feedback] :is(.cf-row,.form-row) { gap:16px; margin:0 0 20px; }
html:root body#top.form-fields-page main#main-content form[data-short-feedback] :is(.cf-field,.rate-row) { margin-bottom:20px; }
html:root body#top.form-fields-page main#main-content form[data-short-feedback] :is(.cf-row,.form-row) .cf-field { margin-bottom:0; }
html:root body#top.form-fields-page main#main-content form[data-short-feedback] label:not(.etl-consent):not(.rate-consent) { margin-bottom:8px; }
html:root body#top.form-fields-page main#main-content form[data-short-feedback] .form-field-error { margin-top:6px; }
html:root body#top.form-fields-page main#main-content form[data-short-feedback] :is(.etl-consent,.rate-consent) { align-items:start; margin:20px 0; color:var(--ui-ink); font:400 14px/1.6 var(--ui-font); text-transform:none; letter-spacing:0; }
html:root body#top.form-fields-page main#main-content form[data-short-feedback] :is(.etl-consent,.rate-consent) + .form-field-error { margin:-12px 0 20px 28px; }
html:root body#top.form-fields-page main#main-content form[data-short-feedback] input[type="checkbox"] { flex:0 0 20px; width:20px!important; min-width:20px!important; max-width:20px!important; height:20px!important; min-height:20px!important; max-height:20px!important; margin:3px 0 0!important; padding:0!important; accent-color:var(--etl-red); }
html:root body#top.form-fields-page main#main-content form[data-short-feedback] .rate-scale[aria-invalid="true"] .rate-track { outline:1px solid var(--form-error); outline-offset:4px; }
@media (max-width:600px) {
  html:root body#top.form-fields-page main#main-content form[data-short-feedback] :is(.cf-row,.form-row) { grid-template-columns:minmax(0,1fr); }
}
