:root {
    --switch-width: 5rem;
    --switch-height: 2.4rem;
    --knob-padding: 0.2rem;
	--knob-height: 2rem; /*(switch-height - 2*knob-padding)*/
	--knob-dist: 2.8rem; /*(switch-width - knob-height - 2*knob-padding)*/

	--panel-width: 25rem;
	--button-panel-width: 3rem;
}

body {
	display: flex;
	flex-direction: row;
    margin: 0;
	text-wrap: nowrap;
}

main {
	position: absolute;
	left: var(--panel-width);
    display: flex;
    flex-direction: column;
	max-width: calc(100vw - 2*var(--button-panel-width));
    text-align: center;
	transition: 0.5s;
}

aside {
    display: flex;
    flex-direction: column;
	height: 100vh;
	min-width: var(--button-panel-width);
}

h2 {
	margin: auto var(--button-panel-width);
}

.hidden {
	display: none;
}

.panel_title_row {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	height: var(--button-panel-width);
}

.button_filter_panel {
	width: var(--button-panel-width);
	height: var(--button-panel-width);
}

.filter_panel {
	position: absolute;
	direction: rtl;
	width: var(--panel-width);
	height: 100vh;
	overflow-x: hidden;
	overflow-y: scroll;
	background-color: #fff;
	outline: 1px solid;
	z-index: 1;
	transition: 0.5s;
}

.ltr_container {
	direction: ltr;
	width: var(--panel-width);
}

.external_container {
	position: absolute;
	right: 0;
}

.button_external_panel {
	width: var(--button-panel-width);
	height: var(--button-panel-width);
}

.external_panel {
	position: absolute;
	right: 0;
	width: var(--panel-width);
	height: 100vh;
	overflow-x: hidden;
	overflow-y: scroll;
	background-color: #fff;
	outline: 1px solid;
	z-index: 1;
	transition: 0.5s;
}

.collapsed {
	width: 0;
}

ul {
	list-style-type: none;
}

.clearable_input {
	border: 1px solid gray;
}

input[type="text"] {
	border: 0;
	outline: 0;
}

input[type="reset"] {
	border: 0;
	background: none;
	cursor: pointer;
}

.grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.type_checkbox {
	height: fit-content;
	width: fit-content;
	padding: 0;

	>label {
		cursor: pointer;
	}
}

.type_img {
	height: 2rem;
}

.hidden_checkbox {
	visibility: hidden;
	max-width: 0;
	max-height: 0;

	+ label img {
		opacity: 30%;
	}

	&:checked + label img {
		opacity: 100%;
	}
}

.img_and_button_container {
	display: flex;
	flex-direction: row;
}

.pokemon_img_container {
	display: grid;
	align-items: center;
	justify-items: center;
	height: 512px;
	width: 512px;
	resize: both;
	overflow: hidden;
	border: 1px solid gray;
}

.pokemon_img {
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	
	&.fill_view {
		height: 100%;
		width: 100%;
	}

	&.pixelated {
		image-rendering: pixelated;
	}
}

.pokemon_img_button_container {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.img_button {
	padding: 0;
	height: 2rem;
	width: 2rem;
	display: grid;
	align-items: center;
	justify-items: center;
}

.clickable:hover {
    cursor: pointer;
}

.types_container {
    display: flex;
    flex-direction: row;
    align-self: center;
    height: 2rem;
}

.logo {
	width: 32px;
	height: 32px;
}

.gender_shiny_container {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.button_gender {
	width: 2.5rem;
	height: 2.5rem;
	padding-bottom: 0.3rem;
	color: black;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 2.3rem;
	font-weight: bold;
	line-height: 0.1;
	border: 2px solid;
	border-radius: 4px;

	&::before {
		content: "○";
	}

	&.female::before {
		content: "♀";
	}

	&.male::before {
		content: "♂";
	}

	&:disabled {
		background-color: lightgray;
	}

	&:enabled {
		cursor: pointer;

		&.female {
			background-color: #ff8888;
			border-color: #f44336;

			&:hover {
				background-color: #e97a7a;
			}

			&:active {
				font-size: 2rem;
				background-color: #c76767;
			}
		}

		&.male {
			background-color: #00ffff;
			border-color: #03a9f4;

			&:hover {
				background-color: #00e7e7;
			}

			&:active {
				font-size: 2rem;
				background-color: #00cfcf;
			}
		}
	}
}

.switch {
	position: relative;
	width: var(--switch-width);
	height: var(--switch-height);
	border-radius: calc(var(--switch-height) / 2);
	margin: auto;
	overflow: hidden;
}

.switch_checkbox {
	position: relative;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 3;
}

.switch_knob {
	font-family: Arial, Helvetica, sans-serif;
	position: absolute;
	z-index: 2;
	top: var(--knob-padding);
	left: var(--knob-padding);
	width: var(--knob-height);
	height: var(--knob-height);
	color: #fff;
	font-size: 35px;
	font-weight: bold;
	text-align: center;
	line-height: 0.82;
	background-color: #f44336;
	border-radius: 50%;
	transition: 0.3s;

	&.gender {
		background-color: #f44336;
		
		&::before {
			content: "♀";
		}
	}

	&.shiny {
		background-color: #a5a5a5;
		
		&::before {
			content: "○";
		}
	}
}

.switch_bg {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	width: 100%;
	transition: 0.3s;
	z-index: 1;

	&.gender {
		background-color: #ff8888;
	}

	&.shiny {
		background-color: #cccccc;
	}
}

.switch_checkbox:checked {

	+ .switch_knob {
		left: calc(var(--switch-width) - var(--knob-height) - var(--knob-padding));

		&.gender {
			background-color: #03a9f4;

			&::before {
				content: "♂";
			}
		}

		&.shiny {
			background-color: #d0d000;

			&::before {
				content: "⋆";
			}
		}
	}

	~ .switch_bg {

		&.gender {
			background-color: #00ffff;
		}

		&.shiny {
			background-color: #ffff00;
		}
  }
}


.form_img {
    max-width: auto;
    height: auto;
}

.current_form {
    border: solid cyan;
    border-radius: 10px;
}

.forms_container {
    display: flex;
    flex-direction: row;
    height:6rem;
    overflow: scroll;
}