/* Shared validation colors, loaded after page-specific label styles. */
body[class] .cform .hs-form-field > .hs-error-msgs {
  position: relative !important;
  inset: auto !important;
  display: inline-block !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 8px 0 0 !important;
  padding: 4px 12px !important;
  overflow-wrap: anywhere;
  background-color: #bf012d !important;
  color: #fff !important;
}

body[class] .cform .hs-form-field > .hs-error-msgs:empty {
  display: none !important;
}

body[class] .cform .hs-form-field > .hs-error-msgs::before {
  content: "";
  position: absolute;
  top: auto !important;
  right: auto !important;
  bottom: 100%;
  left: 16px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-top-color: transparent !important;
  border-bottom-color: #bf012d !important;
  pointer-events: none;
}

/* HubSpot injects labels after the page has loaded. Page label rules must
   never turn these white letters into dark or red letters on the red bubble. */
body[class] .cform .hs-form-field > .hs-error-msgs :is(li, label, .hs-error-msg, span, a) {
  color: #fff !important;
}

/* Consent errors stay inline, without a colored bubble. */
body[class] .cform .legal-consent-container .hs-error-msgs {
  position: static !important;
  padding: 0 !important;
  background: transparent !important;
  color: #bf012d !important;
}

body[class] .cform .legal-consent-container .hs-error-msgs::before {
  display: none !important;
}

body[class] .cform .legal-consent-container .hs-error-msgs :is(li, label, .hs-error-msg, span, a) {
  color: #bf012d !important;
}

/* Keep all four focus edges inside fields, including scrollable hero forms. */
body[class]:is(.page-training, .page-ux-workshop, .page-ai-ux-sprint) .cform .hs-input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: 2px solid #bf012d;
  outline-offset: -2px;
}
