/*
 * Cookie consent (theme 4.2.82). The bar keeps Branda's cookie-notice look,
 * which production showed until Branda was retired: a #414141 bar at the
 * bottom, white text, KG-red buttons with a 1px border and a 5px radius.
 * "Accept all" and "Reject all" look the same on purpose: neither answer may
 * be made easier to give than the other.
 */
.kg-consent[hidden],
.kg-consent-dialog:not([open]) {
	display: none !important;
}

.kg-consent {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
	background: #414141;
	color: #fff;
	box-shadow: 0 -2px 14px rgba(0, 0, 0, .22);
	font-size: 14px;
	line-height: 1.55;
}

.kg-consent__bar.container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.kg-consent__text {
	flex: 1 1 420px;
	margin: 0;
	color: #fff;
}

.kg-consent a.kg-consent__link,
.kg-consent-dialog a.kg-consent__link {
	color: inherit;
	text-decoration: underline;
	white-space: nowrap;
}

.kg-consent__actions,
.kg-consent-dialog__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.kg-consent__btn {
	background: #b33636;
	border: 1px solid #b33636;
	border-radius: 5px;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	margin: 0;
	padding: 9px 18px;
	text-transform: none;
}

.kg-consent__btn:hover {
	background: #8f2b2b;
	border-color: #8f2b2b;
	color: #fff;
}

.kg-consent__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.kg-consent__btn--ghost {
	background: transparent;
	border-color: #fff;
}

.kg-consent__btn--ghost:hover {
	background: rgba(255, 255, 255, .14);
	border-color: #fff;
}

/*
 * While the bar shows, lift what is fixed to the bottom corners above it:
 * CyMetricA Chat's button and the SafariCoin notices. kg-consent.js sets the
 * offset to the bar's height. An OPEN chat is left where it is: lifted, its
 * panel runs off the top of a phone, and unlifted it already sits above the
 * bar (its z-index is higher).
 */
html.kg-consent-showing .cym-chat:not([data-open="true"]),
html.kg-consent-showing .cym-gam-notices {
	transform: translateY(calc(-1 * var(--kg-consent-offset, 0px)));
}

@media (max-width: 600px) {
	.kg-consent__actions {
		width: 100%;
	}

	.kg-consent__actions .kg-consent__btn {
		flex: 1 1 auto;
	}
}

/* The settings dialog */
.kg-consent-dialog {
	border: 0;
	border-radius: 5px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
	color: #414141;
	max-height: calc(100vh - 32px);
	max-width: 600px;
	overflow: auto;
	padding: 0;
	width: calc(100% - 32px);
	z-index: 100001;
}

.kg-consent-dialog::backdrop {
	background: rgba(0, 0, 0, .55);
}

.kg-consent-dialog[open]:not(:modal) {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.kg-consent-dialog__panel {
	margin: 0;
	padding: 24px;
	position: relative;
}

.kg-consent-dialog__close {
	background: none;
	border: 0;
	color: #414141;
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
	padding: 4px 8px;
	position: absolute;
	right: 10px;
	top: 8px;
}

.kg-consent-dialog__title {
	font-size: 22px;
	line-height: 1.3;
	margin: 0 32px 8px 0;
}

.kg-consent-dialog__intro {
	font-size: 14px;
	margin: 0 0 12px;
}

.kg-consent-dialog__list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.kg-consent-dialog__item {
	align-items: flex-start;
	border-top: 1px solid #e6e6e6;
	display: flex;
	gap: 16px;
	justify-content: space-between;
	margin: 0;
	padding: 14px 0;
}

.kg-consent-dialog__name {
	display: block;
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 4px;
}

.kg-consent-dialog__text {
	font-size: 13px;
	line-height: 1.5;
	margin: 0;
}

.kg-consent-switch {
	align-items: center;
	display: flex;
	flex: none;
	flex-direction: column;
	gap: 4px;
}

.kg-consent-switch input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	background: #c9c9c9;
	border: 0;
	border-radius: 12px;
	cursor: pointer;
	display: block;
	flex: none;
	height: 24px;
	margin: 0;
	position: relative;
	transition: background .15s;
	width: 44px;
}

.kg-consent-switch input[type="checkbox"]::after {
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
	content: "";
	height: 18px;
	left: 3px;
	position: absolute;
	top: 3px;
	transition: left .15s;
	width: 18px;
}

.kg-consent-switch input[type="checkbox"]:checked {
	background: #b33636;
}

.kg-consent-switch input[type="checkbox"]:checked::after {
	left: 23px;
}

.kg-consent-switch input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: .6;
}

.kg-consent-switch input[type="checkbox"]:focus-visible {
	outline: 2px solid #414141;
	outline-offset: 2px;
}

.kg-consent-switch__note {
	color: #757575;
	font-size: 11px;
	white-space: nowrap;
}

.kg-consent-dialog .kg-consent__btn:focus-visible {
	outline-color: #414141;
}

/* "Cookie settings" in the footer bar reads as one of its links. */
button.kg-consent-open {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	font: inherit;
	margin: 0;
	padding: 0;
	text-transform: none;
}

button.kg-consent-open:hover,
button.kg-consent-open:focus-visible {
	color: #b33636;
	text-decoration: underline;
}
