/* ==========================================================================
   Cedrus Wealth - Accessibility remediation (Financial Health Check /
   Risk Profiling wizards).  WCAG 2.2 Level AA.
   Loaded last; overrides only what is required for conformance.
   ========================================================================== */

/* SC 1.4.3 Contrast (Minimum) (AA)
   Placeholder text rendered #999999 on #ffffff = 2.85:1. #747474 gives 4.67:1
   and remains visually a light grey hint. */
::placeholder                { color: #747474; opacity: 1; }
::-webkit-input-placeholder  { color: #747474; }
::-moz-placeholder           { color: #747474; opacity: 1; }
:-ms-input-placeholder       { color: #747474; }
input.form-control::placeholder,
input.date-field::placeholder { color: #747474; opacity: 1; }


/* SC 1.4.3 Contrast (Minimum) (AA) - input TEXT colour.
   style1.css sets `input.form-control, select.form-control, textarea.form-control
   { color: #999 }` (style1.css ~line 955), so the value the user types renders at
   2.84:1 on white - not just the placeholder. #4a4a4a gives 9.0:1 for entered
   text, while the placeholder stays a lighter (but still conformant) #747474. */
input.form-control,
select.form-control,
textarea.form-control,
input.date-field {
	color: #4a4a4a;
}

/* SC 1.4.3 - the wizard "Forward" button was #ffffff on #649818 = 3.47:1.
   #568214 is the same hue darkened and gives 4.57:1. */
button.forward,
#forward-button,
button.submit {
	background-color: #568214 !important;
}

/* SC 2.4.7 Focus Visible (AA) + SC 1.4.11 Non-text Contrast (AA)
   Same indicator as the main site, for consistency. */
a:focus, button:focus, input:focus, select:focus, textarea:focus,
[tabindex]:focus {
	outline: 3px solid #0d47a1;
	outline-offset: 2px;
	/* main.css puts `transition: all 0.3s` on links, which animates the ring
	   in over 300ms - a fast tabber would only ever see a faint 1px outline.
	   The indicator must be immediate. */
	transition: none;
}
a:focus:not(:focus-visible), button:focus:not(:focus-visible),
input:focus:not(:focus-visible), select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible), [tabindex]:focus:not(:focus-visible) {
	outline: none;
}
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
	outline: 3px solid #0d47a1;
	outline-offset: 2px;
	/* main.css puts `transition: all 0.3s` on links, which animates the ring
	   in over 300ms - a fast tabber would only ever see a faint 1px outline.
	   The indicator must be immediate. */
	transition: none;
}

/* Screen-reader-only utility (matches the main site). */
.sr-only {
	position: absolute !important; width: 1px !important; height: 1px !important;
	padding: 0 !important; margin: -1px !important; overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

/* SC 2.4.1 Bypass Blocks (A) */
.skip-link {
	position: absolute; top: -100px; left: 8px; z-index: 100000;
	display: inline-block; padding: 12px 22px;
	background: #ffffff; color: #0d47a1; border: 3px solid #0d47a1;
	font-size: 15px; font-weight: 600; text-decoration: underline;
}
.skip-link:focus, .skip-link:focus-visible { top: 0; }
#main-content:focus { outline: none; }


/* --------------------------------------------------------------------------
   SC 2.4.7 Focus Visible (AA) - guaranteed-winning fallback

   Several vendor stylesheets kill the focus ring at a specificity the element
   selectors above cannot beat:
     * flickity.min.css  `.flickity-button:focus  { outline: 0 }`      (0,2,0)
     * style1.css        `input.form-control:focus{ outline: 0 }`      (0,2,1)
     * style1.css        `.styled-select select:focus{outline:none}`   (0,2,1)
     * main.css          `.woocommerce ... select:focus{outline:none}` (0,3,2)
   A universal :focus-visible rule with !important is the only way to guarantee
   a visible indicator on EVERY control without editing vendor files.

   It is scoped to :focus-visible, so pointer users still see nothing.
   -------------------------------------------------------------------------- */
*:focus-visible {
	outline: 3px solid #0d47a1 !important;
	outline-offset: 2px !important;
	transition: none !important;
}

/* Programmatic focus targets (skip-link landing point) are containers, not
   controls - they must be focusable but must not draw a ring. */
#main-content:focus,
#main-content:focus-visible,
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
	outline: none !important;
}
