@import 'utilities.css';
@import 'buttons.css';
@import 'forms.css';

body {
	background-color: #bcc6cf;
	background-image: url('/assets/img/bg.jpg');
	background-attachment: fixed;
	background-position: center top;
	background-repeat: no-repeat;
	font-family: var(--main-font);
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	position: relative;
}

div#ui, div#windows {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	padding: 1rem;
	width: 100%;
	height: 100%;
}

div#ui {
	section#menu {
		display: flex;
		gap: 0.5rem;

		& > a {
			cursor: pointer;
		}
	}
}

div#windows {
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
	pointer-events: none;

	& > div.window {
		pointer-events: auto;
		background-color: #bcc6cf;
		background-image: url('/assets/img/ui/bg.webp');
		box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
		border-radius: 4px;
		position: absolute;

		&.hidden {
			display: none;
		}

		header {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0.5rem;
			cursor: grab;
			border-bottom: 1px solid rgba(0, 0, 0, 0.1);

			.title {
				font-weight: bold;
				margin-right: 1rem;
				user-select: none;
				color: rgba(0, 0, 0, 0.5);

				&:empty {
					margin-right: 0;
				}
			}

			.close {
				width: 16px;
				height: 16px;
				user-select: none;
				cursor: pointer;
				border-radius: 100%;
				display: flex;
				align-items: center;
				justify-content: center;
				overflow: hidden;
			}
		}

		.body {
			padding: 0.5rem;

			&:empty {
				padding: 0;
				display: none;
			}
		}
	}
}

canvas#canvas {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
}

section#character-hud {
	width: 300px;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 1rem;

	span#character-name {
		color: white;
	}

	span#character-title {
		color: white;
	}

	div.hud-meter {
		background-color: black;
		height: 16px;
		min-width: 100px;
		border-radius: 0.1rem;
		position: relative;

		& > div {
			height: 100%;
			border-radius: 0.1rem;
			overflow: hidden;

			&.hp {
				background-color: #e57373;
				background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(139, 0, 0, 0.1));
				box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
				border: 1px solid;
				border-color: #d32f2f #c62828 #b71c1c;
			}

			&.mp {
				background-color: #5a9bd4;
				background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(60, 100, 150, 0.1));
				box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
				border: 1px solid;
				border-color: #4a8ab0 #3a7a9c #2a6a88;
			}

			&.tp {
				background-color: #f4cc67;
				background-image: linear-gradient(rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.1));
				box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset;
				border: 1px solid;
				border-color: #C59F43 #AA8326 #957321;
			}
		}
	}
}
