@font-face {
	font-family: Geist;
	src: url(../font/Geist/Geist-VariableFont_wght.ttf);
}

* {
	font-family: Geist, sans-serif;
}

:root {
	--border-color: #5f5f5f;
	--tile-color: #9f9f9f;
	--tile-color-hover: #afafaf;
	--tile-color-dug: #c0c0c0;
	--tile-color-dug-hover: #b0b0b0;

	--ui-lightgray: #d5d5d5;
	--ui-gray: var(--tile-color);
	--ui-darkgray: darkslategray;

	--face-size: 35px;
	--info-bar-icon-size: 35px;
}

html, body {
	margin: 0;
	width: 100%;
	height: 100%;
}

h1, h2, h3, h4, p {
	margin: 0;
}

label {
	cursor: text;
}

button,
input[type=submit] {
	transition: border 0.1s;
	background-color: #e5e5e5;
	border: 1px solid #c5c5c5;
	border-radius: 4px;
	outline: none;
}
button:hover,
input[type=submit]:hover {
	transition: border 0.1s;
	border: 1px solid var(--ui-gray);
}

input[type=number] {
	appearance: textfield;
	margin-bottom: 5px;
	width: 80px;
	outline: none;
	border-radius: 4px;
	border: 1px solid var(--ui-gray);

}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
input[type=number]:focus {
	border: 1px solid blueviolet;
}

#content {
	display: flex;
	justify-content: center;
}

#minefield-wrapper {
	width: fit-content;
	height: fit-content;
}

#info-bar {
	display: flex;
	flex-direction: row;
	margin-bottom: 5px;
	margin-top: 5px;
	align-items: center;
	padding-right: 5px;
	padding-left: 5px;
}

#minefield {
	display: flex;
	flex-direction: row;
	/*gap: 1px;
	background-color: #5f5f5f;*/
	width: fit-content;
	height: fit-content;
	border-top: 1px solid var(--border-color);
	border-left: 1px solid var(--border-color);
}

#menu {
	max-width: 300px;
	width: 300px;
}

#info {
	max-width: 300px;
	width: 300px;
}

#main-menu-ctx {
	width: 100%;
	text-align: right;
	font-size: 15px;
}

#face-wrapper {
	width: 100%;
	display: flex;
	justify-content: center;
}

#face {
	width: var(--face-size);
	height: var(--face-size);
	background-image: url("../spritesheet.png");
	background-repeat: no-repeat;
	background-size: calc(var(--face-size) * 4) calc(var(--face-size) * 2);
	image-rendering: pixelated;
	background-position: 0px 0px;
}
#face.face-dead {
	background-position: calc(0px - (var(--face-size) * 3)) 0px;
}
#face.face-win {
	background-position: calc(0px - (var(--face-size) * 2)) 0px;
}
#face.face-suspense {
	background-position: calc(0px - (var(--face-size))) 0px;
}

#flag-counter {
	text-align: end;
}

#flag-icon {
	max-width: 30px;
	width: var(--info-bar-icon-size);
	height: var(--info-bar-icon-size);
	background-image: url("../spritesheet.png");
	background-repeat: no-repeat;
	background-size: calc(var(--info-bar-icon-size) * 4) calc(var(--info-bar-icon-size) * 2);
	image-rendering: pixelated;
	background-position: 0px calc(0px - var(--info-bar-icon-size));
}

#timer {
	padding-left: 30px;
}

#new-game-beginner {
	background-color: #b9fbc0;
	border-color: #5ff66e;
}
#new-game-beginner:hover {
	border-color: #0ccd1f;
}

#new-game-intermediate {
	background-color: #fbf8cc;
	border-color: #f1e753;
}
#new-game-intermediate:hover {
	border-color: #d2c511;
}

#new-game-expert {
	background-color: #fde4cf;
	border-color: #fabf8f;
}
#new-game-expert:hover {
	border-color: #f68a31;
}

.panel {
	border: 1px solid var(--ui-gray);
	border-radius: 6px;
	padding: 8px;
	margin: 10px 10px 0px 10px;
	height: fit-content;
}

.panel-section-header {
	display: flex;
	max-height: 20px;
}

.panel .separator {
	height: 1px;
	margin: 10px 0px 10px 0px;
	background-color: var(--ui-lightgray);
}

.panel .vert-buffer {
	height: 20px;
	visibility: hidden;
}

.panel h3 {
	font-weight: 700;
}

.panel h4 {
	min-width: fit-content;
	font-weight: 600;
	color: var(--ui-darkgray);
	font-size: 16px;
}

.btn-row {
	display: flex;
	flex-direction: row;
	gap: 5px;
}
.btn-row button,
.btn-row input[type=submit] {
	width: 100%;
}
.btn-row label {
	width: 100%;
}

.info-bar-text-wrapper {
	max-width: 60px;
	display: flex;
	flex-direction: row;
	align-items: center;
}

.info-text {
	font-size: 16px;
	color: var(--ui-darkgray);
	font-style: italic;
	margin-bottom: 5px;
}

.info-bar-text {
	font-weight: bold;
	font-size: 20px;
	width: 30px;
	padding: 0;
	padding-top: 5px;
}

.tile-col {
	display: flex;
	flex-direction: column;
	/*gap: 1px;*/
}

.tile {
	width: 30px;
	height: 30px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 20px;
	cursor: default;
	background-color: var(--tile-color);
	border-right: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	background-image: none;
	background-repeat: no-repeat;
	background-size: calc(30px * 4) calc(30px * 2);
	image-rendering: pixelated;
}
.tile:hover {
	background-color: var(--tile-color-hover);
}
.tile::selection {
	background: transparent;
}
.tile.dug {
	background-color: var(--tile-color-dug);
}
.tile.dug:hover {
	background-color: var(--tile-color-dug);
}
.tile.mine {
	background-image: url("../spritesheet.png");
	background-position: -30px -30px;
}
.tile.flagged {
	background-image: url("../spritesheet.png");
	background-position: 0px -30px;
}

.btn-primary {
	border-color: #a3c4f3 !important;
	background-color: #8eecf5 !important;
}
.btn-primary:hover {
	border-color: #71a5ed !important;
}