:root {
	--header-height: 40px;
	--footer-height: 40px;

	--card-table-bg: #5e945e;

	--listStripe-bg: rgba(0, 128, 0, 0.1);
}

html,
body {
	overscroll-behavior-y: none;
}

html {
	/* font-size: clamp(0.85rem, 1vw + 0.5rem, 1.25rem); */
	font-size: 20px;
}

@media (width <= 768px) {
	html {
		font-size: 14px;
	}
}

body {
	font-family: Arial, Helvetica, sans-serif;
}

table td,
table th {
	padding: 0.25rem 0.2rem;
}

input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="file"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="range"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
select {
	font-family: inherit;
	width: 100%;
	/* border: none; */
	font-size: inherit;
	color: inherit;
	/* background-color: inherit; */
	padding: 0 0.25rem;
	text-decoration: inherit;
}

/* ========================== app ================================= */
.app {
	max-width: 1000px;
	height: 200dvh;
	display: grid;
	grid-template-rows: var(--header-height) 1fr var(--footer-height);
}

/* ========================== main ================================= */
main {
	display: grid;
	/* grid-template-rows: 50% 50%; */
	grid-template-rows: 1fr 1fr;
}

/* ========================== Header/Footer ================================= */
header,
footer {
	color: white;
	background-color: black;
	align-items: center;
	justify-content: center;
	display: grid;
	grid-template-columns: 1fr auto;
}

header {
	padding: 0 10px 0 50px;

	& .title {
		font-size: 1.1rem;
		font-weight: bold;
		text-align: center;
	}

	& .subTitle {
		font-size: 0.65rem;
		font-weight: bold;
	}

	& .headerIcon {
		width: 36px;
	}
}

footer {
	color: white;
	background-color: black;
	display: flex;
	gap: 0.5rem;
	align-items: center;
	justify-content: center;
}

/* ========================== handRank ================================= */
section.handRank {
	display: grid;
	grid-template-rows: 30px 1fr;
	overflow: hidden;

	& > .title {
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 1.25rem;
	}
}

/* ========================== handChart ================================= */
.handChart {
	display: grid;
	grid-template-rows: repeat(12, 1fr);
	grid-template-columns: 1fr auto;
	overflow: hidden;
	background-color: var(--card-table-bg);
}

/* ========================== hand ================================= */
.hand {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	/* gap: 5px; */
	/* padding: 2px 5px; */
}

.hand.fourCard {
	grid-template-columns: repeat(4, 20%);
	justify-content: center;
}

/* ========================== hand description ================================= */
.handDesc {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 5px;

	& .title {
		font-size: 1.1rem;
		font-weight: bold;
	}
}

/* ========================== houseRules ================================= */
section.houseRules {
	display: grid;
	grid-template-rows: 30px 1fr;
	overflow: hidden;

	& .titleWrapper {
		display: flex;
		gap: 5px;
		align-items: center;
		justify-content: center;
		padding-left: 20px;

		& .title {
			font-size: 1.25rem;
			font-weight: bold;
		}

		& .subTitle {
			font-size: 1rem;
		}
	}

	& .houseRuleList {
		background-color: papayawhip;
		font-size: 1.25rem;
		padding: 1rem;
	}
}

/* ========================== card ================================= */
.card {
	background-position: top left;
	background-size: 240%;
	background-repeat: no-repeat;
	background-origin: padding-box;
	background-clip: padding-box;
	margin: 2px 3px;
}

@media (min-width: 768px) {
	.card {
		background-size: cover; /* Locks to a fixed pixel width on large screens */
	}
}

@media print {
	.card {
		-webkit-print-color-adjust: exact !important; /* Chrome, Safari, Edge */
		print-color-adjust: exact !important; /* Firefox, Modern Safari */
		background-size: cover; /* Locks to a fixed pixel width on large screens */
	}

	.headerIcon {
		-webkit-print-color-adjust: exact !important; /* Chrome, Safari, Edge */
		print-color-adjust: exact !important; /* Firefox, Modern Safari */
		background-color: black;
	}

	nav {
		display: none !important;
	}

	header,
	footer,
	.handChart,
	.houseRuleList {
		color: unset !important;
		/* background-color: unset !important; */
	}
}

/* ================================= Report ======================================================= */

.reportWrapper {
	font-size: 0.9rem;
}

.dateRangeWrapper {
	display: flex;
	gap: 5px;
	justify-content: center;
	margin-bottom: 0.25rem;
}

.dateRangeWrapper select,
.dateRangeWrapper input {
	font-size: inherit;
}

.reportWrapper hr {
	margin: 0.5rem 0;
	height: 2px;
	background-color: black;
	border: none;
}

.msgBox .reportWrapper.userLog {
	& td.index {
		text-align: end;
	}

	& td.reqIp,
	& td.reqPort,
	& td.version {
		text-align: center;
	}
}

/* ========================== utility ================================= */
.dimmed {
	/* opacity: 0.3; */
	filter: brightness(0.5);
}

/* ========================== test ================================= */
/* * {
	outline: 1px solid blue;
} */
