/**
 * Cookie consent banner + "Manage cookies" panel (inc/cookie-consent.php).
 *
 * Built from the glass layer's own recipes (assets/css/glass.css): the dark
 * glass card (rgba(28,24,20,.68) under a 135deg sheen, frosted), the 1px
 * white fade edge (--pc-edge, cut to a ring with the mask trick), and the gold
 * pill (--pc-amber under a white top shine). Fonts: --nm-font-1 for headings,
 * --nm-font-2 for text.
 *
 * Stacking: 999998 — under the form-success modal (999999) and Popup Maker,
 * over everything the theme draws. The banner sits bottom-LEFT because the
 * back-to-top button owns bottom-right.
 */

/* ---------- shared: glass surface + edge ring ---------- */

.pc-consent-banner,
.pc-consent-dialog {
	position: relative;
	color: #fff;
	font-family: var(--nm-font-2, "Inter", sans-serif);
	background-color: rgba(28, 24, 20, 0.78);
	background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 45%);
	-webkit-backdrop-filter: blur(20px) saturate(140%);
	        backdrop-filter: blur(20px) saturate(140%);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
	border-radius: 22px;
}

.pc-consent-banner::after,
.pc-consent-dialog::after {
	content: "";
	position: absolute;
	inset: 0;
	padding: 1px;
	border-radius: inherit;
	background: var(--pc-edge, linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, #fff 50%, rgba(255, 255, 255, 0) 100%));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	        mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
}

.pc-consent-kicker {
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: #ffa201;
}

.pc-consent-banner a,
.pc-consent-dialog a {
	color: #fff;
	text-decoration: underline;
	text-decoration-color: rgba(255, 162, 1, 0.7);
	text-underline-offset: 3px;
}

.pc-consent-banner a:hover,
.pc-consent-dialog a:hover {
	color: #ffa201;
}

/* ---------- buttons ---------- */

.pc-consent-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 100px;
	font-family: var(--nm-font-1, "Space Grotesk", sans-serif);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.pc-consent-btn:focus-visible,
.pc-consent-close:focus-visible,
.pc-consent-footer-link:focus-visible,
.pc-consent-switch input:focus-visible + .pc-consent-track {
	outline: 2px solid #ffa201;
	outline-offset: 3px;
}

/* Gold pill — the header's "Contact Us" recipe. */
.pc-consent-btn.is-gold {
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	background-color: rgba(150, 106, 44, 0.9);
	background-image:
		linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%),
		var(--pc-amber, linear-gradient(90deg, rgba(166, 128, 70, 0.9) 0%, rgba(150, 106, 44, 0.9) 55%, rgba(132, 90, 30, 0.9) 100%));
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.pc-consent-btn.is-gold:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

/* Glass pill — the back-to-top / "Schedule a Strategy Call" recipe. */
.pc-consent-btn.is-glass {
	color: #fff;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 55%),
		rgba(45, 45, 45, 0.55);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.pc-consent-btn.is-glass:hover {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.pc-consent-btn.is-text {
	padding: 0 8px;
	color: rgba(255, 255, 255, 0.8);
	background: none;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.pc-consent-btn.is-text:hover {
	color: #ffa201;
}

/* ---------- banner ---------- */

.pc-consent-banner {
	position: fixed;
	left: 24px;
	bottom: 24px;
	z-index: 999998;
	width: min(440px, calc(100vw - 48px));
	padding: 22px 22px 18px;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.4s ease, transform 0.5s var(--nm-cube-1, cubic-bezier(0.55, 0.085, 0, 0.99));
}

.pc-consent-banner.is-open {
	opacity: 1;
	transform: none;
}

.pc-consent-banner[hidden],
.pc-consent-modal[hidden] {
	display: none;
}

.pc-consent-text {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
}

.pc-consent-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

/* ---------- panel ---------- */

.pc-consent-modal {
	position: fixed;
	inset: 0;
	z-index: 999998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.pc-consent-modal.is-open {
	opacity: 1;
}

.pc-consent-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	-webkit-backdrop-filter: blur(4px);
	        backdrop-filter: blur(4px);
}

.pc-consent-dialog {
	width: min(560px, 100%);
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	padding: 34px 32px 26px;
	outline: none;
	transform: translateY(12px) scale(0.98);
	transition: transform 0.45s var(--nm-cube-1, cubic-bezier(0.55, 0.085, 0, 0.99));
}

.pc-consent-modal.is-open .pc-consent-dialog {
	transform: none;
}

html.pc-consent-lock,
html.pc-consent-lock body {
	overflow: hidden;
}

.pc-consent-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.pc-consent-close:hover {
	background: rgba(255, 255, 255, 0.16);
}

.pc-consent-title {
	margin: 0 0 10px;
	font-family: var(--nm-font-1, "Space Grotesk", sans-serif);
	font-size: clamp(24px, 3vw, 30px);
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
}

.pc-consent-intro,
.pc-consent-gpc {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.75);
}

.pc-consent-gpc {
	padding: 10px 14px;
	border-radius: 12px;
	background: rgba(255, 162, 1, 0.1);
	color: rgba(255, 255, 255, 0.9);
}

.pc-consent-gpc[hidden] {
	display: none;
}

.pc-consent-rows {
	margin: 0 0 22px;
}

.pc-consent-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 16px 0;
	border-top: 1px solid transparent;
	border-image: var(--pc-line-h, linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fff 50%, rgba(255, 255, 255, 0) 100%)) 1;
}

.pc-consent-row:last-child {
	border-bottom: 1px solid transparent;
}

.pc-consent-row-title {
	display: block;
	margin: 0 0 3px;
	font-family: var(--nm-font-1, "Space Grotesk", sans-serif);
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
}

.pc-consent-row-desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.62);
}

.pc-consent-always {
	flex: none;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: #ffa201;
}

.pc-consent-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* Toggle: glass track, gold when on. */
.pc-consent-switch {
	position: relative;
	flex: none;
	width: 50px;
	height: 28px;
}

.pc-consent-switch input {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.pc-consent-track {
	position: absolute;
	inset: 0;
	border-radius: 100px;
	background: rgba(255, 255, 255, 0.12);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
	transition: background 0.25s ease, box-shadow 0.25s ease;
}

.pc-consent-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
	transition: transform 0.25s var(--nm-cube-1, cubic-bezier(0.55, 0.085, 0, 0.99));
}

.pc-consent-switch input:checked + .pc-consent-track {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 60%),
		var(--pc-amber, rgba(150, 106, 44, 0.9));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.pc-consent-switch input:checked + .pc-consent-track .pc-consent-thumb {
	transform: translateX(22px);
}

.pc-consent-dialog-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
}

.pc-consent-foot {
	margin: 16px 0 0;
	font-size: 13px;
	text-align: right;
	color: rgba(255, 255, 255, 0.6);
}

/* ---------- footer trigger ---------- */

.pc-consent-footer-item {
	white-space: nowrap;
}

.pc-consent-sep {
	margin: 0 8px;
	opacity: 0.5;
}

.pc-consent-footer-link {
	padding: 0;
	border: 0;
	font: inherit;
	color: inherit;
	background: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.pc-consent-footer-link:hover {
	color: #ffa201;
}

/* ---------- phones: banner becomes a bottom sheet ---------- */

@media (max-width: 575px) {
	.pc-consent-banner {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		padding: 20px 18px 16px;
	}

	.pc-consent-actions .pc-consent-btn {
		flex: 1 1 auto;
	}

	.pc-consent-actions .pc-consent-btn.is-text {
		flex: 0 0 100%;
	}

	.pc-consent-dialog {
		padding: 30px 20px 22px;
	}

	/* Reject + Save share a row, Accept all spans under them: all three stay
	   within reach without scrolling past the rows. */
	.pc-consent-dialog-actions .pc-consent-btn {
		flex: 1 1 calc(50% - 5px);
		padding: 0 12px;
	}

	.pc-consent-dialog-actions .pc-consent-btn.is-gold {
		flex-basis: 100%;
	}

	.pc-consent-row {
		padding: 13px 0;
	}

	.pc-consent-foot {
		text-align: center;
	}
}

/* ---------- no backdrop-filter: keep it readable ---------- */

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.pc-consent-banner,
	.pc-consent-dialog {
		background-color: #1c1814;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pc-consent-banner,
	.pc-consent-modal,
	.pc-consent-dialog,
	.pc-consent-thumb,
	.pc-consent-btn {
		transition: none;
	}
}
