/* Color palettes and custom properties */
/* https://coolors.co/ff892c-ea5e00-fe9a0b-f8dc65-73a700-435804-466900-9ab619 */

:root {
	--princeton-orange: hsla(26, 100%, 59%, 1);
	--spanish-orange: hsla(24, 100%, 46%, 1);
	--yellow-orange-color-wheel: hsla(35, 99%, 52%, 1);
	--naples-yellow: hsla(49, 91%, 68%, 1);
	--green-ryb: hsla(79, 100%, 33%, 1);
	--dark-moss-green: hsla(75, 91%, 18%, 1);
	--dark-olive-green: hsla(80, 100%, 21%, 1);
	--apple-green: hsla(71, 76%, 41%, 1);

	--correct: hsla(80, 94%, 25%, 1);
	--wrong: hsla(0, 85%, 32%, 1);
}

/* General layout */

* {
	box-sizing: border-box;
	margin: 0;
	font-family: 'PT Sans', sans-serif;
}

#page-content {
	width: 80%;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	height: 100vh;
}

#title-image a {
	display: block;
	background-image: url('../img/title_image.jpg');
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	aspect-ratio: 5 / 1;
}

#navigation ul {
	display: flex;
	justify-content: center;
	list-style-type: none;
	background-color: var(--dark-olive-green);
	margin-bottom: 2rem;
	padding-inline-start: 0;
	border-top: 1px solid white;
}

#navigation li a {
	display: block;
	color: white;
	padding: 1rem 3rem;
	font-size: max(1.1rem, 1.2vw);
}

#navigation li:not(:first-child)::before {
	content: '';
	height: 50%;
	width: 0.1rem;
	float: left;
	background-color: white;
	transform: translateY(50%);
}

#navigation li:hover,
#navigation li:active {
	background-color: hsla(80, 70%, 21%, 1);
}

footer {
	display: flex;
	justify-content: space-between;
	color: white;
	background-color: var(--dark-olive-green);
	margin-top: 2rem;
	font-size: 0.8rem;
	flex-shrink: 0;
}

footer section {
	margin: 1rem 2rem;
	flex-basis: 30%;
	white-space: nowrap;
}

footer section#contact {
	display: flex;
	align-items: center;
}

footer section#licence {
	text-align: right;
}

footer span {
	display: block;
}

footer a {
	text-decoration: underline;
}

address {
	font-style: normal;
}

#icon {
	margin-right: 0.8rem;
}

#github-icon {
	transition: 0.3s;
}

#github-icon:hover {
	fill: white;
}

/* Preview boxes on index.html*/

.container {
	display: flex;
	justify-content: center;
	align-items: center;
	flex: 1 0 auto;
	flex-wrap: wrap;
	gap: 4rem;
}

.preview-container {
	display: inline-block;
	position: relative;
	overflow: hidden;
	width: max(40%, 15rem);
	aspect-ratio: 1 / 1;
	border: 2px solid black;
	cursor: pointer;
}

.preview {
	height: 100%;
	width: 100%;
	background-size: cover;
	background-repeat: no-repeat;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
	-o-transition: all 0.5s;
	transition: all 0.5s;
}

#preview-countries {
	background-image: url('../img/europe.jpg');
}

#preview-islands {
	background-image: url('../img/island.jpg');
}

.preview-container a {
	display: block;
	position: absolute;
	height: 100%;
	width: 100%;
	z-index: 9;
}

h3 {
	display: block;
	position: relative;
	top: 50%;
	transform: translateY(-50%);
	background-color: hsla(0, 0%, 96%, 0.7);
	color: black;
	padding: 0.8rem;
	text-align: center;
	z-index: 9;
}

.preview-container:hover .preview {
	-ms-transform: scale(1.2);
	-moz-transform: scale(1.2);
	-webkit-transform: scale(1.2);
	-o-transform: scale(1.2);
	transform: scale(1.2);
}

.preview-container:active {
	opacity: 0.8;
}

/* Basic formatting */

a {
	text-decoration: none;
	color: white;
}

/* Quiz pages */

.section-selection {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.quiz-params {
	flex: 0 1 45%;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	position: relative;
}

.quiz-params label {
	flex: 1 1 100%;
	text-align: center;
	margin-bottom: 0.2rem;
}

.quiz-params select {
	flex: 0 1 80%;
	margin-bottom: 2rem;
}

.tooltip {
	position: absolute;
	display: block;
	padding: 0.5rem;
	border: 1px solid var(--dark-olive-green);
	text-align: center;
	width: 7rem;
	background-color: white;
	color: var(--dark-olive-green);
	left: 50%;
	transform: translateX(-50%);
	top: -100%;
	border-radius: 0.5rem;
}

.btn-start,
.btn-next,
.btn-continue {
	padding: 0.5rem 1rem;
	background-color: var(--naples-yellow);
	border: 1px solid hsla(49, 91%, 50%, 1);
}

.btn-start:hover,
.btn-next:hover:enabled,
.btn-continue:hover {
	background-color: hsla(49, 91%, 48%, 1);
}

.section-quiz {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#quiz-content {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	width: 80%;
	padding: 1rem 1rem;
	box-shadow: inset 0 0 1rem var(--dark-olive-green);
}

#quiz-content > * {
	margin: 1rem 0;
}

#image-container {
	width: max(50%, 20rem);
}

#svg {
	width: 100%;
}

#answer-button-container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: max(0.5rem, 1vw);
	width: max(50%, 20rem);
}

.btn-answer {
	width: 80%;
	min-height: max(2.5rem, 3vw);
	font-size: max(1.2rem, 1.5vw);
	border: 2px solid var(--green-ryb);
	border-radius: 1rem;
}

.btn-answer:hover:enabled {
	background-color: hsla(79, 100%, 33%, 0.4);
	transition: 0.3s background-color;
}

.btn-answer:disabled {
	color: black;
}

#display-progress {
	margin-top: 0.5rem;
}

progress {
	margin-bottom: 0.5rem;
}

.btn {
	cursor: pointer;
}

.btn:disabled {
	cursor: auto;
}

.hidden {
	display: none;
}

.correct-answer {
	background-color: var(--correct);
	border: var(--correct);
}

.wrong-answer {
	background-color: var(--wrong);
	border: var(--wrong);
}

/* Result display */

#result-area {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: max(40%, 18rem);
	height: 15rem;
	box-shadow: inset 0 0 0.5rem var(--dark-olive-green);
}

#result-area p {
	display: block;
	padding: 1rem;
	color: var(--dark-olive-green);
	font-weight: bold;
}

#continue-button-container {
	display: flex;
	justify-content: center;
}

#continue-button-container button {
	margin: 1rem;
}

.disabled {
	color: rgb(170, 170, 170);
	opacity: 0.7;
}

@media (max-width: 800px) and (min-width: 600px) {
	#page-content {
		width: 100%;
		overflow-x: hidden;
	}

	#navigation li a {
		padding: 1rem 4rem;
	}

	footer {
		font-size: 0.7rem;
	}
}

@media (max-width: 600px) {
	#page-content {
		width: 100%;
		overflow-x: hidden;
	}

	#navigation ul {
		justify-content: space-evenly;
	}

	#navigation li {
		width: 100%;
		text-align: center;
	}

	#navigation li a {
		padding: 1rem;
	}

	footer {
		font-size: 0.5rem;
	}

	footer section {
		margin: 0.5rem 1rem;
	}

	footer section#licence {
		position: relative;
	}

	footer section#license p {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
	}

	.tooltip {
		top: -150%;
	}
}
