@font-face {
	font-family: W95F;
	src: url('webfonts/w95f.woff2') format('woff2'),
		url('webfonts/w95f.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

html {
	--accent-color: #0000a8;
	/* manually tuned from above */
	--accent-color-filter: brightness(70%) sepia(100%) hue-rotate(197deg) saturate(500%);
}

body {
	background: #54a8a8;
	margin: 0;
	padding: 8px;
}

.icons {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	align-items: flex-start;
	align-content: flex-start;
	justify-content: flex-start;
}

.icons button {
	all: unset;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 52px;
	font-size: 14px;
	line-height: 1;
	word-break: break-word;
	text-align: center;
	font-family: 'W95F', sans-serif;
	cursor: default;
	gap: 4px;
	margin: 16px 8px 16px 0;
	position: relative;
	color: white;
	user-select: none;

	img {
		width: 32px;
		image-rendering: pixelated;
		user-select: none;
	}

	&:focus {
		span {
			background: var(--accent-color);
		}

		img {
			filter: var(--accent-color-filter);
		}
	}
}


dialog {
	border: 0;
	background: white;
	padding: 1px 0 0 1px;
	border: 1px outset;
	font-family: W95F;
	box-shadow: 1px 1px 0 black, 1px 0 0 black, 0 1px 0 black;
	margin: 0;
	position: absolute;
	z-index: 10000000;

	.container {
		background-color: #c0c4c8;
		padding: 2px 3px 3px 2px;
	}

	.credit {
		padding: 16px;
		text-align: center;
	}


	.titlebar {
		display: flex;
		background-color: var(--accent-color);
		text-shadow: -0.8px 0px 0px, 0.8px 0px 0px;
		letter-spacing: 1px;
		color: white;
		padding: 2px 2px 2px 4px;
		height: 20px;
		line-height: 20px;

		.heading {
			flex: 1;
		}

		button {
			all: unset;
			background: #c0c4c8;
			border: 1px groove;
			border-top: 1px solid white;
			border-left: 1px solid white;
			font-weight: bold;
			width: 16px;
			height: 18px;
			line-height: 18px;
			text-align: center;
			color: black;
			text-transform: uppercase;
			font-size: 12px;
			cursor: default;

			&:active {
				border-top: 1px groove;
				border-bottom: 1px solid white;
				border-left: 1px groove;
				border-right: 1px solid white;
			}
		}
	}

	pre.content {
		margin: 0;
		padding: 4px;
		background: white;
		font: inherit;
		border: 1px inset;
		overflow: scroll;
		resize: both;
		width: 480px;
		height: 320px;
		max-width: 90vw;
		max-height: 95vh;
	}

	.menubar {
		display: flex;
		height: 20px;
		line-height: 20px;
		padding-top: 1px;

		.menuitem {
			all: unset;
			display: block;
			padding: 0 8px;
			cursor: default;

			&.help:hover,
			&.help:focus {
				background: var(--accent-color);
				color: white;
			}
		}
	}

	&#window {
		top: 16px;
		left: 64px;
	}
}

@media(max-width: 450px) {
	dialog {
		&#window {
			top: 8px;
			left: 8px;
		}
	}
}