#page-all {
	background-color: white;
	box-shadow: 0px 0px 5px silver;
	display: flex;
	flex-direction: column;
	margin: 0 auto;
	min-height: 100vh;
}

#page-all:not(.wide) {
	align-items: center;
	max-width: 900px;
}

#page-bottom {
	background-color: #f4f4f4;
	box-shadow: 0 0 3px 0 gray;
	color: #555;
	font-size: 0.8em;
	margin-top: auto;
	padding: 0 10px;
	text-align: center;
	width: auto;
}

#page-bottom p {
	margin: 4px 0;
}

#page-main {
	margin: calc(min(20px, 3vw) - 10px) min(40px, 4vw);
}

body {
	background-color: #eee;
	margin: 0;
	min-height: 100vh;
}

html {
	margin: 0;
}	

body,
input,
select {
	font-size: 12pt;
}

.controls-bottom label {
	white-space: nowrap;
}

#current-count {
	color: gray;
	font-size: 100pt;
}

#current-count-container {
	margin: 0;
	position: relative;
}

#current-count-spinner {
	text-align: center;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
}

#current-count-container.loaded #current-count {
	color: black;
}

#current-count-container.loaded #current-count-spinner {
	display: none;
}

#current-counts {
	font-size: 18pt;
	margin: 30px auto;
}

#current-counts tr .location {
	line-height: 1em;
	text-align: right;
}

#current-counts tr .location a {
	color: black;
	text-decoration: none;
}

#current-counts tr .count {
	text-align: center;
	width: 80px;
}

#current-counts tr .actions button {
	visibility: hidden;
}

#current-counts tr:hover .location a {
	color: blue;
	text-decoration: underline;
}

#current-counts tr:hover .actions button {
	visibility: visible;
}

#sparkline {
	margin-bottom: 30px;
}

h2 {
	margin-top: 2em;
}

.description,
.instructions {
	background-color: #ffffcc;
	border: 1px solid black;
	margin: 1em 0;
	padding: 0.5em;
}

.description :first-child,
.instructions :first-child {
	margin-top: 0;
}

.description :last-child,
.instructions :last-child {
	margin-bottom: 0;
}

.increment {
	max-width: 400px;
}

.increment .buttons {
	display: grid;
	grid-template-columns: repeat(2, minmax(200px, 2fr));
	grid-template-rows: repeat(2, minmax(150px, 2fr));
}

.increment input {
	font-size: 50pt;
	margin: 10px;
	padding: 0;
	text-align: center;
}

/* CSS specific to iOS devices */
@supports (-webkit-touch-callout: none) {
	.increment input.plus10 {
		font-size: 40pt;
	}
}

.bac {
	align-items: center;
	display: flex;
	flex-direction: column;
}

.tac {
	text-align: center;
}

body.dark-mode,
body.dark-mode #page-all {
	background-color: black !important;
	color: #eee;
}

body.dark-mode #page-bottom {
	background-color: #222;
	color: #eee;
}

body.dark-mode #current-count {
	color: silver;
}

body.dark-mode #current-count-container.loaded #current-count {
	color: #eee;
}

body.dark-mode .description,
body.dark-mode .instructions {
	background-color: #331;
	border-color: #551;
}

body.dark-mode .increment input {
	background-color: #666;
	border: 0;
	color: black;
}
