/* ==========================================================================
   Shift Consent
   --------------------------------------------------------------------------
   MATCHING YOUR SITE:
   Every colour, radius and font is a custom property. To restyle the whole
   banner, redeclare any of these in Elementor > Site Settings > Custom CSS,
   or in your child theme. You should not need to edit anything below the
   :root block.
   ========================================================================== */

:root {
	/* Surfaces */
	--shift-consent-bg:            #ffffff;
	--shift-consent-bg-alt:        #f6f6f4;
	--shift-consent-border:        #e2e2dd;
	--shift-consent-shadow:        0 -1px 0 rgba(0, 0, 0, .04), 0 -12px 40px rgba(0, 0, 0, .10);

	/* Text */
	--shift-consent-text:          #1b1b1a;
	--shift-consent-text-muted:    #55554f;

	/* Accent — set this to your brand colour and most of the work is done */
	--shift-consent-accent:        #1b1b1a;
	--shift-consent-accent-text:   #ffffff;
	--shift-consent-accent-hover:  #000000;

	/* Focus ring: keep this visible. It is the difference between a banner
	   that passes a keyboard audit and one that does not. */
	--shift-consent-focus:         #2563eb;

	/* Shape and type — default to inheriting the theme's font stack */
	--shift-consent-radius:        8px;
	--shift-consent-radius-sm:     6px;
	--shift-consent-font:          inherit;
	--shift-consent-size:          15px;
	--shift-consent-size-sm:       13.5px;
	--shift-consent-title-size:    17px;
	--shift-consent-max-width:     1180px;
	--shift-consent-z:             99999;
}

.shift-consent[hidden],
.shift-consent [hidden] {
	display: none !important;
}

.shift-consent,
.shift-consent * {
	box-sizing: border-box;
}

.shift-consent {
	font-family: var(--shift-consent-font);
	font-size: var(--shift-consent-size);
	line-height: 1.55;
	color: var(--shift-consent-text);
}

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

.shift-consent__banner {
	position: fixed;
	inset: auto 0 0 0;
	z-index: var(--shift-consent-z);
	background: var(--shift-consent-bg);
	border-top: 1px solid var(--shift-consent-border);
	box-shadow: var(--shift-consent-shadow);
	padding: 18px 20px;
	animation: shift-consent-rise .28s ease-out both;
}

@keyframes shift-consent-rise {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

.shift-consent__banner-inner {
	max-width: var(--shift-consent-max-width);
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
}

.shift-consent__text {
	flex: 1 1 380px;
	min-width: 0;
}

.shift-consent__title {
	margin: 0 0 4px;
	font-size: var(--shift-consent-title-size);
	font-weight: 600;
	line-height: 1.3;
	color: var(--shift-consent-text);
}

.shift-consent__title:focus-visible {
	outline: 2px solid var(--shift-consent-focus);
	outline-offset: 3px;
}

.shift-consent__body {
	margin: 0;
	font-size: var(--shift-consent-size-sm);
	color: var(--shift-consent-text-muted);
}

.shift-consent__link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

.shift-consent__link:hover {
	color: var(--shift-consent-text);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.shift-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 0 1 auto;
}

.shift-consent__btn {
	font: inherit;
	font-size: var(--shift-consent-size-sm);
	font-weight: 600;
	line-height: 1;
	padding: 12px 20px;
	min-height: 44px;          /* WCAG 2.2 target size */
	border-radius: var(--shift-consent-radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

/* Accept and Reject are deliberately identical in weight. Making "Accept"
   louder than "Reject" is a dark pattern and is explicitly called out by
   regulators. Do not restyle these differently. */
.shift-consent__btn--primary {
	background: var(--shift-consent-accent);
	color: var(--shift-consent-accent-text);
	border-color: var(--shift-consent-accent);
}

.shift-consent__btn--primary:hover {
	background: var(--shift-consent-accent-hover);
	border-color: var(--shift-consent-accent-hover);
}

.shift-consent__btn--ghost {
	background: transparent;
	color: var(--shift-consent-text);
	border-color: var(--shift-consent-border);
}

.shift-consent__btn--ghost:hover {
	background: var(--shift-consent-bg-alt);
}

.shift-consent__btn:focus-visible,
.shift-consent__close:focus-visible,
.shift-consent__reopen:focus-visible {
	outline: 2px solid var(--shift-consent-focus);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Preferences dialog
   -------------------------------------------------------------------------- */

.shift-consent__overlay {
	position: fixed;
	inset: 0;
	z-index: calc(var(--shift-consent-z) + 1);
	background: rgba(20, 20, 18, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
}

.shift-consent__modal {
	background: var(--shift-consent-bg);
	border-radius: var(--shift-consent-radius);
	max-width: 560px;
	width: 100%;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 24px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.shift-consent__modal-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}

.shift-consent__modal-head .shift-consent__title {
	font-size: 20px;
	margin: 0;
}

.shift-consent__close {
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--shift-consent-radius-sm);
	color: var(--shift-consent-text-muted);
	cursor: pointer;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	margin: -10px -8px 0 0;
}

.shift-consent__close:hover {
	background: var(--shift-consent-bg-alt);
	color: var(--shift-consent-text);
}

.shift-consent__list {
	list-style: none;
	margin: 20px 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.shift-consent__item {
	background: var(--shift-consent-bg-alt);
	border: 1px solid var(--shift-consent-border);
	border-radius: var(--shift-consent-radius-sm);
	padding: 14px 16px;
}

.shift-consent__item-body {
	margin: 8px 0 0 62px;
	font-size: var(--shift-consent-size-sm);
	color: var(--shift-consent-text-muted);
}

/* Switch ------------------------------------------------------------------ */

.shift-consent__switch {
	display: flex;
	align-items: center;
	gap: 14px;
	cursor: pointer;
	font-weight: 600;
}

.shift-consent__switch input {
	position: absolute;
	opacity: 0;
	width: 44px;
	height: 26px;
	margin: 0;
	cursor: pointer;
}

.shift-consent__switch-track {
	flex: none;
	width: 44px;
	height: 26px;
	border-radius: 13px;
	background: #c9c9c2;
	border: 1px solid rgba(0, 0, 0, .08);
	position: relative;
	transition: background-color .18s ease;
}

.shift-consent__switch-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
	transition: transform .18s ease;
}

.shift-consent__switch input:checked ~ .shift-consent__switch-track {
	background: var(--shift-consent-accent);
}

.shift-consent__switch input:checked ~ .shift-consent__switch-track .shift-consent__switch-thumb {
	transform: translateX(18px);
}

.shift-consent__switch input:focus-visible ~ .shift-consent__switch-track {
	outline: 2px solid var(--shift-consent-focus);
	outline-offset: 3px;
}

.shift-consent__switch input:disabled ~ .shift-consent__switch-track {
	opacity: .55;
	cursor: not-allowed;
}

.shift-consent__switch input:disabled ~ .shift-consent__switch-label {
	cursor: not-allowed;
}

.shift-consent__pill {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 100px;
	background: var(--shift-consent-bg);
	border: 1px solid var(--shift-consent-border);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--shift-consent-text-muted);
	vertical-align: 1px;
}

.shift-consent__actions--modal {
	margin-top: 4px;
}

/* Footer re-open link ------------------------------------------------------ */

.shift-consent__reopen {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Utility ------------------------------------------------------------------ */

.shift-consent__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 720px) {
	.shift-consent__banner {
		padding: 16px;
		max-height: 85vh;
		overflow-y: auto;
	}

	.shift-consent__banner-inner {
		gap: 14px;
	}

	.shift-consent__actions {
		width: 100%;
	}

	.shift-consent__btn {
		flex: 1 1 auto;
		justify-content: center;
	}

	.shift-consent__item-body {
		margin-left: 0;
	}

	.shift-consent__modal {
		padding: 20px 18px;
	}
}

/* --------------------------------------------------------------------------
   Motion and contrast preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.shift-consent__banner {
		animation: none;
	}

	.shift-consent *,
	.shift-consent *::before,
	.shift-consent *::after {
		transition-duration: .01ms !important;
	}
}

@media (forced-colors: active) {
	.shift-consent__banner,
	.shift-consent__modal,
	.shift-consent__item {
		border: 1px solid CanvasText;
	}

	.shift-consent__switch-track {
		border: 1px solid CanvasText;
	}

	.shift-consent__switch input:checked ~ .shift-consent__switch-track {
		background: Highlight;
	}
}

/* --------------------------------------------------------------------------
   Position variant: floating card (Appearance > Banner position)
   -------------------------------------------------------------------------- */

.shift-consent--centered .shift-consent__banner {
	inset: auto auto 20px 20px;
	max-width: 440px;
	border: 1px solid var(--shift-consent-border);
	border-radius: var(--shift-consent-radius);
	padding: 22px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, .18);
}

.shift-consent--centered .shift-consent__banner-inner {
	display: block;
}

.shift-consent--centered .shift-consent__actions {
	margin-top: 16px;
}

.shift-consent--centered .shift-consent__btn {
	flex: 1 1 auto;
}

@media (max-width: 720px) {
	.shift-consent--centered .shift-consent__banner {
		inset: auto 12px 12px 12px;
		max-width: none;
	}
}

/* ==========================================================================
   THEME RESETS
   --------------------------------------------------------------------------
   Themes and page builders style bare `button` elements aggressively:
   Elementor kits, Astra, Kadence and GeneratePress all ship button rules that
   beat a single class selector. This block re-asserts the banner's own styling
   with enough specificity to win, and marks the handful of properties that
   builders set inline as important.

   This is scoped entirely inside .shift-consent, so nothing here can leak out
   and affect the rest of the site.
   ========================================================================== */

.shift-consent .shift-consent__btn,
.shift-consent .shift-consent__close,
.shift-consent .shift-consent__reopen {
	font-family: var(--shift-consent-font) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	text-shadow: none !important;
	background-image: none !important;
	width: auto;
	max-width: none;
	margin: 0;
}

.shift-consent .shift-consent__btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	font-size: var(--shift-consent-size-sm) !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	padding: 12px 20px !important;
	min-height: 44px !important;
	border-width: 1px !important;
	border-style: solid !important;
	border-radius: var(--shift-consent-radius-sm) !important;
	text-decoration: none !important;
	cursor: pointer;
}

.shift-consent .shift-consent__btn--primary,
.shift-consent .shift-consent__btn--primary:visited {
	background-color: var(--shift-consent-accent) !important;
	border-color: var(--shift-consent-accent) !important;
	color: var(--shift-consent-accent-text) !important;
}

.shift-consent .shift-consent__btn--primary:hover,
.shift-consent .shift-consent__btn--primary:focus {
	background-color: var(--shift-consent-accent-hover) !important;
	border-color: var(--shift-consent-accent-hover) !important;
	color: var(--shift-consent-accent-text) !important;
}

.shift-consent .shift-consent__btn--ghost,
.shift-consent .shift-consent__btn--ghost:visited {
	background-color: transparent !important;
	border-color: var(--shift-consent-border) !important;
	color: var(--shift-consent-text) !important;
}

.shift-consent .shift-consent__btn--ghost:hover,
.shift-consent .shift-consent__btn--ghost:focus {
	background-color: var(--shift-consent-bg-alt) !important;
	border-color: var(--shift-consent-border) !important;
	color: var(--shift-consent-text) !important;
}

.shift-consent .shift-consent__btn:focus-visible,
.shift-consent .shift-consent__close:focus-visible,
.shift-consent .shift-consent__reopen:focus-visible,
.shift-consent .shift-consent__switch input:focus-visible ~ .shift-consent__switch-track,
.shift-consent .shift-consent__title:focus-visible {
	outline: 2px solid var(--shift-consent-focus) !important;
	outline-offset: 2px !important;
}

/* Surfaces */

.shift-consent .shift-consent__banner {
	background-color: var(--shift-consent-bg) !important;
	border-top-color: var(--shift-consent-border);
	color: var(--shift-consent-text);
}

.shift-consent--centered .shift-consent__banner,
.shift-consent .shift-consent__modal {
	background-color: var(--shift-consent-bg) !important;
	border-radius: var(--shift-consent-radius) !important;
}

.shift-consent .shift-consent__item {
	background-color: var(--shift-consent-bg-alt) !important;
	border-color: var(--shift-consent-border) !important;
	border-radius: var(--shift-consent-radius-sm) !important;
}

/* Type. Themes commonly set heading colour and margins globally. */

.shift-consent .shift-consent__title {
	color: var(--shift-consent-text) !important;
	font-family: var(--shift-consent-font) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	margin: 0 0 4px !important;
	padding: 0 !important;
}

.shift-consent .shift-consent__modal .shift-consent__title {
	margin: 0 !important;
}

.shift-consent .shift-consent__body,
.shift-consent .shift-consent__item-body {
	color: var(--shift-consent-text-muted) !important;
	font-family: var(--shift-consent-font) !important;
	font-size: var(--shift-consent-size-sm) !important;
}

.shift-consent .shift-consent__switch-label {
	color: var(--shift-consent-text) !important;
}

.shift-consent .shift-consent__link,
.shift-consent .shift-consent__link:visited {
	color: inherit !important;
	background: none !important;
	text-decoration: underline !important;
	font-weight: inherit !important;
}

.shift-consent .shift-consent__link:hover {
	color: var(--shift-consent-text) !important;
}

/* Switch */

.shift-consent .shift-consent__switch input:checked ~ .shift-consent__switch-track {
	background-color: var(--shift-consent-accent) !important;
}

/* Close button */

.shift-consent .shift-consent__close {
	background-color: transparent !important;
	border-color: transparent !important;
	color: var(--shift-consent-text-muted) !important;
	padding: 0 !important;
	min-height: 0 !important;
}

.shift-consent .shift-consent__close:hover {
	background-color: var(--shift-consent-bg-alt) !important;
	color: var(--shift-consent-text) !important;
}

/* Footer re-open link */

.shift-consent__reopen {
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	color: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	text-decoration: underline !important;
}

/* ==========================================================================
   BORDERLESS VARIANT  (Appearance > Borders > No borders)
   --------------------------------------------------------------------------
   Drops every decorative border. Two things are deliberately kept:

   1. Secondary buttons switch from outline to a filled background. A button
      defined only by its border becomes invisible without one, which fails
      WCAG 1.4.11 Non-text Contrast (3:1 for interface components).
   2. Focus rings stay. They are not decoration.
   ========================================================================== */

.shift-consent--no-borders .shift-consent__banner {
	border-top: 0 !important;
	box-shadow: 0 -12px 44px rgba(0, 0, 0, .13) !important;
}

.shift-consent--no-borders.shift-consent--centered .shift-consent__banner {
	border: 0 !important;
}

.shift-consent--no-borders .shift-consent__modal {
	border: 0 !important;
}

.shift-consent--no-borders .shift-consent__item {
	border: 0 !important;
}

/* Secondary buttons: outline becomes fill. */
.shift-consent--no-borders .shift-consent__btn--ghost,
.shift-consent--no-borders .shift-consent__btn--ghost:visited {
	background-color: var(--shift-consent-bg-alt) !important;
	border-color: transparent !important;
	color: var(--shift-consent-text) !important;
}

.shift-consent--no-borders .shift-consent__btn--ghost:hover,
.shift-consent--no-borders .shift-consent__btn--ghost:focus {
	background-color: var(--shift-consent-border) !important;
	border-color: transparent !important;
	color: var(--shift-consent-text) !important;
}

.shift-consent--no-borders .shift-consent__btn--primary,
.shift-consent--no-borders .shift-consent__btn--primary:visited,
.shift-consent--no-borders .shift-consent__btn--primary:hover {
	border-color: transparent !important;
}

.shift-consent--no-borders .shift-consent__pill {
	border: 0 !important;
	background-color: var(--shift-consent-border) !important;
}

/* The switch keeps its hairline: it is a control, not decoration, and the
   off state needs to read as a shape against the panel behind it. */
.shift-consent--no-borders .shift-consent__switch-track {
	border-color: rgba(0, 0, 0, .10) !important;
}

/* Focus rings are never removed. */
.shift-consent--no-borders .shift-consent__btn:focus-visible,
.shift-consent--no-borders .shift-consent__close:focus-visible,
.shift-consent--no-borders .shift-consent__reopen:focus-visible,
.shift-consent--no-borders .shift-consent__title:focus-visible,
.shift-consent--no-borders .shift-consent__switch input:focus-visible ~ .shift-consent__switch-track {
	outline: 2px solid var(--shift-consent-focus) !important;
	outline-offset: 2px !important;
}

/* Windows High Contrast still needs edges regardless of this setting. */
@media (forced-colors: active) {
	.shift-consent--no-borders .shift-consent__banner,
	.shift-consent--no-borders .shift-consent__modal,
	.shift-consent--no-borders .shift-consent__item,
	.shift-consent--no-borders .shift-consent__btn {
		border: 1px solid CanvasText !important;
	}
}
