/**
 * Cookie consent: what makes the banner and the dialog work and stay readable without the
 * pack's styles. A site pack gives them their look (its own rules on these classes).
 */
.kv-consent [hidden] {
	display: none !important;
}

.kv-consent__banner {
	position: fixed;
	inset: auto 0 0;
	z-index: 99990;
	max-height: 60vh;
	overflow: auto;
	padding: var(--kv-space-md, 1rem) var(--kv-gutter, 1rem);
	background: var(--kv-surface, #fff);
	color: var(--kv-text, #1d1d1f);
	border-top: 1px solid var(--kv-border, #d6d4cf);
}

.kv-consent__title {
	margin: 0 0 0.5em;
	font-size: 1.125rem;
}

.kv-consent__choices {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

/* Three equal choices: one size, one look. */
.kv-consent__button {
	flex: 1 1 0;
	min-width: 8rem;
	min-height: 44px;
	padding: 0.6em 1em;
	border: 1px solid var(--kv-control-border, currentColor);
	border-radius: var(--kv-radius-small, 4px);
	background: var(--kv-accent, #1d1d1f);
	color: var(--kv-accent-contrast, #fff);
	font: inherit;
	cursor: pointer;
}

.kv-consent__button:focus-visible,
.kv-consent__close:focus-visible,
.kv-consent__switch input:focus-visible {
	outline: 2px solid var(--kv-focus, #1d4ed8);
	outline-offset: 2px;
}

.kv-consent__dialog {
	width: min(40rem, calc(100vw - 2rem));
	max-height: 90vh;
	overflow: auto;
	padding: var(--kv-space-lg, 1.5rem);
	border: 1px solid var(--kv-border, #d6d4cf);
	background: var(--kv-surface, #fff);
	color: var(--kv-text, #1d1d1f);
}

.kv-consent__close {
	float: right;
	min-width: 44px;
	min-height: 44px;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 1.5rem;
	cursor: pointer;
}

.kv-consent__category {
	padding: 0.75rem 0;
	border-top: 1px solid var(--kv-border, #d6d4cf);
}

.kv-consent__category-title {
	margin: 0 0 0.25em;
	font-size: 1rem;
}

.kv-consent__switch {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	cursor: pointer;
}

.kv-consent__switch input {
	width: 1.25rem;
	height: 1.25rem;
}

.kv-consent__saved {
	position: fixed;
	inset: auto 1rem 1rem auto;
	z-index: 99991;
	max-width: 24rem;
	margin: 0;
	padding: 0.75rem 1rem;
	background: var(--kv-surface, #fff);
	color: var(--kv-text, #1d1d1f);
	border: 1px solid var(--kv-border, #d6d4cf);
}

.kv-consent__saved:empty {
	display: none;
}
