/* QC Accessibility Tools (T14) — panel + High Contrast / Zoom / Reset.
   Depends on --qc-* tokens from qc-frontend (T09); every var() below carries
   its own fallback so load order between the two globalCSS extensions never
   breaks this file. Logical properties only (see qc-global.css policy) so
   ar_SA mirrors with no [dir=rtl] overrides.

   Edge case (story 129364): browsers without CSS custom-property support
   simply drop these var() declarations and keep the default theme — no JS
   branch needed for the "graceful fallback" requirement. */

:root {
	--qc-a11y-zoom-scale: 1;
}

html {
	font-size: calc(100% * var(--qc-a11y-zoom-scale, 1));
}

/* ---- High Contrast theme ---- */

html.qc-a11y-contrast body {
	background: #000000 !important;
	color: #ffffff !important;
}

/* Decorative layers (hero overlays, scrims, masks, tints, gradients, shades,
   backdrops) are semi-transparent by design and sit on top of imagery. Forcing
   an opaque black background on them blanked out ~a quarter of the page, so the
   blanket rule below must skip them. Real panels such as .qc-search-overlay__panel
   do not match these fragments and still get the black surface.
   - Hero banners (.qc-hero-*) are skipped too: their viewport/panel wrappers sit
     on top of the photo, and a black fill turned the ~1320x263 text panel into
     an opaque rectangle over the image.
   - Only the chatbot ROOT (.qc-chatbot) is skipped: it is a fixed ~390x645
     positioning box that stays in layout while the panel is closed, so painting
     it black blocked the bottom corner of every page. Its launcher wrapper is skipped for the same reason (square box behind the round button). Its panel, messages,
     composer and launcher are real surfaces and DO follow High Contrast. */
html.qc-a11y-contrast a,
html.qc-a11y-contrast button,
html.qc-a11y-contrast [class*="qc-"]:not(.qc-chatbot):not(.qc-launcher-wrap):not(.qc-ms-ico):not([class*="hero"]):not([class*="hero"] *):not([class*="__overlay"]):not([class*="bg-overlay"]):not([class$="-overlay"]):not([class*="-overlay "]):not([class*="scrim"]):not([class*="-mask"]):not([class*="-tint"]):not([class*="shade"]):not([class*="gradient"]):not([class*="backdrop"]) {
	background-color: #000000 !important;
	border-color: #ffffff !important;
	color: #ffffff !important;
}

html.qc-a11y-contrast a:hover,
html.qc-a11y-contrast a:focus-visible,
html.qc-a11y-contrast button:hover,
html.qc-a11y-contrast button:focus-visible {
	background-color: #ffd400 !important;
	color: #000000 !important;
}

html.qc-a11y-contrast img {
	filter: grayscale(1) contrast(1.2);
}

/* Mask-painted glyphs (Member Services icons) take their colour from
   background-color; the blanket rule above made them black on a black tile
   (ADO 151126). Keep them white. */
html.qc-a11y-contrast .qc-ms-ico {
	background-color: #ffffff !important;
}

/* TTS floating control: black fill on the black page left the round button
   with no visible boundary (1:1). Give it an explicit white ring (>=3:1) and
   make its pointer tail white too. */
html.qc-a11y-contrast .qc-tts-fab,
html.qc-a11y-contrast .qc-tts-primary {
	border: 0.125rem solid #ffffff !important;
	border-radius: 50% !important;
	box-shadow: 0 0 0 0.0625rem #000000 !important;
}

html.qc-a11y-contrast .qc-tts-float--anchored .qc-tts-primary::after {
	border-top-color: #ffffff !important;
	background: transparent !important;
}

html.qc-a11y-contrast .qc-tts-fab svg {
	color: #ffffff !important;
	fill: currentColor;
}

html.qc-a11y-contrast .qc-tts-fab:hover svg,
html.qc-a11y-contrast .qc-tts-fab:focus-visible svg {
	color: #000000 !important;
}

/* Liferay system alerts / toasts (e.g. "Success: You have been redirected to
   ..."). The blanket a/button rule above turns their link and close button into
   black blocks while the alert keeps its light Clay fill; repaint the whole
   alert as one high-contrast surface instead. Specificity beats Clay's
   .alert-success / .alert-link rules. */
html.qc-a11y-contrast .alert,
html.qc-a11y-contrast .alert.alert-success,
html.qc-a11y-contrast .alert.alert-info,
html.qc-a11y-contrast .alert.alert-warning,
html.qc-a11y-contrast .alert.alert-danger,
html.qc-a11y-contrast .alert-notifications .alert,
html.qc-a11y-contrast .lfr-alert-container .alert {
	background-color: #000000 !important;
	border: 0.125rem solid #ffffff !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

html.qc-a11y-contrast .alert *:not(svg):not(path),
html.qc-a11y-contrast .alert a,
html.qc-a11y-contrast .alert .alert-link,
html.qc-a11y-contrast .alert .alert-indicator,
html.qc-a11y-contrast .alert .alert-indicator-wrapper,
html.qc-a11y-contrast .alert .alert-autofit-row,
html.qc-a11y-contrast .alert .autofit-col,
html.qc-a11y-contrast .alert .autofit-section,
html.qc-a11y-contrast .alert strong {
	background-color: transparent !important;
	border-color: transparent !important;
	color: #ffffff !important;
}

html.qc-a11y-contrast .alert a,
html.qc-a11y-contrast .alert .alert-link {
	text-decoration: underline !important;
}

html.qc-a11y-contrast .alert svg,
html.qc-a11y-contrast .alert .lexicon-icon {
	fill: currentColor !important;
	color: #ffffff !important;
}

html.qc-a11y-contrast .alert .close,
html.qc-a11y-contrast .alert button.close {
	background-color: transparent !important;
	border: 0.0625rem solid #ffffff !important;
	color: #ffffff !important;
}

html.qc-a11y-contrast .alert a:hover,
html.qc-a11y-contrast .alert a:focus-visible,
html.qc-a11y-contrast .alert .close:hover,
html.qc-a11y-contrast .alert .close:focus-visible {
	background-color: #ffd400 !important;
	color: #000000 !important;
}

html.qc-a11y-contrast .alert .close:hover svg,
html.qc-a11y-contrast .alert .close:focus-visible svg {
	color: #000000 !important;
}

/* ---- Panel ----
   Position matched 2026-07-08 to the actual Figma screenshots the user
   provided (Figma-Designs/Accessibility/) - the PBI has no Figma link for
   the panel itself, only for the surrounding page. Desktop: a dropdown,
   JS-positioned (qc-accessibility.js) flush under whichever icon
   triggered it. Mobile/tablet: a fixed bottom-sheet (below), same <992px
   breakpoint the header drawer uses - any JS-set top/left is ignored
   there since the sheet is always full-width and bottom-anchored. */

.qc-a11y-panel {
	background: var(--qc-white, #fff);
	border-radius: var(--qc-radius-lg, 0.625rem);
	box-shadow: 0 0.5rem 1.5rem var(--qc-alpha-black-40, #11182766);
	color: var(--qc-gray-900, #1d1d1b);
	font-family: var(--qc-font-family-base, "Cairo", sans-serif);
	max-width: 20rem;
	padding: var(--qc-spacing-2xl, 1.25rem);
	position: fixed;
	width: calc(100% - var(--qc-spacing-4xl, 2rem));
	z-index: 10000;
}

.qc-a11y-panel[hidden] {
	display: none;
}

.qc-a11y-panel-header {
	align-items: flex-start;
	display: flex;
	justify-content: space-between;
	margin-block-end: var(--qc-spacing-xs, 0.25rem);
}

.qc-a11y-panel-title-group {
	align-items: center;
	color: var(--qc-gray-900, #1d1d1b);
	display: flex;
	gap: var(--qc-spacing-sm, 0.375rem);
}

.qc-a11y-panel-title {
	font-size: var(--qc-text-md, 1rem);
	font-weight: 700;
}

.qc-a11y-panel-subtitle {
	color: var(--qc-gray-500, #8a8b9a);
	font-size: var(--qc-text-sm, 0.875rem);
	margin: 0 0 var(--qc-spacing-lg, 0.75rem);
}

.qc-a11y-close {
	background: none;
	border: none;
	color: var(--qc-gray-500, #8a8b9a);
	cursor: pointer;
	font-size: var(--qc-text-lg, 1.125rem);
	line-height: 1;
	padding: var(--qc-spacing-xs, 0.25rem);
}

.qc-a11y-row {
	align-items: center;
	display: flex;
	justify-content: space-between;
	padding-block: 12px;
}

/* Divider under the first two rows (Dark Mode, High Contrast) only - the
   third row (Zoom) is followed by the zoom button group, which already
   reads as a separate block. Chained adjacent-sibling selectors anchored
   on the subtitle target exactly rows 1 and 2 without :has(), so support
   matches the rest of this file. */
.qc-a11y-panel-subtitle + .qc-a11y-row,
.qc-a11y-panel-subtitle + .qc-a11y-row + .qc-a11y-row {
	border-bottom: 1px solid #F6F6F6;
}

.qc-a11y-row-label {
	font-size: var(--qc-text-sm, 0.875rem);
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 12px;
}

.qc-a11y-zoom-value {
	color: var(--qc-gray-500, #8a8b9a);
	font-size: var(--qc-text-sm, 0.875rem);
}

/* ---- High Contrast switch ---- */

/* appearance:none is required here, not optional polish - without it,
   this <button>'s native OS chrome (a beveled/gradient pill on Windows,
   confirmed from the reported screenshots) renders on top of the flat
   custom background, making the switch look like a distorted blob
   instead of a clean track+thumb toggle. `background` alone does not
   reliably suppress native button theming on every platform. */
.qc-a11y-switch {
	appearance: none;
	-webkit-appearance: none;
	background: var(--qc-gray-300, #d0d0d0);
	border: 0;
	border-radius: var(--qc-radius-full, 9999px);
	block-size: 1.5rem;
	cursor: pointer;
	flex-shrink: 0;
	font: inherit;
	inline-size: 2.75rem;
	padding: 0.1875rem;
	position: relative;
	transition: background-color 0.15s ease;
}

.qc-a11y-switch[aria-checked="true"] {
	background: var(--qc-primary-500, #911731);
}

/* inset-block-start is required here, not just inset-inline-start: this
   span is the button's only child, and an absolutely-positioned element
   with top/bottom both left as `auto` falls back to a "static position"
   the browser derives from the button's own font/line-height metrics
   (not from the padding box) - confirmed via getBoundingClientRect that
   the thumb was rendering ~9px lower than the track and overflowing
   past its bottom edge, which is what the distorted-blob screenshots
   actually were: a full-size thumb spilling out of a track too short to
   contain it, not a native-appearance rendering issue. */
.qc-a11y-switch-thumb {
	background: var(--qc-white, #fff);
	block-size: 1.125rem;
	border-radius: var(--qc-radius-full, 9999px);
	display: block;
	inline-size: 1.125rem;
	inset-block-start: 0.1875rem;
	inset-inline-start: 0.1875rem;
	position: absolute;
	transition: inset-inline-start 0.15s ease;
}

.qc-a11y-switch[aria-checked="true"] .qc-a11y-switch-thumb {
	inset-inline-start: calc(100% - 1.3125rem);
}

/* ADO 151567 - High Contrast paints every control black, so a black track
   and black knob vanished on the black panel and ON looked like OFF. Give the
   track a white border (OFF = white ring, white knob) and invert it when ON
   (white track, black knob): >= 3:1 against the panel, and the state reads
   without colour. !important because the contrast blanket rule above carries
   a long :not() chain; the :not(#id) pair out-ranks it on specificity. */
html.qc-a11y-contrast .qc-a11y-switch:not(#qc-a11y-id):not(#qc-a11y-id2) {
	background: #000 !important;
	border: 2px solid #fff !important;
}

html.qc-a11y-contrast .qc-a11y-switch:not(#qc-a11y-id):not(#qc-a11y-id2) .qc-a11y-switch-thumb {
	background: #fff !important;
}

html.qc-a11y-contrast .qc-a11y-switch:not(#qc-a11y-id):not(#qc-a11y-id2)[aria-checked="true"] {
	background: #fff !important;
}

html.qc-a11y-contrast .qc-a11y-switch:not(#qc-a11y-id):not(#qc-a11y-id2)[aria-checked="true"] .qc-a11y-switch-thumb {
	background: #000 !important;
}

/* ---- Zoom buttons ---- */

.qc-a11y-zoom-group {
	display: flex;
	gap: var(--qc-spacing-sm, 0.375rem);
	margin-block: var(--qc-spacing-sm, 0.375rem) var(--qc-spacing-lg, 0.75rem);
}

.qc-a11y-zoom-group button {
	align-items: center;
	background: var(--qc-white, #fff);
	border: 0.0625rem solid var(--qc-gray-300, #d0d0d0);
	border-radius: var(--qc-radius-full, 9999px);
	color: var(--qc-gray-900, #1d1d1b);
	cursor: pointer;
	display: inline-flex;
	flex: 1;
	font-size: var(--qc-text-sm, 0.875rem);
	gap: var(--qc-spacing-sm, 0.375rem);
	justify-content: center;
	padding: var(--qc-spacing-sm, 0.375rem) var(--qc-spacing-md, 0.5rem);
}

/* ---- Reset / Done footer ---- */

.qc-a11y-footer {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.qc-a11y-reset {
	align-items: center;
	background: none;
	border: 0;
	color: var(--qc-gray-900, #1d1d1b);
	cursor: pointer;
	display: inline-flex;
	font-size: var(--qc-text-sm, 0.875rem);
	gap: var(--qc-spacing-sm, 0.375rem);
	padding: var(--qc-spacing-sm, 0.375rem);
}

.qc-a11y-done {
	background: var(--qc-primary-500, #911731);
	border: 0;
	border-radius: var(--qc-radius-full, 9999px);
	color: var(--qc-white, #fff);
	cursor: pointer;
	font-size: var(--qc-text-sm, 0.875rem);
	font-weight: 600;
	padding: var(--qc-spacing-sm, 0.375rem) var(--qc-spacing-xl, 1rem);
}

.qc-a11y-switch:focus-visible,
.qc-a11y-zoom-group button:focus-visible,
.qc-a11y-reset:focus-visible,
.qc-a11y-done:focus-visible,
.qc-a11y-close:focus-visible {
	outline: 0.125rem solid var(--qc-gold-500, #a66f43);
	outline-offset: 0.125rem;
}

/* ---- responsive: bottom-sheet below 992px, matches the header drawer's
   own breakpoint (qc-global-site-header/styles.css) ---- */

@media (max-width: 991.98px) {
	/* Physical properties on purpose, not logical: JS only ever sets inline
	   `top`/`left` (for the desktop dropdown case) and never `right`/`bottom`,
	   so overriding those exact same physical properties here is the only
	   unambiguous way to beat them - mixing in a logical shorthand like
	   `inset-inline` risks the physical `left` it implies losing to JS's
	   inline `left` depending on cascade/declaration order, since browsers
	   resolve logical and physical declarations for the same side in
	   source order, not intuitively "logical wins because it's later in
	   the stylesheet". A full-width bottom sheet has no left/right
	   distinction anyway, so there's no RTL cost to being physical here. */
	.qc-a11y-panel {
		border-end-end-radius: 0;
		border-end-start-radius: 0;
		bottom: 0 !important;
		left: 0 !important;
		max-width: none;
		right: 0 !important;
		top: auto !important;
		width: 100%;
	}

	/* dims the page behind the bottom-sheet, matching Figma's mobile
	   screenshot (the desktop dropdown has no backdrop) */
	html.qc-a11y-panel-open::after {
		background: rgba(0, 0, 0, 0.6);
		content: "";
		inset: 0;
		position: fixed;
		z-index: 9999;
	}

	/* The bottom-sheet is modal (backdrop + trapped attention), so the page
	   behind it must not scroll out from under it while it is open (129364).
	   Same class name qc-a11y-keyboard.css uses for the mobile nav drawer;
	   declared here as well so this extension does not depend on that one
	   being deployed. */
	html.qc-a11y-scroll-locked,
	html.qc-a11y-scroll-locked body {
		overflow: hidden;
	}
}

/* ======================================================================
   ADO 151572 / 151573 / 151574 / 151575 / 151576 / 151577 / 151580
   High contrast + dark panel follow-ups. The blanket rule near the top
   recolours only elements whose OWN class contains "qc-", with !important and a
   long :not() chain. Everything below needs to out-rank it, so the selectors
   start from html.qc-a11y-contrast carrying two :not(#id) terms (an id
   outweighs any number of classes).
   ====================================================================== */

/* Text: a class-less <p>, <span>, <h2>... inside a qc- block (or plain Liferay
   page content) keeps its fragment colour - dark grey on black (About intro,
   pillar description, card titles, contact values, footer links) and maroon
   headings. In High contrast all text is white. */
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2)
	:is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, label, legend, blockquote,
		figcaption, td, th, small, strong, em, span, a):not(.alert *):not(.qc-ms-ico):not(svg *) {
	color: #ffffff !important;
}

/* ...except on the yellow hover / focus fill, where the label is black. The
   element's own colour is set by the generic hover rule; its children need the
   same, or white-on-yellow would be unreadable. */
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2)
	:is(a, button):is(:hover, :focus-visible),
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2)
	:is(a, button):is(:hover, :focus-visible) :is(span, p, strong, em, small) {
	color: #000000 !important;
}

/* Buttons that are filled pills in light keep a visible shape: a white ring on
   black, yellow fill on hover (as the hero buttons do). */
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2)
	:is(.qc-a11y-done, .qc-contact-submit, .qc-about-readmore) {
	background-color: #000000 !important;
	border: 0.125rem solid #ffffff !important;
	border-radius: 9999px !important;
	color: #ffffff !important;
}

html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2)
	:is(.qc-a11y-done, .qc-contact-submit, .qc-about-readmore):is(:hover, :focus-visible) {
	background-color: #ffd400 !important;
	border-color: #ffd400 !important;
	color: #000000 !important;
}

/* Full-width section roots keep their beige / maroon / brown gradients and
   photos in the margins around the black content boxes: the blanket rule sets
   background-COLOR only. Drop the image / gradient on the page's section
   wrappers and the footer so the whole page is black. */
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2)
	:is([class^="qc-home-"], .qc-global-site-footer, .lfr-layout-structure-item, .lfr-layout-structure-item-container, .qc-pod-bg-image,
		.d-flex.flex-column.flex-fill, .d-flex.flex-column.min-vh-100) {
	background-color: #000000 !important;
	background-image: none !important;
}

/* Mobile header: the hamburger bars (and the X they turn into when the menu is
   open) were black on the black header. */
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2)
	.qc-global-site-header .qc-hamburger-bar {
	background-color: #ffffff !important;
}

/* Accessibility panel: the row icons are white in High contrast (2.37:1 before),
   and in Dark mode the "Done" label is white on the maroon button (it inherited
   the dark-mode --qc-white, #1D1D1B, 1.91:1) and the OFF switch track is a
   lighter grey so it reads against the dark panel. */
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2) .qc-a11y-row-label .icon,
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2) .qc-a11y-row-label .icon * {
	color: #ffffff !important;
	fill: currentColor;
}

:root[data-theme="dark"] .qc-a11y-done {
	background: #911731;
	color: #ffffff;
}

:root[data-theme="dark"] .qc-a11y-switch:not([aria-checked="true"]) {
	background: #7c7b7b;
}

:root[data-theme="dark"] .qc-a11y-row-label .icon {
	color: #f6f6f6;
}

/* ======================================================================
   ADO 151900 / 151577 follow-ups
   ====================================================================== */

/* Hover / focus: black label and arrow on the yellow fill. The "all text is
   white" rule above carries three :not() terms after the html selector, so the
   black-on-yellow override has to carry as many (plus one) or white wins and the
   label reads 1.43:1 on #FFD400. */
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2):not(#qc-a11y-hc3)
	:is(a, button):is(:hover, :focus-visible):not(.alert *):not(.qc-ms-ico):not(svg *),
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2):not(#qc-a11y-hc3)
	:is(a, button):is(:hover, :focus-visible) :is(span, p, strong, em, small, svg, path):not(.alert *):not(.qc-ms-ico) {
	color: #000000 !important;
}

html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2):not(#qc-a11y-hc3)
	:is(a, button):is(:hover, :focus-visible) :is(svg, path) {
	fill: currentColor;
}

/* Hero banner / podcast photo overlays keep a brown-to-maroon gradient in the
   blanket rule's exclusion list. In High contrast they become a plain black
   scrim over the (greyscale) photo. */
html.qc-a11y-contrast:not(#qc-a11y-hc1):not(#qc-a11y-hc2)
	:is(.qc-ap-hero-overlay, .qc-cm-hero-overlay, .qc-pod-bg-overlay) {
	background: rgba(0, 0, 0, 0.85) !important;
}

/* ADO 152863 - Breadcrumbs on a page banner. The rules above paint every link and
   every .qc-* element black, so on a maroon banner the "Home" crumb (and its house
   icon) sat in a solid black box while the other crumbs did not. A crumb is text
   on the banner: transparent, white, no outline; hover/focus keep the yellow
   state. The attribute is repeated only to outrank the long :not() chain. */
html.qc-a11y-contrast a[class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"]:not(:hover):not(:focus-visible),
html.qc-a11y-contrast span[class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"],
html.qc-a11y-contrast nav[class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"][class*="crumb"] :is(span, svg, a):not(:hover):not(:focus-visible) {
	background-color: transparent !important;
	border-color: transparent !important;
	color: #ffffff !important;
}

