/* The Tradition scene around the calendar: its colours, faces, snow, heading, icons, doors and reward window. */

/* Bundled face, Latin subset under the SIL Open Font License (fonts/OFL-Cinzel.txt), named apart from the
   original so that a shop loading the same family keeps its own. */
@font-face {
	font-family: "Advently Cinzel";
	src: url(../fonts/cinzel.woff2) format("woff2");
	font-weight: 600 700;
	font-display: swap;
}

.lwsp {
	--lwsp-ico-0: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 17l-6.1 3.4 1.5-6.8L2.2 9l6.9-.7z'/%3E%3C/svg%3E");
	--lwsp-ico-1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a2 2 0 012 2v.5A6 6 0 0118 10v4l2 3H4l2-3v-4a6 6 0 014-5.5V4a2 2 0 012-2zm-2 17h4a2 2 0 01-4 0z'/%3E%3C/svg%3E");
	--lwsp-ico-2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c1.5 2 2 3 2 4a2 2 0 01-4 0c0-1 .5-2 2-4zM9 9h6v13H9z'/%3E%3C/svg%3E");
	--lwsp-ico-3: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l5 7h-3l4 6h-3l4 5H5l4-5H6l4-6H7zM11 20h2v3h-2z'/%3E%3C/svg%3E");
	--lwsp-ico-4: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h18v4H3zM4 13h7v9H4zm9 0h7v9h-7zM11 9h2v13h-2zM12 9C9 9 7 7 8 5.5S11 6 12 9c1-3 3-5 4-3.5S15 9 12 9z'/%3E%3C/svg%3E");
	--lwsp-ico-5: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 2h8v4H8zm0 5h8v6l-3 6a4 4 0 01-7-3l2-4z'/%3E%3C/svg%3E");
	--lwsp-ico-6: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' d='M12 2v20M3.3 7l17.4 10M3.3 17L20.7 7M9 4l3 3 3-3M9 20l3-3 3 3'/%3E%3C/svg%3E");
	--lwsp-ico-7: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3a5 5 0 015 5v1l2-2a2 2 0 013 3l-5 6v2H6v-6L5 8a4 4 0 014-5zM6 19h8v3H6z'/%3E%3C/svg%3E");
	--lwsp-ico-8: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 3a9 9 0 100 18 8 8 0 01-5-7 8 8 0 015-11z'/%3E%3C/svg%3E");
	--lwsp-ico-9: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h4v3h-4zM12 7a7 7 0 110 14 7 7 0 010-14z'/%3E%3C/svg%3E");
	--lwsp-ico-10: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a3 3 0 013 3 3 3 0 01-1 2l3 1v4h-3v6l2 4h-3l-1-3-1 3H8l2-4v-6H7V8l3-1a3 3 0 01-1-2 3 3 0 013-3z'/%3E%3C/svg%3E");
	--lwsp-ico-11: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-8-8a5 5 0 017-7l1 1 1-1a5 5 0 017 7z'/%3E%3C/svg%3E");

	position: relative;
	box-sizing: border-box;
	container-type: inline-size;
	isolation: isolate;
	overflow: hidden;
	margin: 1em 0;
	padding: 28px clamp(14px, 3vw, 36px) 34px;
	border-radius: 10px;
	background: var(--lwsp-scene);
	color: var(--lwsp-scene-fg);
}

.lwsp *,
.lwsp *::before,
.lwsp *::after {
	box-sizing: border-box;
}

.lwsp > .lws-advent-calendar {
	position: relative;
	z-index: 2;
}

/* ---------- heading ---------- */
.lwsp-head {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px;
	margin-bottom: 22px;
}

.lwsp .lwsp-title {
	margin: 0;
	font-family: var(--lwsp-tfont);
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	font-weight: 700;
	line-height: 1.05;
	color: var(--lwsp-title);
}

.lwsp .lwsp-sub {
	margin: 0.2em 0 0;
	font-size: 0.95rem;
	opacity: 0.85;
}

.lwsp-count {
	padding: 6px 12px;
	border-radius: 999px;
	white-space: nowrap;
	font-family: var(--lwsp-tfont);
	font-size: 0.9rem;
	font-weight: 700;
	background: var(--lwsp-title);
	color: var(--lwsp-count-fg);
}

.lwsp .lws-advent-calendar__login a {
	color: var(--lwsp-title);
}

/* ---------- snow: static flakes, falling only when motion is welcome ---------- */
.lwsp-snow {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0.5;
	background-image:
		radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
		radial-gradient(2px 2px at 90px 120px, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 160px 60px, #fff 50%, transparent 51%),
		radial-gradient(2.5px 2.5px at 230px 160px, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 300px 90px, #fff 50%, transparent 51%);
	background-size: 320px 200px;
}

@media (prefers-reduced-motion: no-preference) {
	.lwsp-snow {
		animation: lwsp-snow-fall 14s linear infinite;
	}

	@keyframes lwsp-snow-fall {
		to {
			background-position: 40px 200px;
		}
	}
}

/* ---------- icons, drawn in the current colour ---------- */
.lwsp-ico {
	display: block;
	-webkit-mask: var(--lwsp-ico) center / contain no-repeat;
	mask: var(--lwsp-ico) center / contain no-repeat;
	background: currentColor;
}

.lwsp-ico--0 { --lwsp-ico: var(--lwsp-ico-0); }
.lwsp-ico--1 { --lwsp-ico: var(--lwsp-ico-1); }
.lwsp-ico--2 { --lwsp-ico: var(--lwsp-ico-2); }
.lwsp-ico--3 { --lwsp-ico: var(--lwsp-ico-3); }
.lwsp-ico--4 { --lwsp-ico: var(--lwsp-ico-4); }
.lwsp-ico--5 { --lwsp-ico: var(--lwsp-ico-5); }
.lwsp-ico--6 { --lwsp-ico: var(--lwsp-ico-6); }
.lwsp-ico--7 { --lwsp-ico: var(--lwsp-ico-7); }
.lwsp-ico--8 { --lwsp-ico: var(--lwsp-ico-8); }
.lwsp-ico--9 { --lwsp-ico: var(--lwsp-ico-9); }
.lwsp-ico--10 { --lwsp-ico: var(--lwsp-ico-10); }
.lwsp-ico--11 { --lwsp-ico: var(--lwsp-ico-11); }

/* ---------- Tradition: deep red and fir green, gold trims, dotted damask ---------- */
.lwsp-theme-tradition {
	--lwsp-scene: radial-gradient(circle at 50% -20%, #a51c2c, #6d0f1b 60%, #4a0812);
	--lwsp-scene-fg: #f6e7c1;
	--lwsp-title: #f3cf7a;
	--lwsp-count-fg: #5a0a15;
	--lwsp-tfont: "Advently Cinzel", Cinzel, Georgia, serif;
	--lwsp-r: 6px;
	--lwsp-leaf: #8e1626;
	--lwsp-leaf-fg: #f3cf7a;
	--lwsp-leaf2: #1f5a3a;
	--lwsp-leaf2-fg: #f3cf7a;
	--lwsp-trim: #c99a3c;
	--lwsp-inside: #f6e7c1;
	--lwsp-inside-fg: #8e1626;
	--lwsp-halo: #f3cf7a;
	--lwsp-rbg: #fbf3dc;
	--lwsp-rfg: #6d0f1b;
}

.lwsp-theme-tradition::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	opacity: 0.12;
	background:
		radial-gradient(circle at 25% 25%, #f3cf7a 2px, transparent 3px) 0 0 / 46px 46px,
		radial-gradient(circle at 75% 75%, #f3cf7a 1.5px, transparent 2.5px) 0 0 / 46px 46px;
}

.lwsp-theme-tradition .lwsp-title {
	letter-spacing: 0.04em;
}

/* ---------- grid: 6 columns, 4 on a narrow calendar; DOM order is the visual order ---------- */
.lwsp .lws-advent-calendar__grid {
	grid-template-columns: repeat(6, minmax(0, 1fr));
	grid-auto-rows: clamp(84px, 13cqi, 124px);
	gap: 12px;
}

@container (width <= 640px) {
	.lwsp .lws-advent-calendar__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-auto-rows: 80px;
		gap: 9px;
	}
}

.lwsp .lws-advent-calendar__box {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	border-radius: var(--lwsp-r);
}

.lwsp .lws-advent-calendar__box:nth-child(3n) {
	--lwsp-leaf: var(--lwsp-leaf2);
	--lwsp-leaf-fg: var(--lwsp-leaf2-fg);
}

/* ---------- door reset: a transparent frame, the layers carry the look ---------- */
.lwsp .lws-advent-calendar__door,
.lwsp .lws-advent-calendar__door:hover,
.lwsp .lws-advent-calendar__door:focus,
.lwsp .lws-advent-calendar__door:active {
	position: relative;
	display: block;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--lwsp-r);
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-size: 1rem;
	line-height: 1.1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	opacity: 1;
	outline: none;
	perspective: 700px;
	cursor: default;
	animation: none;
	aspect-ratio: auto;
}

/* The Free's frame, today ring and door icons: the scene and the layers draw their own. */
.lwsp .lws-advent-calendar {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

.lwsp .lws-advent-calendar__box::before,
.lwsp .lws-advent-calendar__box::after,
.lwsp .lws-advent-calendar__door::after {
	content: none;
}

/* The Free swings the whole door on the box being opened; the layers open instead. */
.lwsp .lws-advent-calendar__box--just-opened .lws-advent-calendar__door {
	animation: none;
}

.lwsp .lws-advent-calendar__box--openable .lws-advent-calendar__door:not([aria-disabled="true"]) {
	cursor: pointer;
}

.lwsp .lws-advent-calendar__door:focus-visible {
	outline: 3px solid var(--lwsp-halo);
	outline-offset: 3px;
}

/* The state, and an opened box's gift, are told to screen readers; the layers show them. */
.lwsp .lws-advent-calendar__box .lws-advent-calendar__state,
.lwsp .lws-advent-calendar__box .lwsp-said {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- layers ---------- */
.lwsp .lwsp-inside {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	overflow: hidden;
	padding: 6px 6px 10px;
	border-radius: inherit;
	background: var(--lwsp-inside);
	color: var(--lwsp-inside-fg);
	box-shadow: inset 0 4px 12px #0004;
	text-align: center;
}

.lwsp .lwsp-inside .lwsp-ico {
	flex: none;
	width: 34%;
	max-width: 40px;
	height: auto;
	aspect-ratio: 1;
}

.lwsp .lwsp-gift {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	overflow-wrap: anywhere;
	padding: 0 4px;
	font-family: var(--lwsp-tfont);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.1;
}

.lwsp .lwsp-leaf {
	position: absolute;
	z-index: 1;
	border-radius: inherit;
	backface-visibility: hidden;
}

.lwsp .lwsp-image {
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: inherit;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	pointer-events: none;
}

.lwsp .lws-advent-calendar__box--opened .lwsp-image,
.lwsp .lws-advent-calendar__box--just-opened .lwsp-image {
	display: none;
}

.lwsp .lwsp-face {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 4px;
	color: var(--lwsp-leaf-fg);
	pointer-events: none;
}

.lwsp .lwsp-face .lws-advent-calendar__label {
	max-width: 100%;
	overflow-wrap: anywhere;
	text-align: center;
	font-family: var(--lwsp-tfont);
	font-size: clamp(1.35rem, 4.5cqi, 2rem);
	font-weight: 700;
	line-height: 1;
	opacity: 1; /* the Free dims the number per state */
}

.lwsp .lwsp-face .lwsp-ico {
	flex: none;
	width: 30%;
	max-width: 32px;
	min-width: 16px;
	height: auto;
	aspect-ratio: 1;
	opacity: 0.9;
}

.lwsp .lwsp-tag {
	display: none;
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
}

.lwsp .lws-advent-calendar__box--opened .lwsp-face {
	opacity: 0;
}

@container (width <= 640px) {
	.lwsp .lws-advent-calendar__box:not(:has(.lwsp-mw2)) .lwsp-gift {
		display: none;
	}

	.lwsp .lws-advent-calendar__box:not(:has(.lwsp-mw2)) .lwsp-inside .lwsp-ico {
		display: block;
		width: 40%;
	}

	.lwsp .lwsp-face .lwsp-ico {
		display: none;
	}
}

/* ---------- Porte entrouverte: one leaf hinged on the left, swung inwards ---------- */
.lwsp-open-door .lwsp-leaf--a {
	inset: 0;
	background: var(--lwsp-leaf);
	box-shadow: inset 0 0 0 2px var(--lwsp-trim), inset 0 0 0 6px var(--lwsp-leaf), inset 0 0 0 7px var(--lwsp-trim);
	transform-origin: left center;
}

.lwsp-open-door .lwsp-leaf--a::after {
	content: "";
	position: absolute;
	right: 9px;
	top: 50%;
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border-radius: 50%;
	background: var(--lwsp-trim);
}

.lwsp-open-door .lwsp-leaf--b {
	display: none;
}

.lwsp-open-door .lws-advent-calendar__box--opened .lwsp-leaf--a {
	transform: rotateY(62deg);
	filter: brightness(0.8);
}

.lwsp-open-door .lws-advent-calendar__box--opened .lwsp-inside {
	padding-left: 44%;
	padding-right: 4px;
}

/* The leaf ajar leaves half a cell: a line that follows the calendar width keeps a word like "shipping" whole. */
@container (width > 640px) {
	.lwsp-open-door .lwsp-inside .lwsp-gift {
		padding: 0;
		font-size: min(0.78rem, 1.6cqi);
	}
}

@keyframes lwsp-open-door {
	to {
		transform: rotateY(62deg);
		filter: brightness(0.8);
	}
}

@keyframes lwsp-open-fade {
	to {
		opacity: 0;
	}
}

/* ---------- the opening, played on the box the Free marks just opened, ending on the opened pose ---------- */
@media (prefers-reduced-motion: no-preference) {
	.lwsp .lws-advent-calendar__box--just-opened .lwsp-face {
		animation: lwsp-open-fade var(--lws-advent-calendar-open-duration) ease-in-out forwards;
	}

	.lwsp-open-door .lws-advent-calendar__box--just-opened .lwsp-leaf--a {
		animation: lwsp-open-door var(--lws-advent-calendar-open-duration) ease-in-out forwards;
	}
}

/* ---------- today's box: every style has a static ring or ribbon, motion only adds to it ---------- */
.lwsp .lws-advent-calendar__box--openable {
	z-index: 4;
}

.lwsp .lws-advent-calendar__box--openable .lwsp-face .lwsp-ico {
	display: none;
}

.lwsp-today-ribbon .lws-advent-calendar__box--openable .lwsp-face {
	padding-top: 20px;
}

.lwsp .lws-advent-calendar__box--openable .lwsp-tag--go {
	display: block;
	padding: 2px 7px;
	border-radius: 3px;
	white-space: nowrap;
	background: var(--lwsp-halo);
	color: var(--lwsp-count-fg);
}

.lwsp-today-ribbon .lws-advent-calendar__box--openable {
	box-shadow: 0 0 0 3px var(--lwsp-halo);
}

.lwsp-today-ribbon .lws-advent-calendar__box--openable .lwsp-tag--today {
	display: block;
	position: absolute;
	top: 3px;
	left: 50%;
	z-index: 1;
	max-width: calc(100% - 6px);
	overflow: hidden;
	padding: 2px 6px;
	border-radius: 3px;
	white-space: nowrap;
	text-overflow: ellipsis;
	background: var(--lwsp-halo);
	color: var(--lwsp-count-fg);
	box-shadow: 0 2px 6px #0004;
	transform: translateX(-50%);
}

@container (width <= 640px) {
	.lwsp .lws-advent-calendar__box--openable .lwsp-tag--go,
	.lwsp-today-ribbon .lws-advent-calendar__box--openable .lwsp-tag--today {
		padding: 1px 3px;
		font-size: 0.5rem;
		letter-spacing: 0.02em;
	}

	/* "Still open" on a phone door: the size of the other tags, on one line where the door allows it. */
	.lwsp .lwsp-tag--missed {
		font-size: 0.5rem;
		letter-spacing: 0.02em;
	}
}

/* The Free waits for the first animationend of the box being opened: a looping highlight never sends one. */
.lwsp .lws-advent-calendar__box.lws-advent-calendar__box--just-opened {
	animation: none;
}

/* ---------- a missed box: closed, darkened, greyed, its content hidden ---------- */
.lwsp .lwsp-flag-missed ~ .lwsp-leaf,
.lwsp .lwsp-flag-missed ~ .lwsp-image {
	filter: grayscale(0.8) brightness(0.75);
}

.lwsp .lwsp-flag-missed ~ .lwsp-inside {
	visibility: hidden;
}

.lwsp .lwsp-flag-missed ~ .lwsp-face {
	opacity: 0.6;
}

.lwsp .lwsp-flag-missed ~ .lwsp-face .lwsp-tag--missed {
	display: block;
}

/* A late box the merchant leaves open (the Free's data-openable) is a closed door to open: not greyed, and it takes the pointer. */
.lwsp [data-openable="1"] .lwsp-flag-missed ~ .lwsp-leaf,
.lwsp [data-openable="1"] .lwsp-flag-missed ~ .lwsp-image {
	filter: none;
}

.lwsp [data-openable="1"] .lwsp-flag-missed ~ .lwsp-face {
	opacity: 1;
}

.lwsp .lws-advent-calendar__box[data-openable="1"] .lws-advent-calendar__door:not([aria-disabled="true"]) {
	cursor: pointer;
}

/* ---------- the merchant's text in place of the number: a small label, never wider or taller than the box ---------- */
.lwsp .lwsp-face--caption .lws-advent-calendar__label {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	min-width: 0;
	height: auto;
	max-width: 100%;
	overflow: hidden;
	padding: 0.25em 0.45em;
	font-size: 0.78rem;
	line-height: 1.15;
}

/* ---------- the reward window, dressed by the theme ---------- */
.lwsp-theme-tradition {
	--lwsp-dialog-ico: var(--lwsp-ico-4);
}

.lwsp .lws-advent-calendar__dialog {
	border-radius: 12px;
	background: var(--lwsp-rbg);
	color: var(--lwsp-rfg);
	box-shadow: 0 0 0 3px var(--lwsp-trim), 0 20px 50px #0008;
}

.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__reward-icon {
	width: 64px;
	height: 64px;
	background: var(--lwsp-leaf);
	color: var(--lwsp-leaf-fg);
}

.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__reward-icon svg {
	display: none;
}

.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__reward-icon::before {
	content: "";
	width: 34px;
	height: 34px;
	-webkit-mask: var(--lwsp-dialog-ico) center / contain no-repeat;
	mask: var(--lwsp-dialog-ico) center / contain no-repeat;
	background: currentColor;
}

.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__reward-title,
.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__identify-title {
	color: inherit;
	font-family: var(--lwsp-tfont);
	font-weight: 700;
}

/* The e-mail form a visitor fills in the same window keeps its gift icon and takes the colours of the reward. */
.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__identify-icon {
	background: var(--lwsp-leaf);
	color: var(--lwsp-leaf-fg);
}

.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__apply,
.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__apply:hover,
.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__apply:focus,
.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__identify-submit,
.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__identify-submit:hover,
.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__identify-submit:focus {
	padding: 11px;
	border: 0;
	border-radius: 8px;
	background: var(--lwsp-leaf);
	color: var(--lwsp-leaf-fg);
	font-weight: 700;
	text-decoration: none;
}

.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__apply:hover,
.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__identify-submit:hover {
	filter: brightness(1.1);
}

.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__apply:focus-visible,
.lwsp .lws-advent-calendar__dialog .lws-advent-calendar__identify-submit:focus-visible {
	outline: 3px solid var(--lwsp-trim);
	outline-offset: 2px;
}

/* ---------- confetti, added by js/scene.js on a fresh opening ---------- */
.lwsp-confetti {
	position: fixed;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
}

.lwsp-confetti span {
	position: absolute;
	top: -12px;
	width: 8px;
	height: 12px;
	border-radius: 2px;
}

/* The window only fades: a transform on it would hold the fixed confetti layer inside it. Its content grows. */
@keyframes lwsp-dialog-pop {
	from {
		opacity: 0;
	}
}

@keyframes lwsp-dialog-grow {
	from {
		transform: scale(0.85);
	}
}

@keyframes lwsp-confetti-drop {
	to {
		transform: translateY(110vh) rotate(540deg);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.lwsp .lws-advent-calendar__dialog[open] {
		animation: lwsp-dialog-pop 0.35s ease-out;
	}

	.lwsp .lws-advent-calendar__dialog[open] .lws-advent-calendar__dialog-content {
		animation: lwsp-dialog-grow 0.35s ease-out;
	}

	.lwsp-confetti span {
		animation: lwsp-confetti-drop 1.6s ease-in forwards;
	}
}
