/* Kareva Cookie Consent — front end.
	Colours come from the settings as CSS variables on .kcc. */

.kcc {
	--kcc-bg: #fff;
	--kcc-text: #1d1d1f;
	--kcc-accent: #1d1d1f;
	--kcc-accent-text: #fff;
	--kcc-radius: 16px;
	--kcc-shadow: 0 18px 50px -12px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .08);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.55;
	color: var(--kcc-text);
}

.kcc *,
.kcc *::before,
.kcc *::after {
	box-sizing: border-box;
}

.kcc [hidden] {
	display: none !important;
}

.kcc-title {
	margin: 0 0 6px;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	color: inherit;
}

.kcc-message {
	margin: 0;
	color: inherit;
	opacity: .86;
}

.kcc-link {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

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

.kcc-banner {
	position: fixed;
	z-index: 2147483000;
	left: 16px;
	right: 16px;
	bottom: 16px;
	margin: 0 auto;
	max-width: 1180px;
	padding: 20px 24px;
	border-radius: var(--kcc-radius);
	background: var(--kcc-bg);
	color: var(--kcc-text);
	box-shadow: var(--kcc-shadow);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .3s ease, transform .3s ease;
}

.kcc-banner.is-visible {
	opacity: 1;
	transform: none;
}

.kcc--top .kcc-banner {
	top: 16px;
	bottom: auto;
	transform: translateY(-16px);
}

.kcc--top .kcc-banner.is-visible {
	transform: none;
}

.kcc-banner__inner {
	display: flex;
	align-items: center;
	gap: 16px 32px;
}

.kcc-banner__text {
	flex: 1 1 auto;
	min-width: 0;
}

.kcc-actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 10px;
}

/* Box layout */
.kcc--box .kcc-banner {
	left: 16px;
	right: auto;
	max-width: 420px;
	margin: 0;
}

.kcc--box.kcc--right .kcc-banner {
	left: auto;
	right: 16px;
}

.kcc--box .kcc-banner__inner {
	flex-direction: column;
	align-items: stretch;
}

.kcc--box .kcc-actions .kcc-btn {
	flex: 1 1 auto;
}

/* ---------------------------------------------------------------
	Buttons — Accept and Reject share one style on purpose
--------------------------------------------------------------- */

.kcc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 20px;
	border: 2px solid var(--kcc-accent);
	border-radius: 999px;
	background: var(--kcc-accent);
	color: var(--kcc-accent-text);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: filter .2s ease, background-color .2s ease, color .2s ease;
}

.kcc-btn:hover {
	filter: brightness(1.12);
}

.kcc-btn--ghost {
	background: transparent;
	color: var(--kcc-text);
	border-color: currentColor;
}

.kcc-btn--ghost:hover {
	filter: none;
	background: rgba(127, 127, 127, .12);
}

.kcc-btn:focus-visible,
.kcc-close:focus-visible,
.kcc-float:focus-visible,
.kcc-link:focus-visible,
.kcc-details summary:focus-visible,
.kcc-modal__dialog:focus-visible {
	outline: 3px solid var(--kcc-accent);
	outline-offset: 3px;
}

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

.kcc-modal {
	position: fixed;
	z-index: 2147483001;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.kcc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 14, .55);
	opacity: 0;
	transition: opacity .25s ease;
}

.kcc-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 640px;
	max-height: min(88vh, 760px);
	border-radius: var(--kcc-radius);
	background: var(--kcc-bg);
	color: var(--kcc-text);
	box-shadow: var(--kcc-shadow);
	opacity: 0;
	transform: translateY(12px) scale(.98);
	transition: opacity .25s ease, transform .25s ease;
	outline: none;
}

.kcc-modal.is-open .kcc-modal__backdrop {
	opacity: 1;
}

.kcc-modal.is-open .kcc-modal__dialog {
	opacity: 1;
	transform: none;
}

.kcc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px 12px;
}

.kcc-modal__head .kcc-title {
	margin: 0;
}

.kcc-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.kcc-close:hover {
	background: rgba(127, 127, 127, .14);
}

.kcc-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 0 24px 8px;
	overscroll-behavior: contain;
}

.kcc-cats {
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.kcc-cat {
	margin: 0;
	padding: 16px 0;
	border-top: 1px solid rgba(127, 127, 127, .25);
}

.kcc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.kcc-cat__label {
	font-weight: 700;
	cursor: pointer;
}

.kcc-cat__desc {
	margin: 6px 0 0;
	font-size: 14px;
	opacity: .82;
}

.kcc-always {
	font-size: 13px;
	font-weight: 600;
	opacity: .7;
}

/* Switch */
.kcc-switch {
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
	width: 48px;
	height: 28px;
}

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

.kcc-switch__track {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 999px;
	background: rgba(127, 127, 127, .45);
	transition: background-color .2s ease;
}

.kcc-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .2s ease;
}

.kcc-switch input:checked + .kcc-switch__track {
	background: var(--kcc-accent);
}

.kcc-switch input:checked + .kcc-switch__track::after {
	transform: translateX(20px);
}

.kcc-switch input:focus-visible + .kcc-switch__track {
	outline: 3px solid var(--kcc-accent);
	outline-offset: 3px;
}

/* Cookie list */
.kcc-details {
	margin-top: 8px;
	font-size: 13px;
}

.kcc-details summary {
	display: inline-block;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.kcc-table-wrap {
	margin-top: 8px;
	overflow-x: auto;
}

.kcc-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 13px;
}

.kcc-table th,
.kcc-table td {
	padding: 8px 10px 8px 0;
	border-bottom: 1px solid rgba(127, 127, 127, .2);
	text-align: left;
	vertical-align: top;
}

.kcc-table th {
	font-weight: 700;
}

.kcc-table code {
	font-size: 12px;
	word-break: break-all;
}

.kcc-modal__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 24px 20px;
	border-top: 1px solid rgba(127, 127, 127, .25);
}

/* ---------------------------------------------------------------
	Floating "cookie settings" button
--------------------------------------------------------------- */

.kcc-float {
	position: fixed;
	z-index: 2147482999;
	bottom: 16px;
	left: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--kcc-bg);
	color: var(--kcc-text);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
	cursor: pointer;
	transition: transform .2s ease;
}

.kcc-float:hover {
	transform: scale(1.06);
}

.kcc--float-right .kcc-float {
	left: auto;
	right: 16px;
}

html.kcc-lock {
	overflow: hidden;
}

/* Shortcodes */
.kcc-shortcode-btn {
	cursor: pointer;
}

.kcc-declaration .kcc-table {
	margin-bottom: 1.5em;
}

/* ---------------------------------------------------------------
	Small screens
--------------------------------------------------------------- */

@media (max-width: 782px) {
	.kcc-banner {
		left: 10px;
		right: 10px;
		bottom: 10px;
		padding: 18px;
	}

	.kcc--box .kcc-banner {
		left: 10px;
		right: 10px;
		max-width: none;
	}

	.kcc--top .kcc-banner {
		top: 10px;
	}

	.kcc-banner__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.kcc-actions .kcc-btn {
		flex: 1 1 auto;
	}

	.kcc-modal {
		align-items: flex-end;
		padding: 0;
	}

	.kcc-modal__dialog {
		max-width: none;
		max-height: 92vh;
		border-radius: var(--kcc-radius) var(--kcc-radius) 0 0;
	}

	.kcc-modal__actions .kcc-btn {
		flex: 1 1 100%;
	}
}

/* Box layout and small screens: Reject and Accept always side by side at the
	same size, Customise on its own row, so neither choice looks preferred. */
.kcc--box .kcc-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.kcc--box .kcc-actions [data-kcc="customize"] {
	grid-column: 1 / -1;
	order: 3;
}

@media (max-width: 782px) {

	.kcc-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.kcc-actions [data-kcc="customize"] {
		grid-column: 1 / -1;
		order: 3;
	}

	.kcc-actions .kcc-btn {
		white-space: normal;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kcc-banner,
	.kcc-modal__backdrop,
	.kcc-modal__dialog,
	.kcc-switch__track,
	.kcc-switch__track::after,
	.kcc-float {
		transition: none;
	}
}

@media (forced-colors: active) {
	.kcc-banner,
	.kcc-modal__dialog,
	.kcc-float {
		border: 1px solid CanvasText;
	}

	.kcc-switch__track {
		border: 1px solid CanvasText;
	}
}

@media print {
	.kcc {
		display: none !important;
	}
}
