/* Pulse Connector cookie notice. All colours, fonts and sizes come from the
   --pcn-* variables set inline on #pulse-cn from the settings page. */

.pulse-cn,
.pulse-cn * {
	box-sizing: border-box;
}

.pulse-cn {
	font-family: var(--pcn-font, inherit);
	font-size: var(--pcn-text-size, 14px);
	line-height: 1.5;
	color: var(--pcn-text, #1f2328);
}

.pulse-cn [hidden] {
	display: none !important;
}

.pulse-cn__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	z-index: 2147483640;
}

/* ---- banner ---- */

.pulse-cn__banner {
	position: fixed;
	z-index: 2147483641;
	background: var(--pcn-bg, #fff);
	color: var(--pcn-text, #1f2328);
	border-radius: var(--pcn-radius, 10px);
	box-shadow: var(--pcn-shadow, 0 10px 40px rgba(0, 0, 0, .18));
	padding: 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-height: calc(100vh - 32px);
	overflow: auto;
}

.pulse-cn--bar_bottom .pulse-cn__banner,
.pulse-cn--bar_top .pulse-cn__banner {
	left: 16px;
	right: 16px;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.pulse-cn--bar_bottom .pulse-cn__banner { bottom: 16px; }
.pulse-cn--bar_top .pulse-cn__banner { top: 16px; }

.pulse-cn--box_left .pulse-cn__banner,
.pulse-cn--box_right .pulse-cn__banner {
	bottom: 16px;
	width: min(var(--pcn-width, 420px), calc(100vw - 32px));
}

.pulse-cn--box_left .pulse-cn__banner { left: 16px; }
.pulse-cn--box_right .pulse-cn__banner { right: 16px; }

.pulse-cn--centre .pulse-cn__banner {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(var(--pcn-width, 420px), calc(100vw - 32px));
}

.pulse-cn__title {
	margin: 0 0 6px;
	padding: 0;
	font-family: inherit;
	font-size: var(--pcn-title-size, 18px);
	font-weight: var(--pcn-title-weight, 700);
	line-height: 1.25;
	color: var(--pcn-text, #1f2328);
}

.pulse-cn__text {
	margin: 0;
	padding: 0;
	color: var(--pcn-muted, #59636e);
	font-size: var(--pcn-text-size, 14px);
}

.pulse-cn__link {
	color: var(--pcn-link, #cc0000);
	text-decoration: underline;
	margin-left: 4px;
	white-space: nowrap;
}

.pulse-cn__actions {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 8px;
	flex-shrink: 0;
}

/* Buttons always sit next to one another, equal width. */
.pulse-cn__actions .pulse-cn__btn {
	flex: 1 1 0;
	min-width: 0;
}

.pulse-cn__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 14px;
	margin: 0;
	padding: 0;
	font-size: calc(var(--pcn-text-size, 14px) - 1px);
}

.pulse-cn__links a {
	color: var(--pcn-link, #cc0000);
	text-decoration: underline;
}

.pulse-cn__note {
	margin: 0;
	color: var(--pcn-muted, #59636e);
	font-size: calc(var(--pcn-text-size, 14px) - 1px);
}

.pulse-cn__btn {
	appearance: none;
	cursor: pointer;
	font-family: inherit;
	font-size: var(--pcn-btn-size, 14px);
	font-weight: var(--pcn-btn-weight, 600);
	line-height: 1.2;
	padding: 11px 10px;
	border-radius: var(--pcn-radius, 10px);
	border: 1px solid transparent;
	text-align: center;
	transition: filter .15s ease;
}

.pulse-cn__btn:hover { filter: brightness(.94); }
.pulse-cn__btn:focus-visible,
.pulse-cn__float:focus-visible,
.pulse-cn__close:focus-visible,
.pulse-cn__switch input:focus-visible + .pulse-cn__slider {
	outline: 2px solid var(--pcn-link, #cc0000);
	outline-offset: 2px;
}

.pulse-cn__btn--primary {
	background: var(--pcn-primary, #cc0000);
	color: var(--pcn-primary-text, #fff);
}

/* Reject sits next to Accept with equal weight: same size, a quiet fill. */
.pulse-cn__btn--secondary {
	background: var(--pcn-secondary, #f1f2f4);
	color: var(--pcn-secondary-text, #1f2328);
}

/* ---- choices pop-up ---- */

.pulse-cn__prefs {
	position: fixed;
	z-index: 2147483642;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	pointer-events: none;
}

.pulse-cn__prefs-inner {
	position: relative;
	pointer-events: auto;
	width: min(560px, 100%);
	max-height: calc(100vh - 32px);
	overflow: auto;
	background: var(--pcn-bg, #fff);
	border-radius: var(--pcn-radius, 10px);
	box-shadow: var(--pcn-shadow, 0 10px 40px rgba(0, 0, 0, .18));
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.pulse-cn__close {
	position: absolute;
	top: 10px;
	right: 12px;
	appearance: none;
	background: transparent;
	border: 0;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: var(--pcn-muted, #59636e);
	padding: 4px 8px;
}

.pulse-cn__cats {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pulse-cn__cat {
	background: var(--pcn-secondary, #f1f2f4);
	border-radius: var(--pcn-radius, 10px);
	padding: 14px 16px;
}

.pulse-cn__cat-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}

.pulse-cn__cat-label {
	color: var(--pcn-text, #1f2328);
}

.pulse-cn__cat-desc {
	margin: 2px 0 0;
	color: var(--pcn-muted, #59636e);
	font-size: calc(var(--pcn-text-size, 14px) - 1px);
}

.pulse-cn__always {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--pcn-muted, #59636e);
	padding-top: 2px;
}

.pulse-cn__details {
	margin-top: 8px;
	font-size: calc(var(--pcn-text-size, 14px) - 1px);
	color: var(--pcn-muted, #59636e);
}

.pulse-cn__details summary { cursor: pointer; }
.pulse-cn__details ul { margin: 6px 0 0 18px; padding: 0; }
.pulse-cn__details li { margin: 4px 0; }
.pulse-cn__cookies { opacity: .85; }

/* ---- switch ---- */

.pulse-cn__switch {
	position: relative;
	flex-shrink: 0;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.pulse-cn__switch input {
	position: absolute;
	inset: 0;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.pulse-cn__slider {
	position: absolute;
	inset: 0;
	border-radius: 24px;
	background: #b8bdc4;
	transition: background .15s ease;
	pointer-events: none;
}

.pulse-cn__slider::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease;
}

.pulse-cn__switch input:checked + .pulse-cn__slider { background: var(--pcn-primary, #cc0000); }
.pulse-cn__switch input:checked + .pulse-cn__slider::after { transform: translateX(20px); }

.pulse-cn__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---- floating re-open button ---- */

.pulse-cn__float {
	position: fixed;
	bottom: 16px;
	z-index: 2147483639;
	appearance: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	padding: 8px 12px;
	border: 0;
	border-radius: 999px;
	background: var(--pcn-bg, #fff);
	color: var(--pcn-text, #1f2328);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}

.pulse-cn__float--left { left: 16px; }
.pulse-cn__float--right { right: 16px; }

/* ---- held-back embeds ---- */

.pulse-cn-embed {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 24px;
	text-align: center;
	background: #f1f2f4;
	color: #1f2328;
	border-radius: 8px;
	font-size: 14px;
}

.pulse-cn-embed p { margin: 0; }
.pulse-cn-embed button {
	cursor: pointer;
	padding: 9px 16px;
	border: 0;
	border-radius: 8px;
	background: #1f2328;
	color: #fff;
	font-size: 14px;
}

.pulse-cn-embed + iframe[data-pulse-src] { display: none; }

/* ---- shortcode table ---- */

.pulse-cn-declaration { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
.pulse-cn-declaration th,
.pulse-cn-declaration td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(0, 0, 0, .12); vertical-align: top; }

/* ---- phones ---- */

@media (max-width: 720px) {
	.pulse-cn--bar_bottom .pulse-cn__banner,
	.pulse-cn--bar_top .pulse-cn__banner {
		flex-direction: column;
		align-items: stretch;
	}
	.pulse-cn__btn { padding: 10px 6px; }
}

/* ---- admin preview: everything sits inside a frame instead of the viewport ---- */

.pulse-cn--preview .pulse-cn__overlay { display: none !important; }
.pulse-cn--preview .pulse-cn__banner,
.pulse-cn--preview .pulse-cn__prefs,
.pulse-cn--preview .pulse-cn__float {
	position: absolute;
}
.pulse-cn--preview .pulse-cn__banner { max-height: none; }
.pulse-cn--preview .pulse-cn__prefs { z-index: 5; pointer-events: auto; background: rgba(0, 0, 0, .25); }
.pulse-cn--preview .pulse-cn__prefs-inner { max-height: 100%; }
.pulse-cn--preview.pulse-cn--centre .pulse-cn__banner { top: 50%; left: 50%; }
