/**
 * OneTrust cookie banner and preference centre in the site's look (inc/consent.php loads this with the OneTrust scripts).
 *
 * OneTrust is run by Dexcom's vendor, so its admin is out of reach: these rules restyle what it injects. Its own sheet
 * and Dexcom's template CSS use ids and !important, so every rule here starts with `html #onetrust-consent-sdk` (or
 * `html #ot-sdk-btn`) and declarations carry !important. Markup checked against OneTrust 202609.2.0 (Dexcom US, Global
 * and Canada templates); if the vendor changes template, re-check the ids below.
 *
 * Banner: a paper bar inset from the screen edges. Accept (green pill) and Reject (outlined pill, the same size, so
 * neither choice is pushed) plus Cookie Settings as a text link. Dexcom's grey Reject (white on #B8BABC, about 1.9:1)
 * is replaced. Preference centre: the reader's paper, Display headline, green pills and green switches.
 */

/* ---------- shared ---------- */
html #onetrust-consent-sdk #onetrust-banner-sdk,
html #onetrust-consent-sdk #onetrust-pc-sdk {
	font-family: var(--font-sans) !important;
	color: var(--ink) !important;
	-webkit-font-smoothing: antialiased;
}
html #onetrust-consent-sdk #onetrust-banner-sdk a,
html #onetrust-consent-sdk #onetrust-pc-sdk a {
	color: var(--green) !important;
	font-weight: 500 !important;
	text-decoration: underline !important;
	text-underline-offset: .15em !important;
}

/* Buttons: the site's pills. */
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-accept-btn-handler,
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-reject-all-handler,
html #onetrust-consent-sdk #onetrust-pc-sdk #accept-recommended-btn-handler,
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-pc-refuse-all-handler,
html #onetrust-consent-sdk #onetrust-pc-sdk .save-preference-btn-handler {
	display: inline-flex !important; align-items: center !important; justify-content: center !important;
	width: auto !important; min-width: 0 !important; max-width: none !important; height: 3rem !important;
	margin: 0 !important; padding: 0 1.5rem !important;
	border: 0 !important; border-radius: 1.5rem !important;
	font: 500 1rem/1 var(--font-sans) !important; letter-spacing: 0 !important; white-space: nowrap !important;
	opacity: 1 !important;
	transition: filter .3s, box-shadow .35s var(--ease-out), background-color .3s, color .3s !important;
}
/* Primary: green with a white label. */
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-accept-btn-handler,
html #onetrust-consent-sdk #onetrust-pc-sdk #accept-recommended-btn-handler,
html #onetrust-consent-sdk #onetrust-pc-sdk .save-preference-btn-handler {
	background: var(--green) !important; color: #fff !important;
	box-shadow: 0 .5rem 1.25rem -8px rgba(19, 125, 0, .6) !important;
}
/* Reject: outlined in ink, same size as Accept. */
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-reject-all-handler,
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-pc-refuse-all-handler {
	background: transparent !important; color: var(--ink) !important;
	box-shadow: inset 0 0 0 1.5px rgba(27, 36, 32, .55) !important;
}
@media (hover: hover) {
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-accept-btn-handler:hover,
	html #onetrust-consent-sdk #onetrust-pc-sdk #accept-recommended-btn-handler:hover,
	html #onetrust-consent-sdk #onetrust-pc-sdk .save-preference-btn-handler:hover {
		filter: brightness(1.06) !important; box-shadow: 0 .875rem 1.75rem -10px rgba(19, 125, 0, .75) !important;
	}
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-reject-all-handler:hover,
	html #onetrust-consent-sdk #onetrust-pc-sdk .ot-pc-refuse-all-handler:hover {
		background: var(--ink) !important; color: #fff !important; box-shadow: inset 0 0 0 1.5px var(--ink) !important;
	}
}
html #onetrust-consent-sdk #onetrust-banner-sdk button:active,
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-btn-container button:active,
html #onetrust-consent-sdk #onetrust-pc-sdk #accept-recommended-btn-handler:active { transform: scale(.975); }

/* Focus: the site's ring (3px white outline, 5px deep green). */
html #onetrust-consent-sdk #onetrust-banner-sdk :focus-visible,
html #onetrust-consent-sdk #onetrust-pc-sdk :focus-visible,
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-tgl input:focus-visible + .ot-switch {
	outline: .1875rem solid #fff !important; outline-offset: 2px !important;
	box-shadow: 0 0 0 .3125rem var(--green-focus) !important;
}
/* OneTrust draws its own focus box on these; the ring above replaces it. */
html #onetrust-consent-sdk #onetrust-banner-sdk :focus,
html #onetrust-consent-sdk #onetrust-pc-sdk :focus { outline-color: #fff; }

/* ---------- banner ---------- */
html #onetrust-consent-sdk #onetrust-banner-sdk {
	left: 50% !important; right: auto !important; top: auto !important; bottom: calc(.5rem + env(safe-area-inset-bottom, 0px)) !important;
	width: calc(100% - 1rem) !important; max-width: 82rem !important; translate: -50% 0;
	padding: 0 !important;
	background: var(--white) !important;
	border-radius: 1rem !important;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 .75rem 2rem -10px rgba(30, 45, 35, .35), 0 2rem 3.5rem -24px rgba(30, 45, 35, .3) !important;
	font-size: 1rem !important;
}
/* Some templates open at the top: keep it at the bottom, clear of the header. */
html #onetrust-consent-sdk #onetrust-banner-sdk.otFlat.top,
html #onetrust-consent-sdk #onetrust-banner-sdk.top { top: auto !important; }
html #onetrust-consent-sdk #onetrust-banner-sdk .ot-sdk-container {
	width: 100% !important; max-width: none !important; padding: 1.25rem 1.25rem 1.25rem !important; margin: 0 !important;
}
html #onetrust-consent-sdk #onetrust-banner-sdk .ot-sdk-row {
	display: flex !important; flex-direction: column !important; gap: 1rem !important;
}
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-group-container,
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group-parent {
	float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; position: static !important;
	left: auto !important; top: auto !important; transform: none !important;
}
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy { margin: 0 !important; }
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy-title {
	margin: 0 0 .5rem !important; padding: 0 !important;
	font: 300 1.5rem/1.1 var(--font-display) !important; letter-spacing: -.01em !important; color: var(--ink) !important;
}
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy-text {
	margin: 0 !important; padding: 0 !important; float: none !important;
	font: 400 .8125rem/1.55 var(--font-sans) !important; color: var(--sage) !important; letter-spacing: 0 !important;
}
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy-text a { margin-left: .25em !important; }
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group {
	display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: .625rem !important;
	width: 100% !important; margin: 0 !important; padding: 0 !important; text-align: left !important;
}
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group #onetrust-accept-btn-handler { order: 1; }
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group #onetrust-reject-all-handler { order: 2; }
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group #onetrust-pc-btn-handler { order: 3; }
/* Cookie Settings: a text link, like the footnote links. */
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-pc-btn-handler,
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-pc-btn-handler.cookie-setting-link {
	align-self: center !important;
	width: auto !important; height: 2.75rem !important; margin: 0 !important; padding: 0 .75rem !important;
	background: none !important; border: 0 !important; box-shadow: none !important; border-radius: .5rem !important;
	font: 500 .9375rem/1 var(--font-sans) !important; letter-spacing: 0 !important;
	color: var(--ink) !important; text-decoration: underline !important; text-underline-offset: .2em !important; opacity: 1 !important;
}
html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-close-btn-container { display: none !important; }

/* Phones: the notice is Dexcom's long legal text, so it gets a smaller size and scrolls inside the banner past
   about a third of the screen; Accept and Reject share a row so the choice stays in reach. */
@media (max-width: 639px) {
	html #onetrust-consent-sdk #onetrust-banner-sdk .ot-sdk-container { padding: 1rem 1rem .5rem !important; }
	html #onetrust-consent-sdk #onetrust-banner-sdk .ot-sdk-row { gap: .875rem !important; }
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy-text {
		max-height: 34svh !important; overflow-y: auto !important; overscroll-behavior: contain;
		font-size: .75rem !important; line-height: 1.5 !important;
	}
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group {
		display: grid !important; grid-template-columns: 1fr 1fr !important; gap: .5rem !important;
	}
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group #onetrust-accept-btn-handler,
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group #onetrust-reject-all-handler {
		height: 2.75rem !important; padding: 0 .75rem !important; font-size: .9375rem !important;
	}
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group #onetrust-pc-btn-handler { grid-column: 1 / -1 !important; }
}
/* Tablets and narrower desktops: notice on top, the three choices in a row under it. */
@media (min-width: 640px) {
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group { flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; }
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-pc-btn-handler { align-self: auto !important; }
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy-text { font-size: .875rem !important; }
}
@media (min-width: 1024px) {
	html #onetrust-consent-sdk #onetrust-banner-sdk {
		bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
		width: calc(100% - 2 * var(--gutter) + 2rem) !important;
	}
	html #onetrust-consent-sdk #onetrust-banner-sdk .ot-sdk-container { padding: 1.5rem 2rem !important; }
}
/* Wide screens: notice left, choices right (Accept nearest the edge). */
@media (min-width: 1280px) {
	html #onetrust-consent-sdk #onetrust-banner-sdk .ot-sdk-row { flex-direction: row !important; align-items: center !important; gap: 2.5rem !important; }
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-group-container { flex: 1 1 0 !important; min-width: 0 !important; }
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group-parent { flex: none !important; }
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group { flex-wrap: nowrap !important; flex-direction: row-reverse !important; }
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-button-group > button { order: 0 !important; }
	html #onetrust-consent-sdk #onetrust-banner-sdk #onetrust-policy-text { max-width: 52rem !important; }
}

/* ---------- preference centre ---------- */
html #onetrust-consent-sdk .onetrust-pc-dark-filter {
	background: rgba(27, 36, 32, .5) !important;
	-webkit-backdrop-filter: blur(.375rem); backdrop-filter: blur(.375rem);
}
html #onetrust-consent-sdk #onetrust-pc-sdk {
	background: var(--white) !important;
	border-radius: 1rem !important;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 1.5rem 3rem -16px rgba(20, 30, 24, .5) !important;
	overflow: hidden !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-pc-header {
	height: auto !important; min-height: 3.5rem !important; padding: .5rem .75rem 0 1.5rem !important;
	border-bottom: 0 !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk #close-pc-btn-handler.ot-close-icon {
	width: 2.75rem !important; height: 2.75rem !important; margin: 0 !important; top: auto !important; right: auto !important;
	background-size: .75rem !important; background-position: center !important; border-radius: 50% !important;
}
@media (hover: hover) {
	html #onetrust-consent-sdk #onetrust-pc-sdk #close-pc-btn-handler.ot-close-icon:hover { background-color: rgba(27, 36, 32, .06) !important; }
}
html #onetrust-consent-sdk #onetrust-pc-sdk #ot-pc-content {
	margin: 0 !important; padding: 0 1.5rem 1.5rem !important; width: auto !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk #ot-pc-title {
	margin: 0 0 1rem !important;
	font: 300 2rem/1.05 var(--font-display) !important; letter-spacing: -.01em !important; color: var(--ink) !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk #ot-pc-desc,
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-category-desc,
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-acc-txt p {
	font: 400 .875rem/1.55 var(--font-sans) !important; color: var(--sage) !important; letter-spacing: 0 !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk #accept-recommended-btn-handler { margin: 1.5rem 0 .5rem !important; }
html #onetrust-consent-sdk #onetrust-pc-sdk #ot-category-title {
	margin: 1.5rem 0 .75rem !important;
	font: 500 .75rem/1.3 var(--font-sans) !important; letter-spacing: .12em !important; text-transform: uppercase !important;
	color: var(--green) !important;
}
/* Categories: hairline rows instead of boxes. */
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-accordion-layout.ot-cat-item {
	margin: 0 !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important;
	background: none !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-accordion-layout.ot-cat-item:last-of-type { border-bottom: 1px solid var(--line) !important; }
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-accordion-layout .ot-acc-hdr { padding: 1rem 0 !important; }
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-accordion-layout .ot-acc-txt { background: none !important; }
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-accordion-layout .ot-acc-grpdesc { padding: 0 0 1rem 1.75rem !important; }
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-cat-header {
	font: 500 1rem/1.3 var(--font-sans) !important; color: var(--ink) !important; letter-spacing: 0 !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-plus-minus span { background: var(--ink) !important; }
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-always-active {
	font: 500 .75rem/1.3 var(--font-sans) !important; letter-spacing: .08em !important; text-transform: uppercase !important;
	color: var(--green) !important;
}
/* Switches: 38×22, green when on (handoff 03). */
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-tgl .ot-switch {
	width: 2.375rem !important; height: 1.375rem !important; border-radius: .6875rem !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-switch-nob {
	background: #9aa59d !important; border: 0 !important; border-radius: .6875rem !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-switch-nob::before {
	width: 1rem !important; height: 1rem !important; left: .1875rem !important; bottom: .1875rem !important; top: auto !important;
	background: #fff !important; border-radius: 50% !important; box-shadow: 0 1px 2px rgba(0, 0, 0, .25) !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-tgl input:checked + .ot-switch .ot-switch-nob { background: var(--green) !important; }
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-tgl input:checked + .ot-switch .ot-switch-nob::before {
	transform: translateX(1rem) !important; background: #fff !important; border-color: #fff !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-pc-footer {
	border-top: 1px solid var(--line) !important; background: var(--white) !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-btn-container {
	display: flex !important; flex-wrap: wrap !important; justify-content: flex-end !important; gap: .625rem !important;
	padding: 1rem 1.5rem !important; margin: 0 !important; text-align: right !important;
}
html #onetrust-consent-sdk #onetrust-pc-sdk .ot-btn-container button { flex: 0 0 auto !important; }
@media (max-width: 639px) {
	html #onetrust-consent-sdk #onetrust-pc-sdk .ot-btn-container { flex-direction: column-reverse !important; align-items: stretch !important; }
}

/* ---------- the footnotes' "Cookie Settings" (OneTrust's settings button, template-parts/legal.php) ---------- */
/* OneTrust styles #ot-sdk-btn as a green outlined box; here it reads like the other footnote links. */
html .legal #ot-sdk-btn.ot-sdk-show-settings,
html .legal #ot-sdk-btn.optanon-show-settings {
	display: inline !important; height: auto !important; margin: 0 !important; padding: 0 !important;
	background: none !important; border: 0 !important; border-radius: 0 !important;
	font: inherit !important; line-height: inherit !important; letter-spacing: inherit !important; white-space: normal !important;
	color: inherit !important; text-decoration: underline !important; text-underline-offset: .15em !important;
	cursor: pointer !important; word-wrap: normal !important;
}
html .legal #ot-sdk-btn.ot-sdk-show-settings:hover,
html .legal #ot-sdk-btn.optanon-show-settings:hover { background: none !important; color: var(--ink) !important; }

/* OneTrust focuses the banner itself when it opens (for screen readers): no box round the whole bar. */
html #onetrust-consent-sdk #onetrust-banner-sdk:focus,
html #onetrust-consent-sdk #onetrust-banner-sdk:focus-visible { outline: none !important; box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 .75rem 2rem -10px rgba(30, 45, 35, .35), 0 2rem 3.5rem -24px rgba(30, 45, 35, .3) !important; }

/* ---------- OneTrust's floating "Cookie Settings" button (after a choice is made) ---------- */
/* A small green circle (OneTrust's white icon) in the bottom-left margin, outside the gutter
   where the gallery's pause button and other bottom-left controls sit. Phones: lifted clear of the hero's two
   stacked buttons (the tallest bottom block). */
html #onetrust-consent-sdk #ot-sdk-btn-floating.ot-floating-button {
	left: .75rem !important; right: auto !important;
	bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
	width: 2.75rem !important; height: 2.75rem !important; z-index: 40 !important;
}
html #onetrust-consent-sdk #ot-sdk-btn-floating .ot-floating-button__front,
html #onetrust-consent-sdk #ot-sdk-btn-floating .ot-floating-button__back {
	background-color: var(--green) !important; border-radius: 50% !important;
	box-shadow: 0 .5rem 1.25rem -8px rgba(19, 125, 0, .6) !important;
	background-size: 55% !important; background-position: center !important;
}
html #onetrust-consent-sdk #ot-sdk-btn-floating button { width: 100% !important; height: 100% !important; border-radius: 50% !important; }
html #onetrust-consent-sdk #ot-sdk-btn-floating.ot-floating-button::before,
html #onetrust-consent-sdk #ot-sdk-btn-floating.ot-floating-button::after { font-family: var(--font-sans) !important; }
/* Phones and tablets (the Menu button's range): no floating shield; Cookie Settings is a link in the Menu panel
   (owner, Oct 28) and in the footnotes. */
@media (max-width: 1023px) {
	html #onetrust-consent-sdk #ot-sdk-btn-floating { display: none !important; }
}
/* Out of the way while a story, the menu, the form, an ambassador page or the video is open. */
html.is-reading #onetrust-consent-sdk #ot-sdk-btn-floating,
html.is-menu-open #onetrust-consent-sdk #ot-sdk-btn-floating,
html.is-form-open #onetrust-consent-sdk #ot-sdk-btn-floating,
html.is-amb-open #onetrust-consent-sdk #ot-sdk-btn-floating,
html.is-video-playing #onetrust-consent-sdk #ot-sdk-btn-floating { visibility: hidden !important; }
