/**
 * OneTrust consent UI — brand colors
 * -----------------------------------------------------------------------------
 * Repaints the cookie banner and the Preference Center in the Dealer-FX palette.
 * The template in the OneTrust console ships a stock red (#FF0000) and a stock
 * green toggle, neither of which is in the palette, and we have no console
 * access — so the override lives here.
 *
 * COLOR ONLY. No sizes, weights, spacing, radii or order are touched, and that
 * restraint is deliberate: "Accept All Cookies" and "Necessary Cookies Only"
 * arrive from OneTrust as the same filled button at the same weight, and they
 * leave that way. Equal prominence between accept and reject is a compliance
 * property under EDPB guidance, not a design preference — a brand pass that
 * makes accept vivid and reject a grey ghost is the dark pattern regulators
 * name. Recolor both or neither.
 *
 * TOKENS, NEVER HEX. Nothing here names a color. The brand reference calls Arc
 * the marketing CTA while the theme's own --dfx-color-cta resolves to Obsidian,
 * which is what every button on the site actually is; pointing at the ROLE means
 * the consent UI follows whatever that argument settles on, without a second
 * edit here.
 *
 * WHY EVERY DECLARATION CARRIES !important, WHICH IS NOT LAZINESS. The first
 * version of this file tried to win on specificity alone and lost, so the
 * measurement is worth recording. OneTrust injects a 130KB
 * <style id="onetrust-style"> into <head> at runtime, so it lands after every
 * stylesheet the theme enqueues and takes every specificity TIE on source order.
 * Worse, its Preference Center rule is:
 *
 *   #onetrust-consent-sdk #onetrust-pc-sdk button:not(#clear-filters-handler)
 *   :not(.ot-close-icon):not(#filter-btn-handler):not(.ot-remove-objection-handler)
 *   … and five more :not()s
 *
 * `:not()` takes the specificity of its argument, so those two ID arguments
 * count as IDs: the rule scores (0,4,8,1). There is no maintainable selector
 * that beats it — matching it would mean copying the whole :not() chain and
 * adding to it, which breaks the next time OneTrust adds a link variant.
 *
 * !important is the correct tool here precisely because the vendor uses none of
 * its own — verified across every color rule in that block. That makes these
 * declarations both specificity-proof and order-proof, which matters because
 * Hummingbird's asset optimization is free to combine and reorder our
 * stylesheets. The #onetrust-consent-sdk prefix stays on every rule anyway, to
 * keep the blast radius inside the consent UI.
 *
 * The consent UI is a normal div in <body> — no shadow DOM, no iframe — which is
 * the only reason any of this reaches.
 */

/* ---------------------------------------------------------------------------
 * Banner
 * ------------------------------------------------------------------------ */

/*
 * The two consent choices. One rule, so they cannot drift apart: any future
 * edit that changes one changes both.
 */
#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-accept-btn-handler,
#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-reject-all-handler {
	background-color: var(--dfx-color-cta) !important;
	border-color: var(--dfx-color-cta) !important;
	color: var(--dfx-color-cta-text) !important;
}

#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-accept-btn-handler:hover,
#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-reject-all-handler:hover {
	background-color: var(--dfx-color-cta-hover) !important;
	border-color: var(--dfx-color-cta-hover) !important;
	color: var(--dfx-color-cta-text) !important;
}

/*
 * Cookie Preferences is the outlined third path, not the reject — it opens a
 * dialog rather than recording a choice — so it stays visually secondary, as it
 * already was.
 */
#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-pc-btn-handler {
	background-color: var(--dfx-color-surface-raised) !important;
	border-color: var(--dfx-color-cta) !important;
	color: var(--dfx-color-cta) !important;
}

#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-pc-btn-handler:hover {
	background-color: var(--dfx-color-cta) !important;
	border-color: var(--dfx-color-cta) !important;
	color: var(--dfx-color-cta-text) !important;
}

#onetrust-consent-sdk #onetrust-banner-sdk a[href] {
	color: var(--dfx-color-link) !important;
}

#onetrust-consent-sdk #onetrust-banner-sdk a[href]:hover {
	color: var(--dfx-color-link-hover) !important;
}

/* ---------------------------------------------------------------------------
 * Preference Center
 * ------------------------------------------------------------------------ */

/*
 * Save Settings, Necessary Cookies Only and Accept All — the modal's mirror of
 * the banner's choices, plus the cookie-list filter's Apply. Same treatment as
 * the banner for the same reason.
 */
#onetrust-consent-sdk #onetrust-pc-sdk .save-preference-btn-handler,
#onetrust-consent-sdk #onetrust-pc-sdk .ot-pc-refuse-all-handler,
#onetrust-consent-sdk #onetrust-pc-sdk #accept-recommended-btn-handler,
#onetrust-consent-sdk #onetrust-pc-sdk #filter-apply-handler {
	background-color: var(--dfx-color-cta) !important;
	border-color: var(--dfx-color-cta) !important;
	color: var(--dfx-color-cta-text) !important;
}

#onetrust-consent-sdk #onetrust-pc-sdk .save-preference-btn-handler:hover,
#onetrust-consent-sdk #onetrust-pc-sdk .ot-pc-refuse-all-handler:hover,
#onetrust-consent-sdk #onetrust-pc-sdk #accept-recommended-btn-handler:hover,
#onetrust-consent-sdk #onetrust-pc-sdk #filter-apply-handler:hover {
	background-color: var(--dfx-color-cta-hover) !important;
	border-color: var(--dfx-color-cta-hover) !important;
	color: var(--dfx-color-cta-text) !important;
}

/* Cancel beside Apply in the filter dialog — secondary, so outlined. */
#onetrust-consent-sdk #onetrust-pc-sdk #filter-cancel-handler {
	background-color: var(--dfx-color-surface-raised) !important;
	border-color: var(--dfx-color-cta) !important;
	color: var(--dfx-color-cta) !important;
}

#onetrust-consent-sdk #onetrust-pc-sdk #filter-cancel-handler:hover {
	background-color: var(--dfx-color-cta) !important;
	border-color: var(--dfx-color-cta) !important;
	color: var(--dfx-color-cta-text) !important;
}

/* The bar marking the open category in the left-hand list. */
#onetrust-consent-sdk #onetrust-pc-sdk .ot-active-menu {
	border-color: var(--dfx-color-cta) !important;
}

#onetrust-consent-sdk #onetrust-pc-sdk a[href],
#onetrust-consent-sdk #onetrust-pc-sdk button.ot-link-btn {
	color: var(--dfx-color-link) !important;
}

#onetrust-consent-sdk #onetrust-pc-sdk a[href]:hover,
#onetrust-consent-sdk #onetrust-pc-sdk button.ot-link-btn:hover {
	color: var(--dfx-color-link-hover) !important;
}

/*
 * Category toggles. NOT a green, and that is the three-green rule rather than
 * taste: a consent switch is an interactive control, so it is none of terminal
 * success, in-flight motion or sustained health. State is still carried by the
 * knob's position and aria-checked, so nothing here leans on color alone.
 */
#onetrust-consent-sdk #onetrust-pc-sdk .ot-tgl input:checked + .ot-switch .ot-switch-nob {
	background-color: var(--dfx-color-cta) !important;
	border-color: var(--dfx-color-cta-text) !important;
}

/* ---------------------------------------------------------------------------
 * Surface, geometry and type
 * ------------------------------------------------------------------------ */

/*
 * The notice floats as a card inset 1rem from the viewport, rather than sitting
 * flush as a full-bleed strip.
 *
 * INSETS, NOT PADDING. OneTrust pins the bar with `position: fixed` and
 * `left/right/bottom: 0`, so there is no outside for padding to occupy — padding
 * would only push its own content inward and leave the card edge-to-edge. Moving
 * the three insets to 1rem and letting `width: auto` derive from them is what
 * actually lifts it off the edges, and it keeps working when the viewport changes
 * because nothing here is a fixed width.
 *
 * All four corners are rounded now that it floats. Rounding only the top made
 * sense while the bar was flush to the floor; on a card it would read as a
 * mistake — which is what looked odd.
 *
 * NO BORDER. OneTrust draws none of its own, so there is nothing to reset here —
 * the edge is carried by its 18px ambient shadow, which now has something to sit
 * under. A hairline on top of that shadow read as two competing edges.
 *
 * WHITE, NOT SIGNAL WHITE, AND THAT IS AN ACCESSIBILITY FIX RATHER THAN TASTE.
 * --dfx-color-link (#0072E0) measures 4.33:1 on Signal White and 4.68:1 on pure
 * white — so the Privacy Policy link in this banner failed AA for normal text on
 * the Signal White surface it started on, and clears it here. This is the one
 * component every visitor is guaranteed to see, which is a poor place to inherit
 * a contrast failure. --dfx-color-surface-raised is the token for exactly this:
 * a raised surface sitting above the page.
 */
#onetrust-consent-sdk #onetrust-banner-sdk {
	left: 1rem !important;
	right: 1rem !important;
	bottom: 1rem !important;
	width: auto !important;
	background-color: var(--dfx-color-surface-raised) !important;
	border-radius: 14px !important;
}

/*
 * Even the top and bottom breathing room inside the card.
 *
 * IT IS MARGIN, NOT PADDING, and it is on the content rather than the card.
 * `#onetrust-banner-sdk` has no vertical padding at all — the space came from
 * `#onetrust-policy`'s own `margin: 20px 0 10px`, which is what made the bottom
 * look tight. Padding the card would not have fixed it, because that margin sits
 * inside whatever padding is added.
 *
 * The button group is absolutely positioned and vertically centred against the
 * full-height container, so it re-centres itself when this changes rather than
 * needing a matching nudge.
 */
#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy {
	margin-top: 1.5em !important;
	margin-bottom: 1.5em !important;
}

/* Headings on both surfaces. OneTrust ships pure black; the site does not. */
#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy-title,
#onetrust-consent-sdk #onetrust-pc-sdk #ot-pc-title,
#onetrust-consent-sdk #onetrust-pc-sdk #ot-pc-title-mobile,
#onetrust-consent-sdk #onetrust-pc-sdk h3,
#onetrust-consent-sdk #onetrust-pc-sdk h4 {
	color: var(--dfx-color-heading) !important;
}

/*
 * Body copy, also pure black out of the box.
 *
 * The links keep their own color without needing to be listed again: the
 * `a[href]` rules above carry an attribute selector, so they outrank these
 * element-only selectors even though both sides are !important.
 */
#onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy-text,
#onetrust-consent-sdk #onetrust-pc-sdk p,
#onetrust-consent-sdk #onetrust-pc-sdk label,
#onetrust-consent-sdk #onetrust-pc-sdk span:not(.ot-switch-nob) {
	color: var(--dfx-color-body) !important;
}

/* ---------------------------------------------------------------------------
 * Focus
 * ------------------------------------------------------------------------ */

/*
 * The black ring around the whole card on page load is OneTrust's own
 * `#onetrust-banner-sdk:focus { outline: black solid 2px }`. It fires because the
 * SDK puts `tabindex="0"` on the banner and focuses it programmatically so screen
 * readers announce the notice — so it is not a stray style, it is a focus
 * indicator on something the user never chose to focus.
 *
 * :focus:not(:focus-visible) IS THE WHOLE POINT, AND DELETING THE RING OUTRIGHT
 * WOULD BE WRONG. Programmatic and pointer focus lose the outline; keyboard focus
 * keeps one, in Arc, below. A container that can be tabbed to must show that it
 * has been.
 */
#onetrust-consent-sdk #onetrust-banner-sdk:focus:not(:focus-visible) {
	outline: none !important;
}

/*
 * Arc is the documented focus color, and this is the one place its role is
 * unambiguous. :focus-visible only, so a mouse click does not leave a ring.
 */
#onetrust-consent-sdk #onetrust-banner-sdk:focus-visible,
#onetrust-consent-sdk #onetrust-banner-sdk button:focus-visible,
#onetrust-consent-sdk #onetrust-banner-sdk a:focus-visible,
#onetrust-consent-sdk #onetrust-pc-sdk button:focus-visible,
#onetrust-consent-sdk #onetrust-pc-sdk a:focus-visible,
#onetrust-consent-sdk #onetrust-pc-sdk input:focus-visible + .ot-switch {
	outline: 2px solid var(--dfx-arc) !important;
	outline-offset: 2px !important;
}
