/* Revive Consent. Colours and radius come from inline custom properties set per site. */

.rc,
.rc *,
.rc-reopen,
.rc-embed,
.rc-embed * {
	box-sizing: border-box;
}

.rc[hidden],
.rc__view[hidden],
.rc-reopen[hidden] {
	display: none !important;
}

.rc {
	position: fixed;
	z-index: 2147483000;
	left: 0;
	right: 0;
	bottom: 0;
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--rc-text, #1a1a1a);
}

.rc__panel {
	background: var(--rc-bg, #fff);
	color: var(--rc-text, #1a1a1a);
	padding: 20px 20px 18px;
	box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.2);
	max-height: 90vh;
	max-height: 90dvh;
	overflow-y: auto;
	outline: none;
}

.rc--bottom .rc__panel {
	border-radius: var(--rc-radius, 10px) var(--rc-radius, 10px) 0 0;
	padding-left: max(20px, calc((100% - 1100px) / 2));
	padding-right: max(20px, calc((100% - 1100px) / 2));
}

.rc--bottom-left,
.rc--bottom-right {
	bottom: 16px;
	width: calc(100% - 32px);
	max-width: 440px;
}

.rc--bottom-left {
	left: 16px;
	right: auto;
}

.rc--bottom-right {
	left: auto;
	right: 16px;
}

.rc--bottom-left .rc__panel,
.rc--bottom-right .rc__panel {
	border-radius: var(--rc-radius, 10px);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.rc__title {
	margin: 0 0 6px;
	font-size: 1.15rem;
	line-height: 1.3;
	font-weight: 700;
	color: inherit;
}

.rc__title:focus {
	outline: none;
}

.rc__text,
.rc__cat-desc {
	margin: 0 0 14px;
	font-size: 0.95rem;
	color: inherit;
}

.rc__link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}

/* Accept and Reject share one class so neither is visually favoured. */
.rc__btn {
	appearance: none;
	flex: 1 1 140px;
	min-height: 44px;
	padding: 10px 18px;
	border: 2px solid var(--rc-primary, #0b3d91);
	border-radius: calc(var(--rc-radius, 10px) * 0.6);
	background: var(--rc-primary, #0b3d91);
	color: var(--rc-primary-text, #fff);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
}

.rc__btn--ghost {
	background: transparent;
	color: var(--rc-text, #1a1a1a);
	border-color: currentColor;
}

.rc__btn:hover {
	filter: brightness(1.08);
}

.rc__btn:focus-visible,
.rc-reopen:focus-visible,
.rc-embed__btn:focus-visible,
.rc__link:focus-visible,
.rc__details summary:focus-visible,
.rc__switch input:focus-visible + .rc__slider {
	outline: 3px solid var(--rc-primary, #0b3d91);
	outline-offset: 2px;
}

.rc__cat {
	padding: 12px 0;
	border-top: 1px solid rgba(127, 127, 127, 0.3);
}

.rc__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}

.rc__cat-title {
	font-weight: 600;
}

.rc__cat-desc {
	margin-bottom: 4px;
}

.rc__always {
	font-size: 0.85rem;
	font-weight: 600;
	opacity: 0.75;
}

.rc__details {
	font-size: 0.9rem;
}

.rc__details summary {
	cursor: pointer;
	padding: 4px 0;
}

.rc__details ul {
	margin: 4px 0 0;
	padding-left: 1.2em;
}

.rc__foot {
	margin: 12px 0 0;
	font-size: 0.9rem;
}

/* Switch. */
.rc__switch {
	position: relative;
	display: inline-block;
	flex: none;
	width: 48px;
	height: 28px;
}

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

.rc__slider {
	position: absolute;
	inset: 0;
	border-radius: 28px;
	background: rgba(127, 127, 127, 0.55);
	transition: background 0.15s ease;
}

.rc__slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s ease;
}

.rc__switch input:checked + .rc__slider {
	background: var(--rc-primary, #0b3d91);
}

.rc__switch input:checked + .rc__slider::before {
	transform: translateX(20px);
}

/* Floating re-open button. */
.rc-reopen {
	position: fixed;
	z-index: 2147482999;
	left: 16px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid rgba(127, 127, 127, 0.45);
	border-radius: 999px;
	background: var(--rc-bg, #fff);
	color: var(--rc-text, #1a1a1a);
	font: 600 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	cursor: pointer;
}

.rc-open-link {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* Blocked embed placeholder. */
.rc-embed {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(127, 127, 127, 0.12);
	border: 1px dashed rgba(127, 127, 127, 0.55);
	border-radius: var(--rc-radius, 10px);
	text-align: center;
	color: inherit;
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.rc-embed__inner {
	max-width: 420px;
}

.rc-embed__text {
	margin: 0 0 12px;
	font-size: 0.95rem;
}

.rc-embed__btn {
	appearance: none;
	min-height: 44px;
	padding: 10px 18px;
	border: 2px solid var(--rc-primary, #0b3d91);
	border-radius: calc(var(--rc-radius, 10px) * 0.6);
	background: var(--rc-primary, #0b3d91);
	color: var(--rc-primary-text, #fff);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* Cookie table shortcode. */
.rc-table table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5em;
}

.rc-table th,
.rc-table td {
	padding: 8px 10px;
	border: 1px solid rgba(127, 127, 127, 0.35);
	text-align: left;
	vertical-align: top;
	word-break: break-word;
}

@media (max-width: 600px) {
	.rc--bottom .rc__panel {
		padding-left: 16px;
		padding-right: 16px;
	}

	.rc__btn {
		flex-basis: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rc__slider,
	.rc__slider::before {
		transition: none;
	}
}
