

#lpc-consent[hidden],
.lpc-bar[hidden],
.lpc-backdrop[hidden],
.lpc-modal[hidden] {
	display: none !important;
}

.lpc-backdrop {
	position: fixed;
	inset: 0;
	z-index: calc(var(--lpc-z) - 1);
	background: rgb(0 0 0 / 50%);
	animation: lpc-fade 0.25s ease-out;
}

#lpc-consent {
	--lpc-z: 2000;
	--lpc-surface: var(--paper, #ffffff);
	--lpc-text: var(--gray-700, #374151);
	--lpc-title: var(--ink, #111114);
	--lpc-line: var(--gray-300, #d8d5cc);

	--lpc-accent: var(--brand-600, #2a6fa8);
	--lpc-accent-hover: #1f5580;
	--lpc-focus: var(--brand, #378ccf);

	font-family: inherit;
	color: var(--lpc-text);
}

.lpc-bar {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: var(--lpc-z);
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	background: var(--lpc-surface);
	border-top: 1px solid var(--lpc-line);
	box-shadow: 0 -2px 12px rgb(0 0 0 / 12%);
	animation: lpc-slide 0.25s ease-out;
}

.lpc-bar-text {
	flex: 1 1 22rem;
	font-size: 0.875rem;
	line-height: 1.55;
}

.lpc-bar-text p {
	margin: 0;
}

.lpc-bar-text a {
	color: var(--lpc-accent);
}

.lpc-bar-title {
	font-weight: 600;
	color: var(--lpc-title);
	margin-bottom: 0.25rem !important;
}

.lpc-bar-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.lpc-btn {
	font: inherit;
	font-size: 0.875rem;
	line-height: 1.2;
	cursor: pointer;
	padding: 0.55rem 1.1rem;
	border-radius: 6px;
	border: 1px solid transparent;
	white-space: nowrap;
}

.lpc-btn-primary {
	background: var(--lpc-accent);
	color: #ffffff;
}

.lpc-btn-primary:hover {
	background: var(--lpc-accent-hover);
}

.lpc-btn-ghost {
	background: transparent;
	color: inherit;
	border-color: var(--lpc-line);
}

.lpc-btn:focus-visible,
.lpc-close:focus-visible {
	outline: 3px solid var(--lpc-focus);
	outline-offset: 2px;
}

.lpc-modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--lpc-z) + 1);
	display: grid;
	place-items: center;
	padding: 1rem;
}

.lpc-overlay {
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 45%);
}

.lpc-dialog {
	position: relative;
	width: min(34rem, 100%);
	max-height: 85vh;
	overflow-y: auto;
	background: var(--lpc-surface);
	border-radius: 10px;
	box-shadow: 0 10px 40px rgb(0 0 0 / 25%);
	padding: 1.25rem;
}

.lpc-dialog-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.lpc-dialog-head h2 {
	font-size: 1.125rem;
	color: var(--lpc-title);
	margin: 0;
}

.lpc-close {
	font: inherit;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	background: transparent;
	border: 0;
	color: inherit;
	padding: 0.25rem 0.5rem;
	border-radius: 6px;
}

.lpc-group {
	padding: 0.9rem 0;
	border-top: 1px solid var(--lpc-line);
	font-size: 0.875rem;
	line-height: 1.55;
}

.lpc-group p {
	margin: 0.35rem 0 0 1.65rem;
	opacity: 0.85;
}

.lpc-group-head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 600;
	color: var(--lpc-title);
	cursor: pointer;
}

.lpc-group-head input {
	accent-color: var(--lpc-accent);
}

.lpc-group-head input[disabled] {
	cursor: not-allowed;
	opacity: 0.5;
}

.lpc-dialog-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--lpc-line);
}

@keyframes lpc-slide {
	from {
		transform: translateY(100%);
	}
	to {
		transform: translateY(0);
	}
}

@keyframes lpc-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lpc-bar,
	.lpc-backdrop {
		animation: none;
	}
}

@media (max-width: 640px) {
	.lpc-bar {
		flex-direction: column;
		align-items: stretch;
		gap: 0.625rem;

		padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));

		max-height: 70vh;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.lpc-bar-text {
		flex: none;
		font-size: 0.8125rem;
	}

	.lpc-bar-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.5rem;
	}

	.lpc-btn {
		width: 100%;
		min-height: 44px;
		font-size: 0.875rem;
		padding-inline: 0.5rem;

		white-space: normal;
	}

	.lpc-bar-actions .lpc-btn-ghost {
		grid-column: 1 / -1;
	}

	.lpc-modal {
		padding: 0.75rem;
	}

	.lpc-dialog {

		max-height: min(85vh, 100dvh - 1.5rem);
		padding: 1rem;
		overscroll-behavior: contain;
	}

	.lpc-dialog-foot {
		flex-direction: column;
	}

	.lpc-dialog-foot .lpc-btn {
		width: 100%;
	}

	.lpc-group p {
		margin-left: 0;
	}
}
