body {
	margin: 0;
	font-family: 'Simonetta', serif;
}
.page-container {
	max-width: 980px;
	margin: 0 auto;
}

button {
	cursor: pointer;
}
.header {
	background-color: #eee;
}
.header:after {
	content: "";
	display: table;
	clear: both;
}

.version,
.controls {
	text-align: center;
	padding: 0 1em 0.5em;
}
.controls {
	text-align: right;
}
.controls button {
	margin-left: 0.5em;
}
.controls button:first-of-type{
	margin-left: 0;
}
.options-container {
	display: none;
	padding: 0.5em 0 0.25em;
}
.export-container {
	display: none;
	margin-top:0.5em;
}
.export-text {
	width: 100%;
}

.container {
	width: 100%;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
}
.container > div {
	box-sizing: border-box;
	padding: 0.5em 1em;
}
.container div.main {
	padding-top: 0;
}
.container div.totals {
	padding-left: 0;
}

.info {
	order: 1;
	width: 40%;
}
.main {
	order: 3;
	width: 100%;
}

.log.desktop {
	display: none;
}
.log.mobile {
	order: 4;
	display: block;
	width: 100%;
	padding: 0 1em;
}

.name {
	font-weight: bold;
}
.gold,
.statusList{
	padding: 4px 0 0 4px;
}

.actions {
	text-align: center;
	margin-top: 2em;
}
.totals {
	text-align: right;
}
.actions > button,
.actions > .ritual {
	display: block;
	margin: 0 auto 0.5em;
}
.tabs {
	box-sizing: border-box;
	border-bottom: 1px solid #ccc;
	height: 30px;
}
.tab {
	box-sizing: border-box;
	display: inline-block;
	padding: 5px 1em;
	height: 30px;
}
.tab[disabled]{
	opacity: 0.4;
}
.tab[disabled]:hover{
	cursor: auto;
}
.tab.active {
	border-top: 1px solid #ccc;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
	border-bottom: 1px solid white;
}
.tab:not(.active) {
	cursor: pointer;
}

.globalMap {
	display: none;
}

.map-table {
	font-family: 'Courier New', courier, monospace;
	margin: 1em auto 0;
	text-align: center;
	font-size: 20px;
}
.map-table td {
	position: relative;
	box-sizing: border-box;
	height: 35px;
	width: 35px;
	border: 1px solid transparent;
	
	cursor: pointer;
	-webkit-user-select: none;  
	-moz-user-select: none;    
	-ms-user-select: none;      
	user-select: none;
}
.map-table td .damageNumber {
	position: absolute;
	font-family: 'Simonetta', serif;
	font-size: 0.8em;
	top: -0.4em;
	right: -0.2em;
	color: red;
}

.map-table button {
	height: 30px;
	width: 30px;
	text-align: center;
}

.terrain {
	height: 100%;
	width: 100%;
}
.terrain.cave {	
	font-weight: bold;
}

.totals:after {
    content: " ";
    display: table;
}
.totals:after {
    clear: both;
}

.totals > div {
	box-sizing: border-box;
	float: right;
	width: 100%;
	margin-bottom: 0.25em;
	padding: 2px 0;
}
div.bar-container{
	width: 80%;
	padding: 2px 4px;
	margin: 0.25em 0;
}

.bar-container{
	position: relative;
	border: 1px solid black;
}
.bar {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0;
	z-index: -1;
}
.health-bar-container {
	border-color: #ffe4e4;
}
.health-bar {
	background-color: #ffe4e4;
}
.mana-bar-container {
	border-color: #eef;
}
.mana-bar {
	background-color: #eef;
}

.minions,
.inventory,
.magic {
	display: none;
	padding: 1em;
}

.inventory {
	margin: 0 auto;
}
.inventory-item {
	margin-bottom: 5px;
}
.inventory-item > td:first-of-type {
	padding-right: 4px;
	text-align: right;
}
.inventory-item > td:last-of-type {
	padding-left: 2px;
}

.minion-list {
	margin: 0 auto;
}
.minion-list td {
	padding: 0 0.25em;
}
.minion-number {
	text-align: right;
}
.minion-recruit button {
	width: 100%;
}

.ritual-list {
	margin: 0 auto;
}
.ritual {
	margin-bottom: 0.5em;
}

.status {
	font-style: italic;
}
.status[data-status="hungry"]{
	color: #f44;
}
.status[data-status="starving"]{
	color: #f44;
}

.log {
	margin-top: 1em;
}
.log .log-item:nth-child(1){
	opacity: 1;
	border-top: 1px solid #ccc;
	padding-top: 1em;
}
.log .log-item:nth-child(2){
	opacity: 0.9
}
.log .log-item:nth-child(3){
	opacity: 0.8
}
.log .log-item:nth-child(4){
	opacity: 0.7
}
.log .log-item:nth-child(5){
	opacity: 0.6
}
.log .log-item:nth-child(6){
	opacity: 0.5
}
.log .log-item:nth-child(7){
	opacity: 0.4
}
.log .log-item:nth-child(8){
	opacity: 0.3
}
.log .log-item:nth-child(9){
	opacity: 0.2
}
.log .log-item:nth-child(10){
	opacity: 0.1
}

.dead {
	margin: 0 auto;
	text-align: center;
}

@media (min-width: 768px){
	.main {
		order: 2;
		padding-top: 0.5em;
	}
	
	.version {
		float: left;
		padding-top: 0.5em;
	}
	.controls {
		padding-top: 0.5em;
		float: right;
	}
	.container {
		flex-direction: row;
	}
	.container > div {
		padding: 1em;
		width: 33.3%;
	}
	.container > div.main {
		padding-top: 1em;
		width: 66.6%;
	}
	.container > div.totals {
		padding-left: 1em;
	}
	
	.log.desktop {
		display: block;
	}
	.log.mobile {
		display: none;
	}
	
	.totals > div {
		padding: 0.25em;
	}
	.totals > div.container{
		width: 60%;
	}
}

.egg {
	width: 120px;
	height: 160px;
	margin: 20px auto 30px;

	-webkit-border-radius: 50%/60% 60% 40% 40%;
	-moz-border-radius: 50%/60% 60% 40% 40%;
	border-radius: 50%/60% 60% 40% 40%;
	
	box-shadow: 0px 0px 10px #ddd, 0px 0px 10px #ddd;
	
	line-height: 170px;
	text-align: center;
	user-select: none;
	box-sizing: border-box;
}
.egg:hover {
	box-shadow: 0px 0px 20px #ddd, 0px 0px 20px #ddd;
	cursor: pointer;
}
.egg:active {
	box-shadow: 0px 0px 20px #dbdbdb, 0px 0px 20px #aaa;
}