:root {
	--pip-charcoal: #263b36;
	--pip-cream: #f5f1e8;
	--pip-sage: #91a795;
	--pip-line: #d8dfd8;
}

.pip-consent[hidden],
.pip-privacy-modal[hidden],
.pip-privacy-reopen[hidden] { display: none !important; }

.pip-consent {
	position: fixed;
	z-index: 999999;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	width: min(1120px, calc(100% - 32px));
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 28px;
	align-items: end;
	padding: 24px 26px;
	background: var(--pip-cream);
	color: var(--pip-charcoal);
	border: 1px solid rgba(38, 59, 54, .16);
	border-radius: 18px;
	box-shadow: 0 18px 55px rgba(25, 39, 35, .22);
	font-family: inherit;
}

.pip-consent h2,
.pip-privacy-modal h2 { margin: 2px 0 8px; color: var(--pip-charcoal); font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.15; }
.pip-consent p,
.pip-privacy-modal p { margin: 0; line-height: 1.55; }
.pip-consent a { display: inline-block; margin-top: 8px; color: var(--pip-charcoal); }
.pip-consent__eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .72; }
.pip-consent__actions,
.pip-privacy-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.pip-button {
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid var(--pip-charcoal);
	border-radius: 999px;
	font: inherit;
	font-weight: 650;
	cursor: pointer;
}
.pip-button--primary { background: var(--pip-charcoal); color: #fff; }
.pip-button--secondary { background: transparent; color: var(--pip-charcoal); }
.pip-button:focus-visible,
.pip-privacy-reopen:focus-visible,
.pip-privacy-modal__close:focus-visible { outline: 3px solid var(--pip-sage); outline-offset: 3px; }

.pip-privacy-modal { position: fixed; z-index: 1000000; inset: 0; display: grid; place-items: center; padding: 20px; }
.pip-privacy-modal__backdrop { position: absolute; inset: 0; background: rgba(18, 29, 26, .66); }
.pip-privacy-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(680px, 100%);
	max-height: min(760px, calc(100vh - 40px));
	overflow: auto;
	box-sizing: border-box;
	padding: 30px;
	background: #fff;
	color: var(--pip-charcoal);
	border-radius: 20px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
}
.pip-privacy-modal__close { position: absolute; z-index: 2; top: 14px; right: 16px; border: 0; background: transparent; color: var(--pip-charcoal); font-size: 2rem; cursor: pointer; }
.pip-privacy-options { margin: 24px 0; border-top: 1px solid var(--pip-line); }
.pip-privacy-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--pip-line); cursor: pointer; }
.pip-privacy-option strong,
.pip-privacy-option small { display: block; }
.pip-privacy-option small { margin-top: 4px; line-height: 1.45; opacity: .76; }
.pip-privacy-option input { position: absolute; opacity: 0; pointer-events: none; }
.pip-switch { width: 46px; height: 26px; padding: 3px; box-sizing: border-box; border-radius: 999px; background: #c6cec8; transition: .2s ease; }
.pip-switch::after { content: ''; display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: .2s ease; }
.pip-privacy-option input:checked + .pip-switch { background: var(--pip-charcoal); }
.pip-privacy-option input:checked + .pip-switch::after { transform: translateX(20px); }
.pip-privacy-option--locked { cursor: default; }
.pip-privacy-option--locked .pip-switch { opacity: .64; }

.pip-privacy-reopen {
	position: fixed;
	z-index: 99990;
	left: 14px;
	bottom: 14px;
	padding: 7px 12px;
	border: 1px solid rgba(38,59,54,.3);
	border-radius: 999px;
	background: rgba(245,241,232,.94);
	color: var(--pip-charcoal);
	font: inherit;
	font-size: .78rem;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(25,39,35,.12);
}
.pip-privacy-text-link { border: 0; padding: 0; background: transparent; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.pip-privacy-open { overflow: hidden; }

@media (max-width: 760px) {
	.pip-consent { grid-template-columns: 1fr; gap: 18px; bottom: 10px; width: calc(100% - 20px); padding: 20px; border-radius: 15px; }
	.pip-consent__actions,
	.pip-privacy-modal__actions { display: grid; grid-template-columns: 1fr; }
	.pip-button { width: 100%; }
	.pip-privacy-modal { padding: 10px; }
	.pip-privacy-modal__dialog { max-height: calc(100vh - 20px); padding: 24px 20px; border-radius: 15px; }
}
