/* XT Cookie Consent. Colors come from the settings page; fonts come from the site. */

.xtcc,
.xtcc-modal {
	--xtcc-bg: #14171a;
	--xtcc-fg: #ffffff;
	--xtcc-muted: rgba(255, 255, 255, .74);
	--xtcc-line: rgba(255, 255, 255, .14);
	--xtcc-off: rgba(255, 255, 255, .26);
	--xtcc-accent: #0066d6;
	--xtcc-accent-fg: #ffffff;
	--xtcc-radius: 0px;
	--xtcc-ease: cubic-bezier(.2, .7, .2, 1);
	box-sizing: border-box;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	letter-spacing: normal;
	text-align: left;
	color: var(--xtcc-fg);
}
.xtcc *,
.xtcc-modal * { box-sizing: inherit; }
.xtcc--light,
.xtcc-modal.xtcc--light {
	--xtcc-bg: #ffffff;
	--xtcc-fg: #14171a;
	--xtcc-muted: #4f5760;
	--xtcc-line: #e2e5e9;
	--xtcc-off: #c3c9cf;
}

/* Banner. On phones it's a sheet along the bottom. */

.xtcc {
	position: fixed;
	z-index: 2147483000;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--xtcc-bg);
	box-shadow: 0 -8px 40px rgba(0, 0, 0, .2);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .45s var(--xtcc-ease), transform .45s var(--xtcc-ease);
}
.xtcc.is-open { opacity: 1; transform: none; }
.xtcc__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px max(20px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.xtcc__title { margin: 0 0 6px; font-size: 1.0625em; font-weight: 700; line-height: 1.3; color: var(--xtcc-fg); }
.xtcc__text { margin: 0; color: var(--xtcc-muted); }
.xtcc__note { margin: 10px 0 0; font-size: .875em; color: var(--xtcc-muted); }
.xtcc a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.xtcc__text a { color: var(--xtcc-fg); }

.xtcc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
/* Accept and Reject look the same on purpose: neither choice is pushed. */
.xtcc__btn {
	/* Equal shares of the row, but never narrower than the label: labels stay on one line, and a button
	   that doesn't fit moves to its own full-width row. */
	flex: 1 1 0;
	min-width: max-content;
	min-height: 44px;
	white-space: nowrap;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: var(--xtcc-radius);
	background: var(--xtcc-accent);
	color: var(--xtcc-accent-fg);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: filter .25s var(--xtcc-ease);
}
.xtcc__btn:hover { filter: brightness(1.12); }
.xtcc__link {
	min-height: 32px;
	margin: 0;
	padding: 4px 2px;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.xtcc button:focus-visible,
.xtcc a:focus-visible,
.xtcc-modal button:focus-visible,
.xtcc-modal input:focus-visible { outline: 2px solid var(--xtcc-fg); outline-offset: 2px; }

@media (min-width: 640px) {
	.xtcc--corner {
		left: max(20px, env(safe-area-inset-left));
		right: auto;
		bottom: calc(20px + env(safe-area-inset-bottom));
		width: 410px;
		border-radius: var(--xtcc-radius);
		box-shadow: 0 16px 56px rgba(0, 0, 0, .3);
	}
	.xtcc--corner .xtcc__inner { padding: 24px; }

	.xtcc--bar .xtcc__inner { display: flex; align-items: center; gap: 12px 40px; padding-block: 20px calc(20px + env(safe-area-inset-bottom)); }
	.xtcc--bar .xtcc__copy { flex: 1; }
	.xtcc--bar .xtcc__actions { flex: none; margin-top: 0; }
	.xtcc--bar .xtcc__btn { flex: none; }

	.xtcc--center {
		top: 50%;
		left: 50%;
		right: auto;
		bottom: auto;
		width: min(520px, calc(100% - 40px));
		border-radius: var(--xtcc-radius);
		box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
		transform: translate(-50%, calc(-50% + 16px));
	}
	.xtcc--center.is-open { transform: translate(-50%, -50%); }
	.xtcc--center .xtcc__inner { padding: 28px; }
}

.xtcc-backdrop {
	position: fixed;
	z-index: 2147482999;
	inset: 0;
	background: rgba(10, 12, 14, .6);
	opacity: 0;
	transition: opacity .45s var(--xtcc-ease);
}
.xtcc-backdrop.is-open { opacity: 1; }
html.xtcc-locked { overflow: hidden; }

/* Choices panel */

.xtcc-modal {
	position: fixed;
	z-index: 2147483001;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.xtcc-modal[hidden] { display: none; }
.xtcc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 12, 14, .6);
	opacity: 0;
	transition: opacity .35s var(--xtcc-ease);
}
.xtcc-modal__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(560px, 100%);
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	border-radius: var(--xtcc-radius);
	background: var(--xtcc-bg);
	box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .35s var(--xtcc-ease), transform .35s var(--xtcc-ease);
}
.xtcc-modal.is-open .xtcc-modal__backdrop,
.xtcc-modal.is-open .xtcc-modal__panel { opacity: 1; transform: none; }

.xtcc-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 12px; }
.xtcc-modal__title { margin: 0; font: inherit; font-size: 1.25em; font-weight: 700; line-height: 1.25; color: var(--xtcc-fg); }
.xtcc-modal__close {
	display: grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	margin: 0 -10px 0 0;
	padding: 0;
	border: 0;
	border-radius: var(--xtcc-radius);
	background: none;
	color: inherit;
	cursor: pointer;
}
.xtcc-modal__body { overflow-y: auto; padding: 0 24px 4px; overscroll-behavior: contain; }
.xtcc-modal__body .xtcc__note { margin: 0 0 12px; }
.xtcc-modal .xtcc__actions { margin: 0; padding: 16px 24px 20px; border-top: 1px solid var(--xtcc-line); }

.xtcc-cat { padding: 16px 0; border-top: 1px solid var(--xtcc-line); }
.xtcc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.xtcc-cat__name { font-weight: 700; color: var(--xtcc-fg); }
.xtcc-cat__always { font-size: .8125em; font-weight: 600; color: var(--xtcc-muted); }
.xtcc-cat p { margin: 6px 0 0; font-size: .9375em; color: var(--xtcc-muted); }
.xtcc-cat a { color: var(--xtcc-fg); }

.xtcc-switch {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: none;
	width: 46px;
	height: 26px;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: var(--xtcc-off);
	cursor: pointer;
	transition: background-color .25s var(--xtcc-ease);
}
.xtcc-switch::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .25s var(--xtcc-ease);
}
.xtcc-switch:checked { background: var(--xtcc-accent); }
.xtcc-switch:checked::before { transform: translateX(20px); }

@media (prefers-reduced-motion: reduce) {
	.xtcc,
	.xtcc-backdrop,
	.xtcc-modal__backdrop,
	.xtcc-modal__panel,
	.xtcc-switch,
	.xtcc-switch::before { transition: none; }
}

/* Cookie policy table ([xt_cookie_table]) */

.xtcc-table { margin: 1.5em 0; }
.xtcc-table h3 { margin: 1.4em 0 .3em; }
.xtcc-table > p { margin: 0 0 .8em; }
.xtcc-table__scroll { overflow-x: auto; }
.xtcc-table table { width: 100%; border-collapse: collapse; font-size: .9375em; line-height: 1.45; }
.xtcc-table th,
.xtcc-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid rgba(127, 127, 127, .25); text-align: left; vertical-align: top; }
.xtcc-table th { font-weight: 700; white-space: nowrap; }
.xtcc-table td:first-child { width: 30%; }
.xtcc-table code { font-size: .9em; overflow-wrap: anywhere; }

/* Narrow spaces (phones, sidebars): each cookie becomes a small block instead of four squeezed columns. */
.xtcc-table { container-type: inline-size; }
@container (max-width: 560px) {
	.xtcc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.xtcc-table table, .xtcc-table tbody, .xtcc-table td { display: block; width: auto; }
	/* Name, what it does, then who sets it and for how long. */
	.xtcc-table tr { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid rgba(127, 127, 127, .25); }
	.xtcc-table td { padding: 2px 0; border: 0; }
	.xtcc-table td:first-child { width: auto; padding-bottom: 4px; }
	.xtcc-table td:nth-child(3) { order: 1; padding-bottom: 6px; }
	.xtcc-table td:nth-child(2), .xtcc-table td:nth-child(4) { order: 2; font-size: .9375em; }
	.xtcc-table td:nth-child(2)::before, .xtcc-table td:nth-child(4)::before { content: attr(data-label) ": "; font-weight: 600; }
}

