/* Generic styles */
*,
*::before,
*::after {
	box-sizing: border-box;
	font-family: "Libre Franklin", sans-serif;
}

body {
	margin: 0;
	background-color: #333;
	color: white;
}

a {
	color: #bdd8ff;
}

a:hover {
	color: #77b0ff;
}

/* Custom buttons */
button.btn,
input.btn {
	font-size: 18px;
	padding: 10px 20px;
	background-color: #555;
	color: white;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
}

button.btn:hover,
input.btn:hover {
	background-color: #444;
	cursor: pointer;
}

button.btn-primary,
input.btn-primary {
	background-color: #3388ffc9;
}

button.btn-primary:hover,
input.btn-primary:hover {
	background-color: #3388ff6b;
}

button.btn-danger,
input.btn-danger {
	background-color: #b62121db;
}

button.btn-danger:hover,
input.btn-danger:hover {
	background-color: #861818db;
}

button.btn-success,
input.btn-success {
	background-color: #009700db;
}

button.btn-success:hover,
input.btn-success:hover {
	background-color: #005a00db;
}

/* Custom radio button */
input[type="radio"] {
	position: absolute;
	height: 0;
	width: 0;
}

input[type="radio"]:checked + label span {
	background-color: #3388ff6b;
}

input[type="radio"]:checked + label span::before {
	box-shadow: inset 0 0 0 0.4375em #3388ff;
}

input[type="radio"] + label {
	display: flex;
	cursor: pointer;
	margin-bottom: 0.375em;
}

input[type="radio"] + label span {
	display: flex;
	align-items: center;
	padding: 0.375em 0.75em 0.375em 0.375em;
	border-radius: 99em;
	transition: 0.25s ease;
}

input[type="radio"] + label span:hover {
	background-color: #3388ff6b;
}

input[type="radio"] + label span::before {
	display: flex;
	flex-shrink: 0;
	content: "";
	background-color: #fff;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	margin-right: 0.375em;
	transition: 0.25s ease;
	box-shadow: inset 0 0 0 0.125em #3388ff;
}

/* Main info box */
.box {
	position: absolute;
	top: 20px;
	left: 20px;
	padding: 10px 20px;
	background-color: #333;
	border-radius: 10px;
	box-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
}

.box p {
	margin: 0;
	font-size: 18px;
	line-height: 1.5;
}

#score {
	font-weight: bold;
	color: white;
}

#country-name {
	color: white;
	font-size: 30px;
}

/* Map */
#map {
	height: 100%;
	width: 100%;
	position: absolute;
	z-index: 0;
}

.leaflet-container {
	background-color: #222;
}

.leaflet-touch .leaflet-bar {
	border: 0;
}

.leaflet-control-zoom a {
	background-color: #333;
	color: white;
}

.leaflet-control-zoom a:hover {
	background-color: #3388ff;
	color: white;
}

/* Dialog boxes */
.dialog {
	position: absolute;
	top: 20px;
	left: 50%;
	padding: 20px;
	max-width: 700px;
	background-color: #333;
	color: white;
	z-index: 1;
	visibility: hidden;
	padding: 10px 20px;
	text-align: center;
	border-radius: 10px;
	box-shadow: 0 2px 4px rgb(255 255 255 / 20%);
	/* hide the dialog offscreen */
	transform: translate(-50%, -10%) scale(0.8);
}

.dialog,
.dialog-background {
	opacity: 0;
	transition: all 0.25s ease-in-out;
	overflow: auto;
}

.dialog-background.show {
	visibility: visible;
	opacity: 1;
}

.dialog.show,
.dialog-background.show .dialog {
	/* hide the dialog offscreen */
	visibility: initial;
	transform: translate(-50%, 0%);
	opacity: 1;
}

.dialog h2 {
	margin: 0;
	font-size: 36px;
	color: white;
}

.dialog p,
.dialog ul,
.dialog ol,
.dialog h4 {
	text-align: left;
}

.dialog fieldset {
	text-align: left;
}

/* Game over dialog box */
#game-over {
	background-color: #a91e1edb;
	border: 4px solid red;
}

#incorrect-country,
#correct-country {
	font-weight: bold;
}

/* You win dialog box */
#you-win {
	background-color: #008000db;
	border: 4px solid #005a00;
}

#game-over,
#you-win {
	font-size: 20px;
}

/* Header-area button bar */
.header-btn-container {
	position: absolute;
	top: 20px;
	right: 20px;
}

.header-btn {
	padding: 10px;
	background-color: #333;
	border-radius: 10px;
	box-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
	border: 0;
	margin-left: 12px;
}

.header-btn:hover {
	background-color: #3388ff;
	cursor: pointer;
}

.header-btn img {
	width: 25px;
	height: 25px;
}

/* Settings dialog */
#settings .dialog {
	width: 500px;
	max-width: 100%;
}

#settings fieldset {
	margin-top: 10px;
}

fieldset {
	padding: 15px;
}

.settings-item {
	margin-bottom: 10px;
}

.settings-item:last-of-type {
	margin-bottom: 0;
}

/* Tooltips */
[data-tooltip]:before {
	/* needed - do not touch */
	content: attr(data-tooltip);
	position: absolute;
	opacity: 0;

	/* customizable */
	transition: all 0.2s ease;
	padding: 10px;
	color: white;
	border-radius: 10px;
	box-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
	margin-top: 50px;
	right: 0;
}

[data-tooltip]:hover:before {
	/* needed - do not touch */
	opacity: 1;

	/* customizable */
	background-color: #333;
}

[data-tooltip]:not([data-tooltip-persistent]):before {
	pointer-events: none;
}

div.center {
	margin-left: auto;
	margin-right: auto;
}

p.center {
	text-align: center;
}

.warning-text {
	color: #e94343;
}

.dialog-background {
	background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
	left: 0;
	top: 0;
	width: 100%; /* Full width */
	height: 100%; /* Full height */
	visibility: hidden;
	position: fixed; /* Stay in place */
	z-index: 1; /* Sit on top */
	padding-top: 100px; /* Location of the box */
}

#score-box {
	transition: opacity 0.2s ease;
}
