/* BN Adventslys – BN-DESIGN.DK */
.bnadv {
	--h: 1;
	--lys-a: #d6303b; --lys-b: #8a0e18; --nr: #f3d27a;
	position: relative; display: block; box-sizing: border-box;
	max-width: 32em; margin: 1.5em auto; padding: 1.6em 1.2em 1.4em;
	border-radius: 1.2em; text-align: center; line-height: 1.35;
	font-family: Georgia, "Times New Roman", serif; overflow: hidden;
}
.bnadv * { box-sizing: border-box; }
.bnadv-lille  { font-size: 9px; }
.bnadv-mellem { font-size: 13px; }
.bnadv-stor   { font-size: 18px; }

/* Baggrunde */
.bnadv-bg-mork {
	background: radial-gradient(ellipse at 50% 30%, #4a2c18 0%, #24150d 50%, #110a06 100%);
	color: #f7e8c9; box-shadow: 0 .6em 2.2em rgba(0,0,0,.35);
}
.bnadv-bg-mork::before { /* små stjerner */
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
	background-image:
		radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
		radial-gradient(1px 1px at 82% 12%, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 68% 30%, #ffe9b0 50%, transparent 51%),
		radial-gradient(1px 1px at 30% 8%, #fff 50%, transparent 51%),
		radial-gradient(1px 1px at 92% 40%, #fff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 6% 42%, #ffe9b0 50%, transparent 51%);
}
.bnadv-bg-lys   { background: linear-gradient(#fffaf0, #f3e6cf); color: #4a2a16; border: 1px solid #e6d4b3; }
.bnadv-bg-ingen { background: transparent; color: inherit; }

/* Lysfarver */
.bnadv-farve-rod   { --lys-a: #d6303b; --lys-b: #8a0e18; --nr: #f3d27a; }
.bnadv-farve-hvid  { --lys-a: #fdf9ef; --lys-b: #d3c6ab; --nr: #a3121f; }
.bnadv-farve-lilla { --lys-a: #8a48b3; --lys-b: #4a1f66; --nr: #f3d27a; }
.bnadv-farve-creme { --lys-a: #f6e7bf; --lys-b: #c4a35c; --nr: #8a0e18; }

.bnadv-titel { position: relative; margin: 0 0 .2em; font-size: 1.8em; letter-spacing: .03em; }

/* Scenen */
.bnadv-scene { position: relative; width: 28em; max-width: 100%; height: 19em; margin: 0 auto; }
.bnadv-raekke {
	position: absolute; left: 0; right: 0; bottom: 3em; z-index: 2;
	display: flex; justify-content: space-around; align-items: flex-end; padding: 0 3.2em;
}
.bnadv-plads { position: relative; width: 3.4em; height: 15em; display: flex; justify-content: center; align-items: flex-end; }

/* Lyset */
.bnadv-lys {
	position: relative; width: 3.1em; height: calc(10.5em * var(--h));
	border-radius: .3em .3em .2em .2em;
	background: linear-gradient(90deg, var(--lys-b) 0%, var(--lys-a) 32%, var(--lys-a) 52%, var(--lys-b) 100%);
	box-shadow: inset 0 .5em .6em -.3em rgba(255,255,255,.35);
	transition: height 1.2s ease;
}
.bnadv-lys::before { /* smeltet top */
	content: ""; position: absolute; left: 0; right: 0; top: -.35em; height: .8em; border-radius: 50%;
	background: radial-gradient(ellipse at 50% 40%, var(--lys-a) 0%, var(--lys-b) 100%);
}
.bnadv-lys.er-taendt::after { /* lille stearindryp */
	content: ""; position: absolute; top: .1em; left: .45em; width: .45em; height: 1.6em;
	border-radius: 0 0 .3em .3em; background: var(--lys-a); filter: brightness(1.08);
}
.bnadv-nr {
	position: absolute; left: 0; right: 0; top: 38%; font-size: 1.7em; font-weight: bold;
	color: var(--nr); text-shadow: 0 1px 1px rgba(0,0,0,.35);
}
.bnadv-vege {
	position: absolute; left: 50%; top: -1em; width: .2em; height: 1em; margin-left: -.1em;
	border-radius: .1em; background: linear-gradient(#0d0907, #4b3826); z-index: 2;
}
.bnadv-lys.er-taendt .bnadv-vege { background: linear-gradient(#ff8a2a, #1a120c 60%); }

/* Flammen */
.bnadv-flamme {
	display: none; position: absolute; left: 50%; bottom: calc(100% + .35em); z-index: 3;
	width: 1.35em; height: 3.1em; margin-left: -.675em;
	border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
	background: radial-gradient(ellipse at 50% 82%, #ffffff 0%, #fff6c4 18%, #ffd04a 42%, #ff8c12 70%, rgba(255,90,0,0) 100%);
	box-shadow: 0 0 1.2em .3em rgba(255,170,60,.55);
	transform-origin: 50% 92%;
	animation: bnadv-flak 1.7s ease-in-out infinite alternate;
}
.bnadv-flamme::after { /* blå bund */
	content: ""; position: absolute; left: 32%; right: 32%; bottom: 3%; height: 26%; border-radius: 50%;
	background: radial-gradient(rgba(90,130,255,.55), rgba(90,130,255,0) 70%);
}
.bnadv-plads:nth-child(2) .bnadv-flamme { animation-duration: 1.4s; animation-delay: -.4s; }
.bnadv-plads:nth-child(3) .bnadv-flamme { animation-duration: 1.9s; animation-delay: -.9s; }
.bnadv-plads:nth-child(4) .bnadv-flamme { animation-duration: 1.55s; animation-delay: -.2s; }

.bnadv-glod {
	display: none; position: absolute; left: 50%; bottom: calc(100% - 3em); z-index: -1;
	width: 13em; height: 13em; margin-left: -6.5em; border-radius: 50%; pointer-events: none;
	background: radial-gradient(circle, rgba(255,190,90,.38) 0%, rgba(255,150,50,.12) 38%, rgba(255,150,50,0) 66%);
	animation: bnadv-glod 2.6s ease-in-out infinite alternate;
}
.bnadv-bg-lys .bnadv-glod { opacity: .55; }
.bnadv-lys.er-taendt .bnadv-flamme,
.bnadv-lys.er-taendt .bnadv-glod { display: block; }

@keyframes bnadv-flak {
	0%   { transform: scale(1, 1) rotate(-1deg); }
	20%  { transform: scale(.95, 1.06) rotate(1.5deg); }
	45%  { transform: scale(1.04, .94) rotate(-2deg); }
	70%  { transform: scale(.97, 1.09) rotate(1deg); }
	100% { transform: scale(1.02, .97) rotate(-.5deg); }
}
@keyframes bnadv-glod {
	0%   { transform: scale(1);    opacity: .85; }
	100% { transform: scale(1.08); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.bnadv-flamme, .bnadv-glod { animation: none; }
}

/* Kransen */
.bnadv-krans { position: absolute; left: 0; right: 0; border-radius: 50%; }
.bnadv-krans-bag {
	bottom: 2.4em; height: 5.2em; z-index: 1;
	background: radial-gradient(ellipse at 50% 50%, #0b2a15 0 45%, #123d20 62%, rgba(18,61,32,0) 72%);
}
.bnadv-krans-for {
	bottom: 0; height: 5.4em; z-index: 3;
	background: radial-gradient(ellipse at 50% 45%, #174a27 0 50%, #0f3a1d 64%, rgba(15,58,29,0) 72%);
}
.bnadv-blad {
	position: absolute; width: 3em; height: 1.05em; border-radius: 50%;
	background: linear-gradient(170deg, #3b8a4c 0%, #1f5f31 55%, #0f3c1d 100%);
	box-shadow: 0 .1em .15em rgba(0,0,0,.35);
}
.bnadv-blad-1 { background: linear-gradient(170deg, #4c9a58 0%, #2a6e3a 55%, #134522 100%); width: 2.5em; }
.bnadv-blad-2 { background: linear-gradient(170deg, #2f7a41 0%, #1a5329 60%, #0c3318 100%); width: 3.4em; }
.bnadv-krans-bag .bnadv-blad { filter: brightness(.6); }
.bnadv-baer {
	position: absolute; width: .95em; height: .95em; margin: -.475em 0 0 -.475em; border-radius: 50%; z-index: 2;
	background: radial-gradient(circle at 35% 30%, #ff8a8a 0%, #d2141f 35%, #7d0710 100%);
	box-shadow: 0 .1em .2em rgba(0,0,0,.45);
}
.bnadv-kogle {
	position: absolute; width: 1.5em; height: 2em; margin: -1em 0 0 -.75em; border-radius: 50% 50% 45% 45%; z-index: 2;
	background:
		repeating-linear-gradient(45deg, rgba(0,0,0,.25) 0 .18em, transparent .18em .45em),
		repeating-linear-gradient(-45deg, rgba(0,0,0,.25) 0 .18em, transparent .18em .45em),
		radial-gradient(circle at 40% 35%, #a5703f, #5c3519 80%);
	transform: rotate(-12deg);
	box-shadow: 0 .1em .25em rgba(0,0,0,.45);
}

/* Datoer og tekster */
.bnadv-datoer {
	position: relative; display: flex; justify-content: space-around;
	width: 28em; max-width: 100%; margin: .3em auto 0; padding: 0 3.2em;
}
.bnadv-dato { width: 3.4em; font-size: .95em; opacity: .55; white-space: nowrap; }
.bnadv-dato.er-taendt { opacity: 1; font-weight: bold; color: #f0b847; }
.bnadv-bg-lys .bnadv-dato.er-taendt, .bnadv-bg-ingen .bnadv-dato.er-taendt { color: #b3121f; }
.bnadv-status { position: relative; margin-top: .9em; font-size: 1.3em; }
.bnadv-info   { position: relative; margin-top: .35em; font-size: 1em; opacity: .8; }

/* Flydende krans */
.bnadv.bnadv-flyd {
	position: fixed; bottom: 14px; z-index: 99990; margin: 0; width: auto; max-width: none;
	padding: .6em .4em .2em; font-size: 6px; border-radius: 14px;
}
.bnadv-flyd-hojre   { right: 14px; }
.bnadv-flyd-venstre { left: 14px; }
.bnadv-flyd .bnadv-scene { width: 28em; }
.bnadv-luk {
	position: absolute; top: 2px; right: 6px; z-index: 10; padding: 0 4px; border: 0; background: none;
	color: inherit; font-size: 18px; line-height: 1; cursor: pointer; opacity: .6;
}
.bnadv-luk:hover { opacity: 1; }

@media (max-width: 540px) {
	.bnadv-stor, .bnadv-mellem { font-size: 10.5px; }
	.bnadv-lille { font-size: 8px; }
}

/* Julestjernen – tændes når fællesskabet når målet i Adventsspillet */
.bnadv-stjerne {
	position: absolute; left: 50%; top: .2em; z-index: 4; width: 2.8em; height: 2.8em; margin-left: -1.4em;
	background: radial-gradient(circle at 50% 45%, #fffbe0 0%, #ffd24a 45%, #f0a020 100%);
	clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
	filter: drop-shadow(0 0 .6em rgba(255,210,74,.9));
	animation: bnadv-stjerne 2.2s ease-in-out infinite alternate;
}
@keyframes bnadv-stjerne { from { transform: scale(.92) rotate(-4deg); opacity: .85; } to { transform: scale(1.06) rotate(4deg); opacity: 1; } }
