/**
 * Black Week 23-30 November (inc/blackweek.php). Loaded on every Swedish page, only while Black Week is shown
 * (roland_blackweek_is_visible()). Sizes and colours are read from the mockups (BWKampanj, BWKampanjMobile,
 * BWHomeBand, BWHomeBandMobile, BWStrip); the red is the print ad's seal red.
 *
 *   .k-bw          the section above the hero on /kampanj/ (from 900px: copy left, seals right, three cards in a row;
 *                  below 900px, the price-example breakpoint: everything centred, the cards a swipe row)
 *   .bw-seal(s)    the two scalloped seals (shared by the section and the band)
 *   .home-band--bw the front page band (extends home-band.css)
 *   .k-strip--bw   the header strip (extends campaign-strip.css)
 *   __bw           the extra line in the articles' campaign boxes (extends campaign-box.css)
 */
:root {
	--bw-red: #e1251b;
	--bw-linen-65: color-mix(in srgb, var(--wp--preset--color--linen) 65%, transparent);
	--bw-linen-85: color-mix(in srgb, var(--wp--preset--color--linen) 85%, transparent);
	--bw-line: color-mix(in srgb, var(--wp--preset--color--linen) 28%, transparent);
}

/* ---------- Seals ---------- */

.bw-seals {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	gap: calc(var(--bw-seal) * 0.16);
	--bw-seal: 96px;
}

.bw-seals__plus {
	font-size: calc(var(--bw-seal) * 0.26);
	font-weight: 800;
	line-height: 1;
	color: var(--wp--preset--color--linen);
}

.bw-seal {
	position: relative;
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: var(--bw-seal);
	height: var(--bw-seal);
	color: var(--wp--preset--color--linen);
	line-height: 1;
}

.bw-seal__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.bw-seal > span {
	position: relative;
}

.bw-seal__t {
	margin-bottom: calc(var(--bw-seal) * 0.025);
	font-size: calc(var(--bw-seal) * 0.105);
	font-weight: 800;
	letter-spacing: 0.16em;
}

.bw-seal__n {
	font-size: calc(var(--bw-seal) * 0.4);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 0.85;
}

.bw-seal__n sup {
	position: relative;
	top: 0.1em;
	margin-left: 2px;
	font-size: 0.36em;
	vertical-align: top;
}

/* ---------- The tag (red, mono) ---------- */

.bw-tag {
	display: inline-block;
	margin: 0;
	padding: 5px 9px;
	background: var(--bw-red);
	color: var(--wp--preset--color--linen);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.18em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ---------- The section on /kampanj/ ---------- */

body.is-kampanj .wp-block-post-content > .k-bw.k-sec {
	padding: clamp(32px, 4.4vw, 56px) clamp(16px, 4vw, 48px) clamp(28px, 4vw, 56px);
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--linen);
	border-bottom: 1px solid var(--bw-line);
	font-family: var(--wp--preset--font-family--sans);
}

.k-bw .k-bw__in {
	max-width: 1252px; /* the mockup's width at 1440 (content from 94px to 1346px) */
	margin: 0 auto;
}

.k-bw__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
}

.k-bw__copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.k-bw .bw-tag--lg {
	padding: 10px 16px;
	font-size: clamp(13px, 1.4vw, 16px);
	letter-spacing: 0.2em;
}

.k-bw .k-bw__h {
	margin: 18px 0 28px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: clamp(56px, 6.1vw, 88px);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 0.95;
	color: var(--wp--preset--color--linen);
	white-space: nowrap;
}

.k-bw .k-bw__lead {
	margin: 0 0 16px;
	font-size: clamp(22px, 2.5vw, 32px);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.15;
	color: var(--wp--preset--color--linen);
}

.k-bw .k-bw__text {
	margin: 0;
	max-width: 640px;
	font-size: clamp(16px, 1.55vw, 20px);
	line-height: 1.5;
	color: var(--bw-linen-85);
}

.k-bw .k-bw__text strong {
	font-weight: 700;
	color: var(--wp--preset--color--wheat);
}

.k-bw__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 28px;
}

.k-bw a.bw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3em;
	box-sizing: border-box;
	min-height: 62px;
	padding: 0 30px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 19px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	border: 1px solid transparent;
	transition: background-color 150ms ease-out, color 150ms ease-out;
}

.k-bw a.bw-btn--primary {
	background: var(--wp--preset--color--wheat);
	color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--wheat);
}

.k-bw a.bw-btn--primary:hover,
.k-bw a.bw-btn--primary:focus-visible {
	background: var(--wp--preset--color--linen);
	border-color: var(--wp--preset--color--linen);
}

.k-bw a.bw-btn--ghost {
	background: transparent;
	color: var(--wp--preset--color--linen);
	border-color: var(--bw-linen-65);
}

.k-bw a.bw-btn--ghost:hover,
.k-bw a.bw-btn--ghost:focus-visible {
	background: var(--wp--preset--color--linen);
	color: var(--wp--preset--color--ink);
}

.k-bw .bw-mono {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 700;
	letter-spacing: 0;
}

.k-bw .bw-seals--lg {
	--bw-seal: clamp(150px, 15.5vw, 224px);
	gap: clamp(20px, 2.2vw, 28px);
}

/* The three examples */
.k-bw__ex {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: clamp(32px, 4vw, 48px);
	border-top: 1px solid var(--bw-line);
}

.k-bw .bw-card {
	min-width: 0;
	padding: 28px 28px 8px;
}

.k-bw .bw-card:first-child {
	padding-left: 0;
}

.k-bw .bw-card:last-child {
	padding-right: 0;
}

.k-bw .bw-card + .bw-card {
	border-left: 1px solid var(--bw-line);
}

.k-bw .bw-card p {
	margin: 0;
}

.k-bw .bw-card__t {
	margin: 0 0 8px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: var(--wp--preset--color--linen);
}

.k-bw .bw-card__t span {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--wp--preset--color--wheat);
}

.k-bw .bw-card__old {
	display: flex;
	flex-wrap: wrap;
	gap: 0 14px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--bw-linen-65);
}

.k-bw .bw-card__old s {
	text-decoration-color: var(--bw-red);
	text-decoration-thickness: 1.5px;
}

.k-bw .bw-card__row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px !important;
}

.k-bw .bw-card__row .bw-tag {
	font-size: 11px;
	letter-spacing: 0.2em;
}

.k-bw .bw-card__from {
	font-size: 15px;
	color: var(--bw-linen-85);
}

.k-bw .bw-card__price {
	margin-top: 4px !important;
	font-size: clamp(34px, 3.4vw, 46px);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1.1;
	color: var(--wp--preset--color--linen);
}

.k-bw .bw-card__save {
	display: inline-block;
	margin-top: 12px !important;
	padding: 7px 11px;
	background: var(--wp--preset--color--wheat);
	color: var(--wp--preset--color--ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
}

.k-bw .k-bw__note {
	margin: 28px 0 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--bw-linen-85);
}

.k-bw .k-bw__note a {
	color: var(--wp--preset--color--wheat);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.k-bw .bw-m {
	display: none;
}

/* 900-1100px: a little tighter */
@media (min-width: 900px) and (max-width: 1100px) {
	.k-bw .k-bw__h {
		font-size: 60px;
	}

	.k-bw .k-bw__lead {
		font-size: 24px;
	}

	.k-bw a.bw-btn {
		min-height: 56px;
		padding: 0 22px;
		font-size: 17px;
	}

	.k-bw .bw-card {
		padding-inline: 18px;
	}

	.k-bw .bw-card__t {
		font-size: 21px;
	}
}

/* ---------- Below 900px: centred, buttons full width, the examples a swipe row ---------- */

@media (max-width: 899.98px) {
	body.is-kampanj .wp-block-post-content > .k-bw.k-sec {
		padding: 28px 16px 26px;
		text-align: center;
	}

	.k-bw__top {
		flex-direction: column;
		gap: 0;
	}

	.k-bw__copy {
		display: contents;
	}

	/* Order: tag, heading, seals, lead, text, buttons */
	.k-bw .bw-tag--lg {
		order: 1;
		align-self: center;
		font-size: 12px;
		padding: 7px 12px;
	}

	.k-bw .k-bw__h {
		order: 2;
		margin: 14px 0 18px;
		font-size: clamp(52px, 16vw, 68px);
		white-space: normal;
	}

	.k-bw .k-bw__h span {
		display: block;
	}

	.k-bw .bw-seals--lg {
		order: 3;
		--bw-seal: clamp(116px, 33vw, 150px);
		align-self: center;
		gap: 14px;
		margin: 0 0 22px;
	}

	.k-bw .k-bw__lead {
		order: 4;
		margin-bottom: 12px;
		font-size: 22px;
	}

	.k-bw .k-bw__text {
		order: 5;
		max-width: 340px;
		font-size: 16px;
	}

	.k-bw__cta {
		order: 6;
		align-self: stretch;
		flex-direction: column;
		gap: 10px;
		margin-top: 24px;
	}

	.k-bw a.bw-btn {
		width: 100%;
		min-height: 52px;
		padding: 0 16px;
		font-size: 17px;
		white-space: normal;
	}

	/* The swipe row, as the price examples: scroll-snap, the next card peeking in, no scrollbar, no sideways page scroll. */
	.k-bw__ex {
		display: flex;
		gap: 12px;
		margin: 28px -16px 0;
		padding: 0 16px 4px;
		border-top: 0;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 16px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		text-align: center;
	}

	.k-bw__ex::-webkit-scrollbar {
		display: none;
	}

	.k-bw .bw-card,
	.k-bw .bw-card:first-child,
	.k-bw .bw-card:last-child {
		flex: 0 0 min(78vw, 300px);
		padding: 22px 14px 20px;
		border: 1px solid var(--bw-linen-65);
		scroll-snap-align: start;
	}

	.k-bw .bw-card + .bw-card {
		border-left: 1px solid var(--bw-linen-65);
	}

	.k-bw .bw-card__old {
		flex-direction: column;
		gap: 0;
		align-items: center;
	}

	.k-bw .bw-card__row {
		justify-content: center;
	}

	.k-bw .bw-card__price {
		font-size: 38px;
	}

	.k-bw .bw-m {
		display: inline;
	}

	.k-bw .bw-d {
		display: none;
	}

	.k-bw .k-bw__note {
		margin-top: 14px;
		font-size: 13px;
	}
}

/* ---------- The front page band ---------- */

.home-band--bw {
	gap: 12px;
}

.home-band--bw .bw-seals--band {
	--bw-seal: 96px;
}

.home-band__tag--bw {
	background: var(--bw-red);
}

@media (max-width: 899.98px) {
	/* The mockup's band on a phone is inset 16px, like the hero photo under it. */
	.home-band-wrap--bw {
		padding: 16px 16px 0;
	}

	.home-band--bw {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 20px 16px 16px;
		text-align: center;
	}

	.home-band--bw .home-band__copy {
		flex: none;
		align-items: center;
		gap: 10px;
		width: 100%;
	}

	.home-band--bw .home-band__h {
		font-size: 20px;
	}

	.home-band--bw .home-band__btn {
		flex: none;
		width: 100%;
		margin-top: 4px;
	}
}

@media (min-width: 900px) {
	.home-band--bw {
		gap: 32px;
		padding: 20px 32px;
	}

	.home-band--bw .bw-seals--band {
		--bw-seal: 168px;
		gap: 22px;
		margin: 0;
	}

	.home-band--bw .home-band__h {
		max-width: 520px;
	}

	.home-band--bw .home-band__btn {
		margin-left: 8px;
	}
}

@media (min-width: 900px) and (max-width: 1100px) {
	.home-band--bw {
		gap: 20px;
		padding: 18px 20px;
	}

	.home-band--bw .bw-seals--band {
		--bw-seal: 120px;
		gap: 14px;
	}

	.home-band--bw .home-band__h {
		font-size: 22px;
	}

	.home-band--bw .home-band__btn {
		margin-left: 0;
		padding: 14px 18px;
		font-size: 16px;
	}
}

/* ---------- The header strip ---------- */

.k-strip--bw .k-strip__tag,
.k-strip--bw .k-strip__mtag {
	background: var(--bw-red);
}

.k-strip--bw .k-strip__m {
	gap: 8px;
}

.k-strip--bw .k-strip__mextra {
	font-weight: 500;
	color: color-mix(in srgb, var(--wp--preset--color--linen) 92%, transparent);
}

.k-strip--bw .k-strip__mgo {
	flex: none;
	font-size: 13px;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, var(--wp--preset--color--linen) 50%, transparent);
}

@media (max-width: 359.98px) {
	.k-strip--bw .k-strip__mgot {
		display: none;
	}

	.k-strip--bw .k-strip__mextra {
		display: none;
	}
}

@media (min-width: 1170px) {
	.k-strip--bw .k-strip__in {
		gap: 24px;
	}
}

/* ---------- The articles' campaign boxes ---------- */

.refresh-campaign-box__bw {
	margin: 8px 0 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--wp--preset--color--wheat);
}

/* ---------- The Black Week point in the campaign terms (inc/blackweek.php, roland_blackweek_terms_filter) ---------- */

/*
 * The list rows are a grid (number, text) with 18px of padding above and below and no side padding. The Black Week row
 * keeps that type size and padding; the bar and the tint reach out to the left and right of the list by the same
 * amount they are padded in, so the number and the text stay on the same lines as in the other rows.
 */
body.is-kampanj .k-tsec__list li > span strong {
	font-weight: 700;
}

body.is-kampanj .k-tsec__list li.k-tsec__bw {
	margin-inline: -20px;
	padding-inline: 16px 20px;
	background: color-mix(in srgb, #f0ddb4 35%, transparent);
	border-left: 4px solid var(--bw-red);
}

body.is-kampanj .k-tsec__list li.k-tsec__bw::before {
	color: var(--bw-red);
	font-weight: 700;
}

@media (max-width: 899.98px) {
	body.is-kampanj .k-tsec__list li.k-tsec__bw {
		margin-inline: -12px;
		padding-inline: 8px 12px;
	}
}
