/* Tacky Holidays. Tacky on purpose, but every control keeps AA contrast and a visible focus ring. */

.dm-tacky-snow {
	position: fixed;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 2147482000;
}

.dm-tacky-flake {
	position: absolute;
	top: 0;
	line-height: 1;
	user-select: none;
	will-change: transform;
	animation-name: dm-tacky-fall;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.dm-tacky-pole {
	width: 6px;
	height: 64px;
	border-radius: 3px;
	background: linear-gradient( 90deg, #8d8d8d, #f4f4f4 40%, #9a9a9a 60%, #d9d9d9 );
	box-shadow: 0 0 4px rgba( 0, 0, 0, 0.35 );
}

.dm-tacky-elf {
	padding: 0 0.2em;
	border-bottom: 0.22em solid #8b5a2b;
	border-radius: 0 0 3px 3px;
	box-shadow: 0 3px 3px rgba( 0, 0, 0, 0.35 );
}

/* Sized in em so the photos vary with each flake's random font size, like the emoji around them. */
.dm-tacky-photo {
	display: block;
	width: 1.6em;
	height: 1.6em;
	max-width: none;
	border-radius: 50%;
	border: 2px solid #ffd700;
	box-shadow: 0 0 6px rgba( 0, 0, 0, 0.45 );
	object-fit: cover;
}

@keyframes dm-tacky-fall {
	from {
		transform: translate3d( 0, -12vh, 0 ) rotate( 0deg );
	}
	to {
		transform: translate3d( var( --dm-sway, 0px ), 112vh, 0 ) rotate( 360deg );
	}
}

.dm-tacky-spark {
	position: fixed;
	z-index: 2147482500;
	font-size: 18px;
	line-height: 1;
	pointer-events: none;
	transform: translate( -50%, -50% );
	animation: dm-tacky-spark 0.9s ease-out forwards;
}

@keyframes dm-tacky-spark {
	from {
		opacity: 1;
		transform: translate( -50%, -50% ) scale( 1 );
	}
	to {
		opacity: 0;
		transform: translate( -50%, 30px ) scale( 0.4 ) rotate( 90deg );
	}
}

/* Marquee: along the bottom so it never covers a sticky header or the navigation. */

.dm-tacky-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	height: 40px;
	overflow: hidden;
	z-index: 2147483000;
	border-top: 3px dashed #ffd700;
}

.dm-tacky-bar.dm-tacky-rainbow {
	animation: dm-tacky-hue 6s linear infinite;
}

@keyframes dm-tacky-hue {
	to {
		filter: hue-rotate( 360deg );
	}
}

/* The heavy black outline keeps white text readable on every stripe color, light or dark. */
.dm-tacky-track {
	position: absolute;
	top: 0;
	left: 0;
	padding-left: 100vw;
	white-space: nowrap;
	font: 900 20px/37px Impact, "Arial Black", "Comic Sans MS", sans-serif;
	letter-spacing: 1px;
	color: #fff;
	text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
	animation: dm-tacky-scroll 40s linear infinite;
}

@keyframes dm-tacky-scroll {
	from {
		transform: translateX( 0 );
	}
	to {
		transform: translateX( -100% );
	}
}

/* Once a second, well under the three-flashes-a-second seizure threshold. */
.dm-tacky-blink {
	animation: dm-tacky-blink 1s steps( 2, start ) infinite;
}

@keyframes dm-tacky-blink {
	to {
		visibility: hidden;
	}
}

html.dm-tacky-has-bar body {
	padding-bottom: 43px;
}

/* Controls */

.dm-tacky-controls {
	position: fixed;
	right: 12px;
	bottom: 12px;
	z-index: 2147483001;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	max-width: calc( 100vw - 24px );
}

html.dm-tacky-has-bar .dm-tacky-controls {
	bottom: 55px;
}

.dm-tacky-btn {
	min-height: 44px;
	margin: 0;
	padding: 10px 14px;
	font: 700 15px/1.2 "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive;
	color: #000;
	background: #ffeb3b;
	border: 3px ridge #d4af37;
	border-radius: 6px;
	box-shadow: 3px 3px 0 #000;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
}

.dm-tacky-btn:hover {
	background: #fff176;
}

.dm-tacky-btn:focus-visible {
	outline: 3px solid #000;
	outline-offset: 3px;
}

.dm-tacky-btn-stop {
	background: #fff;
	border-color: #c8102e;
}

.dm-tacky-btn-quiet {
	background: #fff;
	border-color: #8a8a8a;
}

.dm-tacky-badge {
	padding: 4px 8px;
	font: 700 12px/1.3 system-ui, sans-serif;
	color: #fff;
	background: #000;
}

.dm-tacky-toast {
	max-width: 280px;
	padding: 10px 14px;
	font: 700 14px/1.3 "Comic Sans MS", "Chalkboard SE", cursive;
	color: #000;
	background: #fff;
	border: 4px double #c8102e;
}

.dm-tacky-toast[hidden] {
	display: none;
}

/* Grievance dialog */

.dm-tacky-dialog {
	width: calc( 100vw - 40px );
	max-width: 420px;
	padding: 20px;
	font: 16px/1.4 "Comic Sans MS", "Chalkboard SE", cursive;
	color: #000;
	background: #fff;
	border: 6px ridge #c0c0c0;
}

.dm-tacky-dialog::backdrop {
	background: rgba( 0, 0, 0, 0.6 );
}

.dm-tacky-dialog-title {
	margin: 0 0 12px;
	font: 900 24px/1.2 Impact, "Arial Black", sans-serif;
	color: #000;
	text-transform: uppercase;
}

.dm-tacky-label {
	display: block;
	font-weight: 700;
}

/* 16px stops iOS from zooming the page when the field gets focus. */
.dm-tacky-input {
	box-sizing: border-box;
	width: 100%;
	margin: 6px 0 14px;
	padding: 10px;
	font-size: 16px;
	color: #000;
	background: #fff;
	border: 2px solid #000;
}

.dm-tacky-input:focus-visible {
	outline: 3px solid #1e5bd8;
	outline-offset: 2px;
}

.dm-tacky-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Tackiness 11. Icon fonts sit on <i> and <span> elements, which are left alone so icons keep working. */
html.dm-tacky-eleven body,
html.dm-tacky-eleven h1,
html.dm-tacky-eleven h2,
html.dm-tacky-eleven h3,
html.dm-tacky-eleven h4,
html.dm-tacky-eleven h5,
html.dm-tacky-eleven h6,
html.dm-tacky-eleven p,
html.dm-tacky-eleven li,
html.dm-tacky-eleven blockquote,
html.dm-tacky-eleven td,
html.dm-tacky-eleven th {
	font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive !important;
}

@media ( prefers-reduced-motion: reduce ) {
	.dm-tacky-track {
		padding-left: 12px;
		animation: none;
	}

	.dm-tacky-blink,
	.dm-tacky-bar.dm-tacky-rainbow {
		animation: none;
	}
}
