:root {
	--bodyBackgroundColor: #f5f5f5;
	--selectionColor: #dfdfdf;
	--aTagColor: #202020;
	--headerBackgroundColor: #ffffff;
	--headerBorderBackgroundColor: #dfdfdf;
	--mainNavigationUlBackgroundColor: #202020;
	--mainNavigationAColor: #dfdfdf;
	--mainNavigationAFocusColor: #606060;
	--buttonHoverBorder: #9f9f9f;
	--buttonHoverColor: #202020;
	--buttonHoverBackgroundColor: #dfdfdf;
	--buttonColor: #dfdfdf;
	--buttonBackgroundColor: #202020;
	--mainPageColor: #202020;
	--mainPageBackgroundColor: #f5f5f5;
	--mainHeadingBackgroundColor: #202020;
	--mainHeadingBorder: #606060;
	--mainHeadingColor: #dfdfdf;
	--mainContentBackgroundColor: #ffffff;
	--mainContentBorder: #dfdfdf;
	--mainContentLabelColor: #606060;
	--mainContentInputBoxShadow: #dfdfdf;
	--mainContentInputColor: #202020;
	--mainContentInputBackgroundColor: #ffffff;
	--mainContentInputFocusBoxShadow: #9f9f9f;
	--mainContentInputPlaceholderColor: #9f9f9f;
	--inputErrorBoxShadow: #a34848;
	--mainResultBackgroundColor: #202020;
	--mainResultBorder: #606060;
	--mainResultColor: #dfdfdf;
	--mainResultStyle: #9f9f9f;
	--mainResultSubmitButtonDisabledBackgroundColor: #f5f5f5;
	--mainResultSubmitButtonDisabledColor: #606060;
	--footerTextColor: #9f9f9f;

	--header-height: 82px;
	--navButtonSpacing: 42.35px;
}

[data-theme="dark"] {
	--bodyBackgroundColor: #0a0a0a;
	--selectionColor: #606060;
	--aTagColor: #dfdfdf;
	--headerBackgroundColor: #000000;
	--headerBorderBackgroundColor: #202020;
	--mainNavigationUlBackgroundColor: #202020;
	--mainNavigationAColor: #dfdfdf;
	--mainNavigationAFocusColor: #9f9f9f;
	--buttonHoverBorder: #606060;
	--buttonHoverColor: #dfdfdf;
	--buttonHoverBackgroundColor: #202020;
	--buttonColor: #202020;
	--buttonBackgroundColor: #dfdfdf;
	--mainPageColor: #dfdfdf;
	--mainPageBackgroundColor: #0a0a0a;
	--mainHeadingBackgroundColor: #dfdfdf;
	--mainHeadingBorder: #9f9f9f;
	--mainHeadingColor: #202020;
	--mainContentBackgroundColor: #000000;
	--mainContentBorder: #202020;
	--mainContentLabelColor: #9f9f9f;
	--mainContentInputBoxShadow: #202020;
	--mainContentInputColor: #f5f5f5;
	--mainContentInputBackgroundColor: #000000;
	--mainContentInputFocusBoxShadow: #606060;
	--mainContentInputPlaceholderColor: #606060;
	--inputErrorBoxShadow: #a34848;
	--mainResultBackgroundColor: #dfdfdf;
	--mainResultBorder: #9f9f9f;
	--mainResultColor: #202020;
	--mainResultStyle: #606060;
	--mainResultSubmitButtonDisabledBackgroundColor: #202020;
	--mainResultSubmitButtonDisabledColor: #9f9f9f;
	--footerTextColor: #606060;
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	font-family: "Poppins", sans-serif;
	font-style: normal;

	margin: 0;
	padding-top: var(--header-height);
	max-width: 100vw;
	overflow-x: hidden;

	background-color: var(--bodyBackgroundColor);
}

::selection {
	background: var(--selectionColor);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type="number"] {
	appearance: none;
	-moz-appearance: textfield;
	-webkit-appearance: none;
}

a {
	color: var(--aTagColor);
	text-decoration: none;
}

header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;

	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;

	padding-inline: clamp(1rem, -5.364rem + 16.97vw, 15rem);

	background-color: var(--headerBackgroundColor);
	border-bottom: 2px solid var(--headerBorderBackgroundColor);
}

#navbarLogo {
	display: flex;
	align-items: center;
	justify-content: center;

	margin-block: 25px;

	line-height: 0;
}

header a img {
	max-width: 3.25rem;
	transition: all 200ms;
}

#mainNavigation {
	display: flex;
	align-items: center;
	gap: 1rem;
}

#mainNavigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	list-style: none;

	margin: 0;
	padding: 0;

	transition: all 200ms;
}

#mainNavigation a {
	font-size: clamp(1.5rem, 1.367rem + 0.426vw, 1.75rem);
	transition: all 200ms;
}

#themeButton {
	width: var(--navButtonSpacing);

	margin: 0;
	padding: 0;

	background: none;
	border: none;
	cursor: pointer;
}

#themeButton img {
	height: 100%;
}

#menuButton {
	display: none;

	margin: 0;
	padding: 0;

	width: var(--navButtonSpacing);

	background: none;
	border: none;
	cursor: pointer;
}

@media (max-width: 415px) {
	#menuButton {
		display: flex;
		transition: all 200ms;
	}

	#menuButton img {
		height: 100%;
	}

	#mainNavigation ul {
		display: none;
	}

	#mainNavigation a {
		font-size: 2.5rem;
		color: var(--mainNavigationAColor);
	}

	#mainNavigation ul.open {
		display: flex;
		flex-direction: column;

		align-items: flex-start;
		justify-content: center;

		position: absolute;

		inset: var(--header-height) 0 0 0;
		height: calc(100vh - var(--header-height));

		padding-inline: 16px;
		gap: 3rem;

		background-color: var(--mainNavigationUlBackgroundColor);
		transition: all 200ms;
	}
}

@media (hover: hover) and (pointer: fine) {
	header a img:hover {
		opacity: 0.7;
	}

	#menuButton:hover {
		opacity: 0.7;
	}

	#mainNavigation a:hover,
	#mainNavigation a:focus {
		color: var(--mainNavigationAFocusColor);
		outline: none;
	}

	button:hover {
		cursor: pointer;
		border: 2px solid var(--buttonHoverBorder);
		color: var(--buttonHoverColor);
		background-color: var(--buttonHoverBackgroundColor);
	}
}

button {
	width: 80px;
	height: 25px;

	border: 2px solid transparent;
	border-radius: 8px;

	font-family: inherit;
	color: var(--buttonColor);
	background-color: var(--buttonBackgroundColor);

	transition: all 200ms;
	user-select: none;
}

#mainPage {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	min-height: calc(100vh - var(--header-height) - 25px);

	color: var(--mainPageColor);
	background-color: var(--mainPageBackgroundColor);
}

#mainHeading {
	width: min(90vw, 420px);

	padding: 1.25rem 2rem;

	background-color: var(--mainHeadingBackgroundColor);
	border: 1px solid var(--mainHeadingBorder);
	border-radius: 8px;

	color: var(--mainHeadingColor);
	text-align: center;
	line-height: 1.5;
	word-break: break-word;
	overflow-wrap: break-word;
	cursor: default;
}

#mainHeading span {
	font-size: 1.25rem;
	font-weight: bold;
}

#mainContent {
	display: flex;
	flex-direction: column;

	width: min(90vw, 420px);

	padding: 2rem;
	margin-bottom: 0;
	box-sizing: border-box;

	background-color: var(--mainContentBackgroundColor);
	border: 1px solid var(--mainContentBorder);
	border-radius: 8px;

	transition: all 200ms;
}

.fieldGroup {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

#mainContent label {
	font-size: 0.95rem;
	font-weight: 500;

	color: var(--mainContentLabelColor);
}

#mainContent input,
#mainContent textarea {
	width: 100%;

	padding: 0.65rem 0.85rem;
	box-sizing: border-box;

	border: none;
	border-radius: 8px;
	box-shadow: inset 0 0 0 1px var(--mainContentInputBoxShadow);

	font-family: inherit;
	font-size: 1rem;

	color: var(--mainContentInputColor);
	background-color: var(--mainContentInputBackgroundColor);

	transition: all 200ms;
}

#mainContent input:focus,
#mainContent textarea:focus {
	box-shadow: inset 0 0 0 2px var(--mainContentInputFocusBoxShadow);
	outline: none;
}

#mainContent input::placeholder,
#mainContent textarea::placeholder {
	color: var(--mainContentInputPlaceholderColor);
}

#mainContent textarea {
	min-height: 150px;
	resize: vertical;
	transition: resize 0ms;
}

#submitButton {
	width: 100%;
	height: auto;

	margin-top: 0.5rem;
	padding: 0.6rem 1rem;

	font-size: 0.95rem;
	border-radius: 8px;
}

#submitButton:disabled {
	background-color: var(--mainResultSubmitButtonDisabledBackgroundColor);
	color: var(--mainResultSubmitButtonDisabledColor);
	border: 0;
	cursor: not-allowed;
}

#mainResult {
	width: min(90vw, 420px);
	padding: 1.25rem 2rem;

	background-color: var(--mainResultBackgroundColor);
	border: 1px solid var(--mainResultBorder);
	border-radius: 8px;
	box-shadow: none;

	font-size: 0.95rem;
	color: var(--mainResultColor);
	text-align: center;
	line-height: 1.5;
	word-break: break-word;
	overflow-wrap: break-word;
	display: none;
}

#mainResult.show {
	display: block;
}

.input-error {
	box-shadow: inset 0 0 0 2px var(--inputErrorBoxShadow) !important;
}

footer {
	text-align: center;
	color: var(--footerTextColor);
	cursor: default;
}
