/* ================================== Vars ======================== */
:root {
	--primary-color: #204f6e;
	--dark-color: #333333;
	--light-color: #f4f4f4;
	--danger-color: #dc3545;
	--success-color: #28a745;
	--background-color: #dcdcdc;
}

/* ================================== Reset ======================== */

*,
*::after,
*::before {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

input[type="checkbox"] {
	width: 1rem;
	aspect-ratio: 1 / 1;
}

/* ================================== Page Areas ======================== */

body {
	margin: 0;
	padding: 0;
	font-family: Arial, Helvetica, sans-serif;
	overscroll-behavior-y: none;
	overscroll-behavior-block: none;
	touch-action: pan-y pan-x;
	background-color: #222;
	min-height: 100vh;
	min-height: -webkit-fill-available;
}

html {
	height: -webkit-fill-available;
}

/* To correct issue with Firefox not vertically centering text in button */
button {
	font-family: inherit;
}

.pageContainer {
	/* position: relative; */
	display: grid;
	grid-template-rows: 40px 1fr 50px;
	max-width: 600px;
	margin: 0 auto;
	overflow: hidden;
	overscroll-behavior-y: none;
	overscroll-behavior-block: none;
	/* touch-action: none; */
}

.pageContainer header {
	background-color: ivory;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	white-space: nowrap;
	z-index: 1;
	padding: 0 0.6rem;
}

.pageContainer header .headerIcon {
	height: 1.25rem;
	width: auto;
	margin-left: 10px;
	cursor: pointer;
}

.pageContainer .headerLeft {
	display: flex;
	align-content: center;
	align-items: center;
}

.pageContainer .headerRight {
	text-align: right;
}

.pageContainer .headerCenter {
	font-weight: 800;
	font-size: 1.25rem;
}

.pageContainer main {
	display: grid;
	grid-template-rows: 1fr auto 1fr;
	/* grid-template-columns: 1fr; */
	position: relative;
	background-color: var(--background-color);
}

.pageContainer .cardArea {
	position: relative;
	/* width: min(45vh, 100%); */
	/* Calculate the width based on half the height - (header + divider + footer height)/2  */
	width: min(calc(50vh - 20px), 100%);
	height: calc(50vh - 65px);
	margin: 0 auto;
	/* border: 1px solid black; */
}

.pageContainer .inactiveMessage.weather {
	width: max-content;
	max-width: 80%;
	position: absolute;
	/* font-size: 1.2rem; */
	/* from https://css-tricks.com/linearly-scale-font-size-with-css-clamp-based-on-the-viewport/ */
	font-size: clamp(1rem, 0.625rem + 1.6667vw, 1.5rem);
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
}

.pageContainer .inactiveMessage.weather #weatherIcon {
	max-width: 35vw;
}

.pageContainer .inactiveMessage.weather #weatherText {
	opacity: 0.6;
	margin-top: -1rem;
}

.pageContainer .inactiveMessage.largeText {
	position: absolute;
	font-size: 7rem;
	line-height: 7rem;
	text-align: center;
	font-weight: 900;
	opacity: 0.3;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.board.divider {
	height: 40px;
	padding: 0 0.7rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 1.25rem;
	border-top: 2px solid;
	border-bottom: 2px solid;
	background-color: papayawhip;
}

.pageContainer footer {
	color: white;
	padding-top: 5px;
	background-color: black;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	/* align-items: center; */
	white-space: nowrap;
	/* padding: 0 0.25rem; */
}

.pageContainer footer > div {
	padding: 0 8px;
}

.pageContainer .footerCenter {
	text-align: center;
}

.pageContainer footer > *:last-child {
	text-align: right;
}

/* =============================== MENU ====================================== */

.menu {
	position: absolute;
	top: 0px;
	left: 0px;
	transform: translateY(-105%);
	overflow: hidden;
	color: #eee;
	background-color: #222;
	transition: ease-in-out 0.2s;
	border-bottom-right-radius: 1rem;
	font-size: 1.25rem;
	border-right: 3px solid ivory;
	border-bottom: 3px solid ivory;
}

.menu.open {
	transform: translateY(0);
}

.menu .menuItem {
	display: flex;
	align-items: center;
	margin: 0.75rem 0.5rem;
	padding: 0.25rem 0.5rem;
	cursor: pointer;
	text-align: center;
}

.menu .menuItem:hover {
	color: #fff;
}

.menu .menuItem .menuText {
	padding-left: 0.25rem;
}

.menu .menuItem .menuText .menuSubText {
	font-size: 0.6em;
}

.menu .menuIcon {
	width: 1em;
	height: auto;
}

.burger {
	display: inline-block;
	cursor: pointer;
}

.burger div {
	width: 25px;
	height: 3px;
	background-color: black;
	margin: 4px 0;
	border-radius: 25px;
	transition: ease-in-out 0.3s;
}

.burger.open div:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.burger.open div:nth-child(2) {
	opacity: 0;
	width: 0;
}
.burger.open div:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.menuIcon {
	height: 1em;
}

/* ================================== Cards ======================== */
.card {
	display: grid;
	place-items: center;
	/* place-content: center; */
	width: 100%;
	height: 100%;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	font-size: 0;
}

/* ================================== Icons ======================== */
.icon {
	width: 85%;
	padding: 3px;
}

/* .iconContainer {
	position: relative;
} */

/* .iconContainer .iconNumber {
	position: absolute;
	font-size: 1rem;
	opacity: 0.2;
	left: 5px;
} */

/* ================================== Count down box ======================== */
#countdown.backdrop {
	position: fixed;
	/* position: absolute; */
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1;
}

#countdown .box {
	font-size: 12rem;
	color: yellow;
	position: fixed;
	/* position: absolute; */
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* ================================== Load icons box ======================== */
#loadIcons.backdrop {
	position: fixed;
	/* position: absolute; */
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1;
}

#loadIcons .box {
	text-align: center;
	width: 75%;
	max-width: 600px;
	position: fixed;
	/* position: absolute; */
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: white;
	border: 2px solid black;
	border-radius: 5px;
}

#loadIcons .title {
	font-size: 1.5rem;
}

#loadIcons .iconCnt {
	font-size: 1rem;
}

#loadIcons .iconLoaded {
	height: 100px;
	width: 100px;
	/* min-width: 50%; */
	/* min-height: 50%; */
}

#loadIcons .iconLoadProgressContainer {
	width: 95%;
	margin: 0.25rem auto;
}

#loadIcons .iconLoadProgress {
	background-color: black;
	height: 5px;
	width: 0%;
}

/* ============================================ Table ======================== */
#leaderboardTable {
	margin: 0 auto;
	border-collapse: collapse;
	border: 1px solid black;
}

#leaderboardTable tr:nth-child(even) {
	background-color: #e6e6e6;
}

#leaderboardTable th,
#leaderboardTable td {
	border: 2px solid #000;
	text-align: center;
	padding: 0 0.25rem;
	white-space: nowrap;
}

#leaderboardTable thead tr:last-child th {
	color: white;
	background-color: black;
}

/* ================================== Notify Me ======================== */
.notifyMeSection {
	border: 2px solid black;
	border-radius: 0.25rem;
	padding: 0.5rem;
}

/* #notifyMeForm input {
	display: block;
	width: 100%;
} */

#notifyMeForm input:not([type="checkbox"]),
#notifyMeForm select {
	outline: 0;
}

#notifyMeForm input:not([type="checkbox"]):valid,
#notifyMeForm select:valid {
	border-color: var(--cw-success);
	box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

#notifyMeForm input:not([type="checkbox"]):invalid,
#notifyMeForm select:invalid {
	border-color: var(--cw-danger);
	box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#notifyMeForm input:not([type="checkbox"]):focus,
#notifyMeForm select:focus {
	outline: black solid 1px;
}

#notifyMeForm input[name="textPhoneNumber"] {
	width: calc(12ch + 0.5rem);
	text-align: center;
}

#notifyMeForm input[name="email"] {
	width: 100%;
}

/* ================================== Utility ======================== */

.d-block {
	display: block !important;
}

.m-0 {
	margin: 0 !important;
}

.m-auto {
	margin: 0 auto !important;
}

.t-center {
	text-align: center !important;
}

.t-right {
	text-align: right !important;
}

input,
select {
	font-size: 1rem;
	/* line-height: 1.5rem; */
	padding: 0.25rem;
	margin: 0 0.25rem;
	max-width: 100%;
}

ul {
	margin-left: 1.5rem;
}

.btn {
	font-size: 1.2rem;
	display: inline-block;
	background: var(--light-color);
	color: #333;
	padding: 0.3rem 1.3rem;
	border-radius: 5px;
	cursor: pointer;
	margin-right: 0.5rem;
	transition: opacity 0.2s ease-in;
}

.btn-md {
	font-size: 1rem;
	padding: 0.3rem 1rem;
}

.btn-sm {
	font-size: 0.9rem;
	padding: 0.3rem 1rem;
	margin-right: 0.2rem;
}

.btn:focus,
.btn:active {
	border-width: 3px;
}

.opacity-0 {
	opacity: 0;
}

.container-vp100 {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	top: 0;
	left: 0;
	/* height: 100vh; */
	/* width: 100vw; */
	min-height: 100vh;
	max-height: 100vh;
	min-width: 100vw;
	max-width: 100vw;
}

.text-center {
	text-align: center;
}

.d-none {
	display: none;
}
