/* ─── Public Registration Form (plain, full-width, embeddable) ─── */
/* No card chrome, no max-width, no auto margins: the form fills whatever
   container it is embedded in. Spacing is owned by the host page/region. */

/* Required asterisk */
.rosterli-registration-form .text-danger {
	font-weight: 600;
}

/* Validation error on checkbox/radio groups */
.rosterli-registration-form .invalid-feedback.d-block {
	display: block !important;
}

/* ─── Primary controls on the layout's light background ─── */
/* These layouts render on <body class="bg-light"> (#f8f9fa). Bootstrap's
   default primary (#0d6efd) measures 4.26:1 there - under the 4.5:1 WCAG 2.2
   AA threshold for normal text - so the outcome pages' controls ("Send a new
   confirmation link", "Return Home") were failing legibility for exactly the
   readers who need it most. Shade the TEXT to Bootstrap's own -20% primary,
   which keeps the hue and measures about 6:1 on the same background.

   Text and borders only: no background, size or layout changes, so the design
   is unchanged apart from the text being readable. Measured by
   scripts/ci/browser/registration_a11y_mobile_journey.spec.mjs, which scans
   these pages at every viewport in budgets.json. */
body.bg-light .btn-outline-primary {
	--bs-btn-color: #0a58ca;
	--bs-btn-border-color: #0a58ca;
	--bs-btn-hover-bg: #0a58ca;
	--bs-btn-hover-border-color: #0a58ca;
	--bs-btn-active-bg: #0a58ca;
	--bs-btn-active-border-color: #0a58ca;
	--bs-btn-disabled-color: #0a58ca;
	--bs-btn-disabled-border-color: #0a58ca;
}

body.bg-light .btn-link {
	--bs-btn-color: #0a58ca;
	--bs-btn-hover-color: #073d8f;
}

/* Plain links have the same problem for the same reason - Bootstrap's link
   colour IS the primary - and the status portal renders them outside any
   button (the registration link in its detail panels). Re-point the link token
   on these pages so an anchor and a button agree, rather than fixing one
   element at a time as each page is scanned. */
body.bg-light {
	--bs-link-color-rgb: 10, 88, 202;
	--bs-link-hover-color-rgb: 7, 61, 143;
}

/* Bootstrap's secondary outline button has the same problem as its primary one
   on this background: #6c757d measures about 4.4:1 on #f8f9fa, just under the
   4.5:1 threshold. It is the "Return home" control on the confirmation result
   and unavailable pages, so it is the last thing a registrant is offered.
   Darkened to Bootstrap's own -20% secondary; border and fill untouched. */
body.bg-light .btn-outline-secondary {
	--bs-btn-color: #565e64;
	--bs-btn-disabled-color: #565e64;
}

/* The message explaining a rejected field should be the most readable text on
   the page, not the least. Bootstrap's default invalid colour (#dc3545) is
   about 3.9:1 on this layout's #f8f9fa, under the same AA threshold, which
   left every .invalid-feedback message and every required-field asterisk
   failing. Both shade to Bootstrap's own -20% danger, about 6:1 there.
   Colour only - the messages already carry role="alert" and are already
   wired to their field with aria-describedby. */
body.bg-light {
	--bs-form-invalid-color: #b02a37;
}

.rosterli-registration-form {
	--bs-danger-rgb: 176, 42, 55;
}

/* Extra Small submit button (btn-xs) - the registration layouts load plain
   Bootstrap + this file (not website_render.css), so the fourth button size
   needs its own definition here. Keep in sync with the .btn-xs rule in
   shared/assets/css/website_render.css. */
.btn.btn-xs {
	--bs-btn-padding-y: 0.125rem;
	--bs-btn-padding-x: 0.375rem;
	--bs-btn-font-size: 0.75rem;
	--bs-btn-line-height: 1.5;
	--bs-btn-border-radius: var(--bs-border-radius-sm);
}
