/**
 * SW Consent banner.
 *
 * Tokens follow the Seninweb site: Plus Jakarta Sans, black headings,
 * rgba(0,0,0,.65) body, #FF852C accent, 4px radius, black primary button
 * that turns orange on hover.
 */

.sw-consent {
	position: fixed;
	z-index: 99999;
	right: 20px;
	bottom: 20px;
	left: auto;
	width: min(440px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sw-consent[hidden] {
	display: none;
}

.sw-consent__panel {
	padding: 26px;
	border: 1px solid #eaeae4;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .14);
}

.sw-consent__title {
	margin: 0 0 10px;
	color: #000;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
}

.sw-consent__body {
	margin: 0;
	color: rgba(0, 0, 0, .65);
	font-size: 15px;
	line-height: 1.65;
}

.sw-consent__links {
	display: block;
	margin-top: 8px;
}

.sw-consent__links a {
	color: #000;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sw-consent__links a + a {
	margin-left: 14px;
}

.sw-consent__links a:hover {
	color: #ff852c;
}

/* Preferences */

.sw-consent__choices {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #eaeae4;
}

.sw-consent__choices[hidden] {
	display: none;
}

.sw-consent__choice {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 10px 0;
	cursor: pointer;
}

.sw-consent__choice.is-locked {
	cursor: default;
}

.sw-consent__choice input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: #ff852c;
}

.sw-consent__choice-text {
	display: block;
}

.sw-consent__choice-label {
	display: block;
	color: #000;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

.sw-consent__always {
	margin-left: 8px;
	color: rgba(0, 0, 0, .45);
	font-size: 13px;
	font-weight: 500;
}

.sw-consent__choice-desc {
	display: block;
	margin-top: 2px;
	color: rgba(0, 0, 0, .65);
	font-size: 14px;
	line-height: 1.55;
}

/* Actions */

.sw-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.sw-consent__btn {
	flex: 1 1 auto;
	padding: 12px 18px;
	border-radius: 4px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.sw-consent__btn[hidden] {
	display: none;
}

/* Reject carries the same visual weight as accept. Making it quieter is the
   single commonest reason a banner fails an audit. */
.sw-consent__btn--ghost {
	border: 2px solid #000;
	background: transparent;
	color: #000;
}

.sw-consent__btn--ghost:hover {
	background: #000;
	color: #fff;
}

.sw-consent__btn--primary {
	border: 2px solid #000;
	background: #000;
	color: #fff;
}

.sw-consent__btn--primary:hover {
	border-color: #ff852c;
	background: #ff852c;
	color: #fff;
}

.sw-consent__btn:focus-visible,
.sw-consent__choice input:focus-visible,
.sw-consent-open:focus-visible {
	outline: 3px solid #ffbf1c;
	outline-offset: 2px;
}

/* The "Cookie settings" link, wherever it is placed */

.sw-consent-open {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.sw-consent-open:hover {
	color: #ff852c;
}

/* Placeholder shown where a third-party embed is being held back */

.sw-consent-placeholder {
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: center;
	justify-content: center;
	padding: 40px 26px;
	border: 1px solid #eaeae4;
	border-radius: 4px;
	background: #fafafa;
	text-align: center;
}

.sw-consent-placeholder p {
	max-width: 420px;
	margin: 0;
	color: rgba(0, 0, 0, .65);
	font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.65;
}

.sw-consent-placeholder .sw-consent__btn {
	flex: none;
}

@media (max-width: 600px) {
	.sw-consent {
		right: 10px;
		bottom: 10px;
		width: calc(100vw - 20px);
	}

	.sw-consent__panel {
		padding: 20px;
	}

	.sw-consent__actions {
		flex-direction: column;
	}

	.sw-consent__btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sw-consent__btn {
		transition: none;
	}
}
