/* Western Badminton site-wide readable text palette.
   Keep semantic status colours intact while enforcing strong contrast on
   normal copy, muted copy, forms and text placed on dark surfaces. */
:root {
  --wbi-readable-ink: #172033;
  --wbi-readable-copy: #344054;
  --wbi-readable-muted: #475467;
  --wbi-readable-placeholder: #667085;
  --wbi-readable-on-dark: #ffffff;
  --wbi-readable-on-dark-soft: #f2f4f7;
}

body {
  color: var(--wbi-readable-ink) !important;
}

main :where(p, li, dd, dt, label, .form-label, .form-text, .help-text, .helper-text, .description, .subtitle, .lead, small, .small):not(.text-white):not(.text-light):not(.text-primary):not(.text-success):not(.text-danger):not(.text-warning):not(.text-info) {
  color: var(--wbi-readable-copy) !important;
  opacity: 1 !important;
}

main :where(p, li, dd, dt, .form-text, .help-text, .helper-text, .description, .subtitle, .lead, small, .small) {
  font-weight: 400 !important;
}

main :where(.text-secondary, .text-muted, .muted, [class*="text-muted"], [class*="text-secondary"]) {
  color: var(--wbi-readable-muted) !important;
  opacity: 1 !important;
}

:where(input, textarea, select, .form-control, .form-select) {
  color: var(--wbi-readable-ink) !important;
}

:where(input, textarea, .form-control)::placeholder {
  color: var(--wbi-readable-placeholder) !important;
  opacity: 1 !important;
}

:is(
  #wbi-live-header,
  footer,
  .footer,
  .site-footer,
  .bg-dark,
  .bg-primary,
  .navbar-dark,
  .sidebar-dark,
  .suite-sidebar,
  .tm-sidebar,
  [class*="hero"]
) :where(p, li, dd, dt, label, .form-label, .form-text, .help-text, .helper-text, .description, .subtitle, .lead, small, .small, .text-secondary, .text-muted) {
  color: var(--wbi-readable-on-dark-soft) !important;
  opacity: 1 !important;
}

:is(
  #wbi-live-header,
  footer,
  .footer,
  .site-footer,
  .bg-dark,
  .bg-primary,
  .navbar-dark,
  .sidebar-dark,
  .suite-sidebar,
  .tm-sidebar,
  [class*="hero"]
) :where(h1, h2, h3, h4, h5, h6, strong, b) {
  color: var(--wbi-readable-on-dark) !important;
  opacity: 1 !important;
}

#wbi-live-header :where(a, button),
:is(footer, .footer, .site-footer) :where(a, button) {
  opacity: 1 !important;
}

/* Disabled controls must remain visibly disabled without becoming illegible. */
:where(:disabled, .disabled, [aria-disabled="true"]) {
  opacity: 0.72;
}

@media (forced-colors: active) {
  body,
  main :where(p, li, dd, dt, label, small, .small, .lead),
  :where(input, textarea, select, .form-control, .form-select) {
    color: CanvasText !important;
  }
}
