/* Tribunal enquiry forms: error text, status banners, and layout for the
   captcha that the site's existing assets/captcha.js injects.
   Label/input look still comes from each page's own .tr-hero__form rules. */
.tr-hero__form form.tr-enquiry-form .full,
.tr-hero__form form.tr-enquiry-form .xbc-captcha-field { grid-column: 1 / -1; }

/* honeypot: off-screen (not display:none, which some bots skip) */
.tf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* inline errors (same class names the old forms use) */
.tr-enquiry-form .field-error { display: none; font-family: var(--body, system-ui, sans-serif); font-size: 13px;
  font-weight: 600; letter-spacing: 0; text-transform: none; color: #d64545; line-height: 1.3; }
.tr-enquiry-form .field-error.show { display: block; }
.tr-enquiry-form .has-error input,
.tr-enquiry-form .has-error select,
.tr-enquiry-form .has-error textarea { border-color: #d64545; }

/* keep the page's big button/input styles from distorting the old captcha widget */
.tr-hero__form .xbc-captcha-refresh { grid-column: auto; width: 40px; height: 40px; padding: 0; font-size: 18px;
  border: 1.5px solid #DCD6C6; background: #fff; border-radius: 6px; justify-content: center; }
.tr-hero__form .xbc-captcha-input { font-size: .9rem; padding: 11px 13px; border-radius: 3px; }
.tr-hero__form .xbc-captcha-row { margin-top: 2px; }
.tr-hero__form form.tr-enquiry-form button[disabled] { opacity: .7; cursor: not-allowed; }

/* server error banner (success banner .tr-form__ok already exists on each page) */
.tr-hero__form .tr-form__fail { grid-column: 1 / -1; display: none; padding: 12px 14px; border-radius: 12px;
  background: #fdecec; color: #b42626; font-weight: 700; }
.tr-hero__form .tr-form__fail.show { display: block; }

/* Book-a-call modal (footer.php) - field error styles normally supplied by site-fixes.css */
#book-a-call-modal .field-error { display: none; color: #D64545; font-size: .78rem; font-weight: 600; margin-top: 6px; }
#book-a-call-modal .field-error.show { display: block; }
#book-a-call-modal .form-field.has-error input,
#book-a-call-modal .form-field.has-error textarea { border-color: #D64545 !important; box-shadow: 0 0 0 3px rgba(214,69,69,.12); }

/* ---- Alignment fix: keep every field top-aligned and the same size ----
   Before, a row stretched when one field showed an error, so its neighbour's
   input got pushed down and looked mis-aligned (and some inputs used a smaller font). */
.tr-hero__form form.tr-enquiry-form { align-items: start; }
.tr-hero__form form.tr-enquiry-form > label { align-content: start; align-self: start; min-width: 0; }
.tr-hero__form form.tr-enquiry-form input:not([type="hidden"]):not(.xbc-captcha-input),
.tr-hero__form form.tr-enquiry-form select,
.tr-hero__form form.tr-enquiry-form textarea {
  box-sizing: border-box; width: 100%; margin: 0;
  font-family: var(--body, system-ui, sans-serif); font-size: 16.5px; font-weight: 500; line-height: 1.3;
  letter-spacing: 0; text-transform: none; color: #2e3d62;
}
.tr-hero__form form.tr-enquiry-form input:not([type="hidden"]):not(.xbc-captcha-input),
.tr-hero__form form.tr-enquiry-form select { height: 50px; padding: 0 13px; }
.tr-hero__form form.tr-enquiry-form textarea { min-height: 84px; padding: 12px 13px; }
.tr-hero__form form.tr-enquiry-form .field-error { margin: 0; }
@media (max-width: 700px) { .tr-hero__form form.tr-enquiry-form { grid-template-columns: 1fr; } }
