/* basic */
* {
	box-sizing: border-box;
	margin: 0;
}
body {
	background-color: whitesmoke;
}
h1 {
	margin: 0;
}
.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	position: relative;
	padding: 20px 0;
}

.grid {
	border: 2px solid;
}

.row {
	display: flex;
}

.box {
	width: 25px;
	height: 25px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: bolder;
}

/*  menu  */
.title {
	margin-bottom: 30px;
	font-size: 40px;
	text-align: center;
}
.title-dark {
	color: whitesmoke;
}
.filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 30px;

	margin-bottom: 30px;
}

/* select puzzle type */
.type-radios {
	display: flex;
	gap: 30px;
}
.type-radios input {
	display: none;
}

.type-radios label {
	font-size: 20px;
	padding: 7px;
	transition: all 150ms linear;
}

.type-radios label:hover {
	cursor: pointer;
	text-decoration: underline;
}

.disabled-radios label {
	color: #888;
}
.disabled-radios label:hover {
	cursor: not-allowed;
	text-decoration: underline;
}

.active-type {
	text-decoration: underline;
}
.disabled-radios .active-type:hover {
	color: #888;
	background-color: #000;
}

.label-dark {
	color: whitesmoke;
}

.label-dark:hover {
	text-decoration: underline;
}

/* select puzzle */

.select-wrapper {
	display: flex;
	gap: 20px;
}
.select {
	background-color: #000;
	color: #fff;
	border: none;
	padding: 10px 15px;
	font-size: 15px;
	min-width: 142px;
	cursor: pointer;
}
.select-dark {
	background-color: whitesmoke;
	color: #000;
}
.disabled-select-box {
	opacity: 0.7;
	cursor: not-allowed;
}

.start-btn {
	background: transparent;
	color: #000;
	border: 1px solid;
	padding: 7px 15px;
	font-size: 16px;
	transition: all 150ms linear;
}

.start-btn:hover {
	cursor: pointer;
	background-color: #000;
	border-color: #000;
	color: #fff;
	box-shadow: 0px 0px 4px #000;
}

.disabled-btn {
	opacity: 0.7;
}

.disabled-btn:hover {
	color: #000;
	background-color: #fff;
	box-shadow: none;
	cursor: not-allowed;
}

.start-btn_dark {
	background-color: whitesmoke;
	border-color: whitesmoke;
	color: #000;
}

.start-btn_dark:hover {
	background-color: #000;
	border-color: whitesmoke;
	color: whitesmoke;
}

/* change theme */

.theme {
	display: flex;
	background: #eee;
	gap: 10px;
}

.theme div {
	cursor: pointer;
	padding: 5px;
	transition: all 120ms linear;
}

.theme div:hover {
	transform: scale(1.2);
	background-color: #99999999;
}

.theme img {
	width: 30px;
	height: 30px;
}

.selected-theme {
	background-color: #99999999;
	transform: scale(1.2);
}

.main {
	width: 90%;
	max-width: 800px;
	margin: 0 auto;
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	align-content: center;
}

/* extra-functionalities */
.extra-functionalities {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex-wrap: wrap;
}

.extra-functionalities_dark {
	color: whitesmoke;
}

.timer {
	margin-bottom: 20px;
	font-size: 25px;
	font-weight: bolder;
}

.timer h2 {
	display: inline;
}

.timer-dark {
	color: whitesmoke;
}

.settings {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.settings div {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.settings button {
	border: 1px solid;
	background-color: transparent;
	color: #000;
	padding: 10px 20px;
	font-size: 16px;
	cursor: pointer;

	transition: all 150ms linear;
}

.settings button:hover {
	background-color: #000;
	color: #fff;
}

.settings .btn-dark {
	background-color: #000;
	color: whitesmoke;
}

.settings .btn-dark:hover {
	color: #000;
	background-color: whitesmoke;
	border-color: whitesmoke;
}

/* puzzle box */

.puzzle-box-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 15px;
}

.puzzle-box {
	display: none;
}

.display-puzzle {
	display: flex;
}

/* === first column === */
.first-col {
	display: inline-flex;
	flex-direction: column;
}

/* empty boxes */
.empty-boxes {
	border: 2px solid;
}

.empty-boxes_dark {
	border-color: whitesmoke;
}

/* left clues */
.left-clues {
	display: flex;
	flex-direction: column;
}

.left-clues .grid {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.left-clues .clue-box {
	border-bottom: 1px solid #000;
}

.left-clues_dark .clue-box,
.left-clues_dark .grid {
	border-color: whitesmoke;
	color: whitesmoke;
}

/* === second column === */

.second-col {
	display: inline-flex;
	flex-direction: column;
}
/* top clues */
.top-clues {
	display: flex;
}

.top-clues .clue-box {
	border-right: 1px solid #000;
}

.clue-box {
	cursor: pointer;
}

.disabled-clue-box {
	color: #807d7d99;
}

/* nonograms frame */
.frame-box {
	border: 1px solid goldenrod;
}

.frame-row {
	display: flex;
}

.selected-box {
	background-color: black;
}

.crossed-box {
	background-image: url('./xmark.svg');
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
}

.nonograms-frame_dark .grid {
	border-color: whitesmoke;
}

.nonograms-frame_dark .selected-box {
	background-color: whitesmoke;
}

.nonograms-frame_dark .crossed-box {
	background-color: whitesmoke;
}

/*  modal */

.modal-wrapper {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;

	display: none;
	align-items: center;
	justify-content: center;

	background-color: rgba(0, 0, 0, 0.4);
}

.open-modal {
	display: flex;
}

.modal {
	padding: 30px 40px;
	background-color: #eee;
}

.modal h1 {
	font-size: 30px;
	margin-bottom: 40px;
}

.modal-btn {
	padding: 10px 20px;
	border: none;
	font-size: 16px;
	cursor: pointer;
	background-color: #000;
	color: #fff;

	transition: all 150ms linear;
}

.modal-btn:hover {
	opacity: 0.8;
}

@media screen and (max-width: 822px) {
	.extra-functionalities {
		align-items: center;
		order: 1;
	}

	.settings div {
		flex-direction: row;
	}

	.settings button {
		min-width: 200px;
	}
}
