/**
 * White December (inc/whitedecember.php): the /kampanj/ hero, the white header strip and the white front page band.
 * Values are copied from the mockups (scratch_tmp/white-december/): wd-kampanj-mockup.html (hero), wd-kampanjrad-1440.png
 * (strip), wd-startsida-band-*.png (band). Loaded after blackweek.css, whose seal, price-box and tag rules White December reuses
 * unchanged (Black Weekend's markup and layout). Red (#E1251B) is used only for the price tags, the seal and the strip.
 */

/* ---------- The hero ---------- */

/*
 * Sizes, spacing and line breaks are Black Weekend's hero's (assets/css/blackweek.css: .k-bw, .k-bw--we), value for value, so the
 * two heroes are the same size; only the colours, the artwork, the seal and the texts are White December's.
 */

body.is-kampanj .k-wd.k-sec,
body.is-kampanj .wp-block-post-content > .k-wd.k-sec {
	position: relative;
	overflow: hidden;
	padding: clamp(32px, 4.4vw, 56px) clamp(16px, 4vw, 48px);
	background: linear-gradient(180deg, #e1251b 0%, #d0211a 40%, #6e1512 100%);
	color: #ffffff;
	font-family: var(--wp--preset--font-family--sans);
	line-height: 1.5;
	border-bottom: 0;
}

/* Wavy lines first, the snowflakes on top of them, both behind the text. */
body.is-kampanj .k-wd .wd-art {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	pointer-events: none;
}

body.is-kampanj .k-wd .wv {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

body.is-kampanj .k-wd .sn {
	position: absolute;
	z-index: 0;
	pointer-events: none;
}

body.is-kampanj .k-wd .snm {
	display: none;
}

/* The hero is much shorter than the mockup's, so the snowflakes that would fall over the text are left out: only those in the margins and around the seal stay. */
body.is-kampanj .k-wd .sn:nth-of-type(3),
body.is-kampanj .k-wd .sn:nth-of-type(4),
body.is-kampanj .k-wd .sn:nth-of-type(5),
body.is-kampanj .k-wd .sn:nth-of-type(6),
body.is-kampanj .k-wd .sn:nth-of-type(8),
body.is-kampanj .k-wd .sn:nth-of-type(14),
body.is-kampanj .k-wd .sn:nth-of-type(15),
body.is-kampanj .k-wd .sn:nth-of-type(16) {
	display: none;
}

body.is-kampanj .k-wd .k-wd__in {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	max-width: none;
	margin: 0;
	padding: 0;
}

body.is-kampanj .k-wd .k-wd__copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

body.is-kampanj .k-wd .wd-tag {
	display: inline-block;
	margin: 0;
	padding: 10px 16px;
	background: #161414;
	color: #ffffff;
	font-family: var(--wp--preset--font-family--mono);
	font-size: clamp(13px, 1.4vw, 16px);
	font-weight: 500;
	letter-spacing: 0.2em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

body.is-kampanj .k-wd .k-wd__h {
	margin: 18px 0 22px;
	font-size: clamp(56px, 6.1vw, 88px);
	font-weight: 800;
	letter-spacing: 0.03em;
	word-spacing: 0.08em;
	line-height: 0.95;
	white-space: nowrap;
	color: #ffffff;
}

body.is-kampanj .k-wd .k-wd__text {
	max-width: 640px;
	margin: 0;
	font-size: clamp(16px, 1.55vw, 20px);
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.92);
}

body.is-kampanj .k-wd .k-wd__text b {
	font-weight: 700;
	color: #ffffff;
}

body.is-kampanj .k-wd .k-wd__cta {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 12px;
	margin-top: 28px;
}

body.is-kampanj .k-wd a.wd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3em;
	box-sizing: border-box;
	min-height: clamp(54px, 4.3vw, 62px);
	padding: 0 clamp(14px, 2vw, 30px);
	border: 1px solid transparent;
	color: #161414;
	font-size: clamp(15px, 1.45vw, 19px);
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: filter 150ms ease-out;
}

body.is-kampanj .k-wd a.wd-btn--a {
	background: #ffffff;
}

body.is-kampanj .k-wd a.wd-btn--b {
	background: #3dbb87;
}

body.is-kampanj .k-wd a.wd-btn:hover,
body.is-kampanj .k-wd a.wd-btn:focus-visible {
	filter: brightness(0.94);
}

body.is-kampanj .k-wd .wd-mono {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

/* The seal: red, white text, a thick white stroke around the scallop, a soft shadow. Its box is Black Weekend's seal's. */
body.is-kampanj .k-wd .wd-seal {
	--wd-seal: clamp(150px, 16vw, 230px);
	position: relative;
	flex: none;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: var(--wd-seal);
	height: var(--wd-seal);
	color: #ffffff;
	line-height: 1;
}

body.is-kampanj .k-wd .wd-seal svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
}

body.is-kampanj .k-wd .wd-seal svg path:first-of-type {
	stroke: #ffffff;
	stroke-width: 14;
	paint-order: stroke;
}

body.is-kampanj .k-wd .wd-seal > span {
	position: relative;
	color: #ffffff;
}

body.is-kampanj .k-wd .wd-seal__t {
	margin-bottom: calc(var(--wd-seal) * 0.024);
	font-size: calc(var(--wd-seal) * 0.104);
	font-weight: 800;
	letter-spacing: 0.18em;
}

body.is-kampanj .k-wd .wd-seal__n {
	font-size: calc(var(--wd-seal) * 0.352);
	font-weight: 900;
	letter-spacing: -0.04em;
	line-height: 0.85;
}

body.is-kampanj .k-wd .wd-seal__n sup {
	position: relative;
	top: 0.1em;
	margin-left: 2px;
	font-size: 0.36em;
	vertical-align: top;
}

body.is-kampanj .k-wd .k-wd__right {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	width: clamp(260px, 29vw, 430px);
	text-align: center;
}

body.is-kampanj .k-wd .wd-line {
	margin: 0;
	font-size: clamp(22px, 2.5vw, 32px);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.15;
	text-wrap: balance;
	color: #ffffff;
}

body.is-kampanj .k-wd .wd-sl-m {
	display: none;
}

body.is-kampanj .k-wd .wd-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Tablet widths: Black Weekend's fixed sizes for the heading and the line under the seal. */
@media (min-width: 900px) and (max-width: 1100px) {
	body.is-kampanj .k-wd .k-wd__h {
		font-size: 60px;
	}

	body.is-kampanj .k-wd .wd-line {
		font-size: 24px;
	}
}

@media (max-width: 899.98px) {
	body.is-kampanj .k-wd.k-sec,
	body.is-kampanj .wp-block-post-content > .k-wd.k-sec {
		padding: 28px clamp(16px, 4vw, 48px);
		text-align: center;
	}

	body.is-kampanj .k-wd .sn {
		display: none;
	}

	body.is-kampanj .k-wd .snm {
		display: block;
		position: absolute;
		z-index: 0;
		pointer-events: none;
	}

	/* the mobile flakes over the centred text are left out (the 2nd, 3rd, 5th and 7th of the set) */
	body.is-kampanj .k-wd .snm:nth-of-type(20),
	body.is-kampanj .k-wd .snm:nth-of-type(21),
	body.is-kampanj .k-wd .snm:nth-of-type(23),
	body.is-kampanj .k-wd .snm:nth-of-type(25) {
		display: none;
	}

	body.is-kampanj .k-wd .k-wd__in {
		flex-direction: column;
		gap: 0;
	}

	body.is-kampanj .k-wd .k-wd__copy {
		align-items: center;
	}

	body.is-kampanj .k-wd .wd-tag {
		font-size: 12px;
		padding: 7px 12px;
	}

	body.is-kampanj .k-wd .k-wd__h {
		margin: 14px 0 18px;
		/* Black Weekend's size would run "DECEMBER" (wider than "WEEKEND") into the gutters; slightly smaller, the line-height keeps the two lines as tall as Black Weekend's. */
		font-size: clamp(44px, 14.2vw, 62px);
		line-height: 1.05;
		white-space: normal;
	}

	body.is-kampanj .k-wd .k-wd__h span {
		display: block;
	}

	body.is-kampanj .k-wd .wd-sl-d {
		display: none;
	}

	body.is-kampanj .k-wd span.wd-sl-m {
		display: flex;
		justify-content: center;
		margin: 0 0 18px;
	}

	body.is-kampanj .k-wd p.wd-sl-m {
		display: block;
		margin: 0 0 12px;
		font-size: 22px;
	}

	body.is-kampanj .k-wd .wd-seal {
		--wd-seal: clamp(130px, 38vw, 170px);
	}

	body.is-kampanj .k-wd .k-wd__text {
		max-width: 340px;
		font-size: 16px;
	}

	body.is-kampanj .k-wd .k-wd__cta {
		align-self: stretch;
		flex-direction: column;
		gap: 10px;
		margin-top: 22px;
	}

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

/* ---------- The header strip: red with the hero's wavy lines and a few snowflakes ---------- */

/*
 * The waves are the hero's SVG as a file (images/white-december-waves.svg: the same group, stroke and 45 degrees), drawn at its
 * own size (2400 x 700, the hero's 1440 x 700 canvas widened), centred, so the stripes keep the hero's scale and are not stretched.
 */
.k-strip--wd {
	position: relative;
	background: url("../images/white-december-waves.svg") center / 2400px 700px no-repeat, linear-gradient(90deg, #c81f17 0%, #e1251b 50%, #c81f17 100%);
	color: #ffffff;
	height: 46px;
	border-bottom: 0;
}

.k-strip--wd .wd-strip-art {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
	pointer-events: none;
}

.k-strip--wd .wd-sf {
	position: absolute;
	pointer-events: none;
}

.k-strip--wd .k-strip__in,
.k-strip--wd .k-strip__m {
	position: relative;
	z-index: 1;
}

.k-strip--wd .k-strip__tag,
.k-strip--wd .k-strip__mtag {
	background: #ffffff;
	color: #e1251b;
}

.k-strip--wd .k-strip__mtext,
.k-strip--wd .k-strip__mtext b {
	color: #ffffff;
}

.k-strip--wd .k-strip__mtext b {
	font-size: 18px;
	font-weight: 800;
}

/* The link as a green button (the same link, text and tracking as before); a thin white divider before it on a phone. */
.k-strip--wd .k-strip__mgo {
	display: inline-flex;
	align-items: center;
	margin-left: 6px;
	padding: 7px 12px;
	background: #3dbb87;
	color: #161414;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	position: relative;
}

.k-strip--wd .k-strip__mgo::before {
	content: "";
	position: absolute;
	left: -10px;
	top: 50%;
	width: 2px;
	height: 22px;
	margin-top: -11px;
	background: rgba(255, 255, 255, 0.75);
}

.k-strip--wd:focus-visible {
	outline-color: #ffffff;
}

/*
 * A seam between the header and the strip: while the header shrinks (and on some phones always), the two boxes can meet on a
 * fractional pixel, and the page behind them (the hero's heading) shows through as a hairline of cut-off letter tops. The strip's own
 * colour is therefore painted 2px above its edge, over the header's empty bottom margin, so the seam can never be open.
 */
.k-strip--wd {
	box-shadow: 0 -2px 0 0 #d3221a;
}

/* The arrow keeps a space from the word (the flex layout drops the space that Black Weekend's strip keeps). */
.k-strip--wd .k-strip__mgo {
	gap: 0.35em;
}

/* 360-379px: the row is as wide as the screen allows, so the two edge snowflakes are smaller and sit closer to the edge. */
@media (max-width: 379.98px) {
	.k-strip--wd .wd-sf {
		width: 14px !important;
		height: 14px !important;
	}

	.k-strip--wd .wd-sf:nth-of-type(1) {
		left: 3px !important;
	}

	.k-strip--wd .wd-sf:nth-of-type(5) {
		left: auto !important;
		right: 3px !important;
	}
}

@media (min-width: 1170px) {
	.k-strip--wd {
		height: 60px;
	}

	.k-strip--wd .k-strip__pct {
		font-size: 22px;
		font-weight: 800;
		color: #ffffff;
	}

	.k-strip--wd .k-strip__what,
	.k-strip--wd .k-strip__date,
	.k-strip--wd .k-strip__date b {
		color: #ffffff;
	}

	.k-strip--wd .k-strip__date b {
		font-weight: 800;
	}

	.k-strip--wd .k-strip__div {
		width: 2px;
		height: 28px;
		background: rgba(255, 255, 255, 0.75);
	}

	.k-strip--wd .k-strip__tag {
		padding: 7px 14px;
		letter-spacing: 0.2em;
	}

	.k-strip--wd .k-strip__go {
		padding: 9px 20px;
		background: #3dbb87;
		color: #161414;
		font-weight: 700;
		text-decoration: none;
	}

	.k-strip--wd:hover .k-strip__go,
	.k-strip--wd:focus-visible .k-strip__go {
		background: #35a977;
	}
}

@media (max-width: 760px) {
	.k-strip--wd .wd-sf:nth-of-type(2),
	.k-strip--wd .wd-sf:nth-of-type(3),
	.k-strip--wd .wd-sf:nth-of-type(4),
	.k-strip--wd .wd-sf:nth-of-type(6) {
		display: none;
	}
}

/* ---------- The front page band: red with the hero's wavy lines and snowflakes, the hero's seal, a green button ---------- */

/* The same waves file as the strip, at its own size and centred (the hero's scale, not stretched). */
.home-band--wd {
	position: relative;
	overflow: hidden;
	background: url("../images/white-december-waves.svg") center / 2400px 700px no-repeat, linear-gradient(180deg, #e1251b 0%, #d0211a 45%, #8e1a14 100%);
	color: #ffffff;
	border: 0;
}

.home-band--wd:hover,
.home-band--wd:focus-visible {
	color: #ffffff;
}

.home-band--wd:focus-visible {
	outline-color: #ffffff;
}

.home-band--wd .wd-band-art {
	position: absolute;
	inset: 0;
	display: block;
	pointer-events: none;
}

.home-band--wd .wd-fl {
	position: absolute;
	pointer-events: none;
}

.home-band--wd .wd-fl g {
	stroke: #ffffff;
}

.home-band--wd .bw-seals,
.home-band--wd .home-band__copy,
.home-band--wd .home-band__btn {
	position: relative;
}

/* The seal as the hero's: a thick white stroke around the scallop and a soft shadow. */
.home-band--wd .bw-seal__bg {
	overflow: visible;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
}

.home-band--wd .bw-seal__bg path:first-of-type {
	stroke: #ffffff;
	stroke-width: 14;
	paint-order: stroke;
}

.home-band--wd .bw-seal__t,
.home-band--wd .bw-seal__n {
	color: #ffffff;
}

.home-band--wd .home-band__tag--bw {
	background: #ffffff;
	color: #e1251b;
}

.home-band--wd .home-band__h,
.home-band--wd .home-band__p,
.home-band--wd .home-band__p b {
	color: #ffffff;
}

.home-band--wd .home-band__btn {
	background: #3dbb87;
	color: #161414;
}

.home-band--wd:hover .home-band__btn,
.home-band--wd:focus-visible .home-band__btn {
	background: #35a977;
}

/* On a phone the layout is Black Weekend's (centred, stacked, full-width button); only the snowflakes are chosen for it: those beside the seal stay. */
@media (max-width: 899.98px) {
	.home-band--wd .wd-fl:nth-of-type(1),
	.home-band--wd .wd-fl:nth-of-type(3),
	.home-band--wd .wd-fl:nth-of-type(5),
	.home-band--wd .wd-fl:nth-of-type(6) {
		display: none;
	}

	.home-band--wd .wd-fl:nth-of-type(2) {
		left: 80% !important;
		top: 6% !important;
		width: 24px !important;
		height: 24px !important;
	}

	.home-band--wd .wd-fl:nth-of-type(4) {
		left: 89% !important;
		top: 38% !important;
		width: 14px !important;
		height: 14px !important;
	}
}
