:root
{
	--size: 350px;
	--label-color: #0268ff; /* any *//* light theme */
	--label-color-dark: #67a4ff; /* any *//* dark theme */
	--arrow-head-size: 8; /* number */
	--arrow-head-width: ; /* number */
	--arrow-head-closed: false; /* true/false */
	--arrow-line-width: ; /* number */
	--arrow-fill: true; /* true/false */
	--arrow-color: ; /* any */
	--arrow-color-error: ; /* any */
	--text-color: CanvasText;
	--background-color: Canvas;
	--input-font-size: 1.5em;
	--item-selected: #efefef;
	--menu-item-background-color-dark: #1f1f1f;

	color-scheme: light dark;
	/* background-color: green; */
	font-family: "Segoe UI", Arial, Tahoma, Geneva, Verdana, sans-serif;
}

@media (prefers-color-scheme: dark)
{
	:root:not([theme="light"])
	{
		--label-color: var(--label-color-dark);
		--item-selected: var(--menu-item-background-color-dark);
	}
}

:root[theme="dark"]
{
	color-scheme: dark;

	--label-color: var(--label-color-dark);
	--item-selected: var(--menu-item-background-color-dark);
}

:root[theme="light"]
{
	color-scheme: light;
}

@media (prefers-color-scheme: dark)
{
	fieldset
	{
		background-color: darkslategray;
	}
}

*
{
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.download > *
{
	text-decoration: none;
	vertical-align: bottom;
	margin-left: 0.2em;
}

.menu > *
{
	padding: 0.5em 1.5em;
	display: block;
}

.container > *:not(canvas)
{
	position: absolute;
	vertical-align: middle;
	text-align: center;
	/* width: 100%; */
	box-sizing: border-box;
}

body[data-popup] > *:not(header)
{
	filter: blur(2px);
	/* border: 0; */
}


.result label > span
{
	float: left;
	margin-right: 0.5em;
}

.download > *:not([href],.loading,.error)
{
	display: none;
}

/* .loading
{
	perspective: 1em;
} */

.loading::after
{
	/* perspective: 1em; */
	animation: rotate-animation 1s linear infinite;
}

@keyframes rotate-animation
{
	to
	{
		transform: rotateY(360deg);
	}
}

.download > *:not([href]),
.result > .table span.na
{
	opacity: 0.2;
	cursor: default;
	/* display: none; */
}

.result > .table span.na
{
	font-weight: normal;
	font-style: italic;
	font-size: 0.8em;
}

label.toggle > .options > *
{
	font-weight: bold;
	text-transform: uppercase;
	margin-left: 0.3em;
}

label.toggle .options > *
{
	display: none;
}

#result,
#result *
{
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
	line-height: 1.3em;
	white-space: pre;
}

body
{
	opacity: 1;
	transition: opacity 0.1s;
}

:root[notInited] > body
{
	opacity: 0;
}

.content
{
	display: flex;
	flex-wrap: wrap;
}

.container
{
	min-width: var(--size);
	height: var(--size);
	display: inline-block;
}

.input > .container
{
	margin-top: calc(var(--input-font-size) + 1em);
	margin-bottom: calc(var(--input-font-size) + 1.5em);
	position: relative;
}

input
{
	font-size: var(--input-font-size);
	width: 2em;
}

nav > input
{
	display: none;
}

input:not([style]) /* prevent flickering on refresh */
{
	top: -99999vh;
}

input:focus
{
	background-color: #1e5a1e;
	color: white;
}

.dropdown input
{
	display: none;
}

body:not([data-popup]) input
{
	z-index: 1;
	/* border: 0; */
}

.table
{
	display: table;
}

.result .table > div
{
	display: table-row;
}

.result .table > div > span
{
	display: table-cell;
	padding-left: 0.5em;
	font-weight: bold;
	text-align: start;
}

canvas
{
	width: var(--size);
	height: var(--size);
}

:not(.download) > .error
{
	color: red;
	border-color: red;
	outline-color: red;
	border-style: solid;
}

.result div[id]
{
	padding-left: 0.5em;
}

/* .result .table > div > span:first-of-type > span:first-of-type::after
 {
	content: "";
	display: inline-block;
	width: 0.8em;
	margin-left: -0.3em;
}

.result .table > div[data-up] > span:first-of-type > span:first-of-type::after
{
	content: "▿";
}

.result .table > div[data-up="true"] > span:first-of-type > span:first-of-type::after
{
	content: "▵";
} */
.result .table > div > span:last-child
{
	font-weight: normal;
	/* text-align: end; */
}

/* .result > div > span:first-child
{
	text-align: end;
} */
.result sup,
.result sub
{
	font-size: 0.6em;
}

.hidden,
#hidden
{
	width: min-content !important;
	box-sizing: border-box !important;
	display: inline-block !important;
	position: absolute !important;
	white-space: pre !important;
	top: -999999vh !important;
}

nav
{
	z-index: 2;
}

/* a:link
{
	text-decoration: none;
} */
.result .table
{
	text-align: end;
}

.result label > label
{
	color: var(--label-color);
}

.right
{
	float: right;
}

.dropdown-box
{
	/* position: absolute; */
	/* z-index: 1; */
	/* left: 0; */
	/* display: inline; */
	margin-left: 0.2em;
}

.dropdown-list .option
{
	padding: 0.3em;
	display: flex;
	white-space: nowrap;
	border: 1px solid transparent;
	min-width: 4.5em;
}

[data-setting="p"] .option:not(:first-child)
{
	font-size: 1.1em;
}

.dropdown
{
	/* position: relative; */
	/* top: 0.2em; */
	/* width: 100%; */
	display: inline-grid;
	background-color: Menu;
	color: MenuText;
}

.dropdown-list
{
	position: relative;
	border: 1px solid #7f7f7f7f;
	margin: 0;
	padding: 0;
	display: block;
	line-height: 1.4em;
	cursor: pointer;
	color: MenuText;
	background-color: Menu;
	width: 100%;
	font-family: inherit;
	/* z-index: 1; */
	overflow: inherit;
	white-space: inherit;
	height: unset;
}

/* .dropdown-list {
	padding: 0 0.3em;
} */
/* .dropdown input[type="checkbox"]:checked ~ label
{
	z-index: 3;
	background-color: red;
} */

.close-overlay
{
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	position: fixed;
	display: none;
	/* z-index: 2; */
	/* background-color: transparent; */
	/* background-color: blue; */
}

nav > .close-overlay
{
	background-color: #0000007f;
}

/* nav > .close-overlay {
	backdrop-filter: brightness(0.5);
} */
.close-overlay ~ * .close-overlay
{
	z-index: 1;
}

.dropdown-list::after
{
	content: "";
	position: absolute;
	right: 0.2em;
	top: 0.6em;
	border: 0.3em solid;
	border-right-color: transparent;
	border-bottom-color: transparent;
	border-left-color: transparent;
	/* display: inline-block; */
	/* height: 100%; */
	/* vertical-align: bottom; */
}

.dropdown-list > ul
{
	height: 0;
	display: block;
	line-height: 1.4em;
	list-style-type: none;
	padding: 0;
	margin: 0;
	position: absolute;
	background-color: inherit;
	color: inherit;
	/* background-color: Menu;
	color: MenuText; */
	min-width: 100%;
	text-indent: 0.4em;
	white-space: nowrap;
	/* top: 1.4em; */
	/* transition: height 1s; */
	right: -1px;
}

.dropdown input[type="checkbox"]:checked ~ .dropdown-list > ul
{
	border: 1px solid #7f7f7f7f;
	height: max-content;
	z-index: 2;
}

.dropdown input[type="checkbox"]:checked ~ .dropdown-list
{
	z-index: 2;
}

.dropdown input[type="checkbox"]:checked ~ .dropdown-list::after
{
	transform: rotate(-180deg);
	top: 0.2em;
}

.dropdown[data-placeholder]::before,
.dropdown-list::before
{
	content: attr(data-value);
	display: block;
	padding: 0 1.5em 0 0.5em;
	text-align: center;
	min-width: 2.5em;
}

.dropdown[data-placeholder]::before
{
	content: attr(data-placeholder);
	height: 0;
	padding: 0 1.5em;
	/* float: left; */
	/* visibility: hidden; */
	/* display: none; */
}

.dropdown-list .option.selected
{
	font-weight: bold;
	text-shadow: 0 0 2px #7f7f7f7f;
	border: 0.5px dotted #7f7f7f5f;
	background-color: var(--item-selected);
}

.dropdown-list .option.default::after
{
	content: "(Default)";
	font-style: italic;
	font-size: 0.5em;
	color: GrayText;
	/* float: right; */
	/* margin-left: 1em; */
	/* opacity: 0.5; */
	font-weight: normal;
	/* display: inline-block; */
	position: absolute;
	right: 0.5em;
}

.dropdown input[type="checkbox"]:not(:checked) ~ .dropdown-list .option
{
	display: none;
}

.dropdown input[type="checkbox"]:checked ~ .dropdown-list .option:hover
{
	background-color: #7f7f7f80;
	/* color: black; */
}

nav > input:checked ~ .close-overlay
{
	display: block;
}

.dropdown input[type="checkbox"]:checked ~ .close-overlay
{
	display: block;
}

#coneTemplateInfo
{
	--width: 340px;
	--height: 390px;

	font-size: 1em;
	/* font-weight: bold; */
}

.download
{
	margin: 0.5em 0;
}

.download > *::after
{
	/* height: 2em; */
	width: 1.5em;
	display: inline-block;
	/* margin: 0; */
	/* padding: 0; */
	/* vertical-align: bottom; */
}

.download > *:not(.loading)::after
{
	animation: rotate-animation 0.4s linear;
}

.download > *[href]
{
	opacity: 0.8;
}

.download > *[href]:hover
{
	opacity: 1;
}

.download > #dxf::after
{
	content: url("images/dxf_white_505050_007F00_black.svg");
}

.download > #pdf::after
{
	content: url("images/pdf_white_505050_ff0000_black.svg");
}

.download > #png::after
{
	content: url("images/png_white_505050_007fff_black.svg");
}

.download > #png.error::after
{
	content: url("images/png_pink_505050_007fff_black.svg");
}

.menu
{
	box-shadow: 0 0 8px 0 #7f7f7f7f;
	padding: 0;
	margin: 0;
	min-width: 8em;
	background-color: Menu;
	color: MenuText;
	/* z-index: 2; */
	position: absolute;
	top: 10px;
	right: 10px;
	transition: top 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	display: table;
	border-radius: 5px;
}

/* :root[theme="dark"] .menu
{
	box-shadow: none;
} */

/* @media (prefers-color-scheme: dark)
{
	:root:not([theme]) .menu
	{
		box-shadow: none;
	}
} */

.menu > [data-type]:not([data-type="dropdown"])
{
	cursor: pointer;
}

/* .close-overlay
{
	background-color: blue;;
}
.close-overlay ~ * .close-overlay
{
	background-color: red;
} */
.menu > label .options
{
	pointer-events: none;
}

.menu > .value:hover
{
	background-color: #7f7f7f80;
}

nav > input:not(:checked) ~ div.menu
{
	/* display: none; */
	top: -100%;
	transition: top 0.3s cubic-bezier(0.6, -0.28, 0.74, 0.05);
}

.menu-icon
{
	position: absolute;
	top: 0;
	right: 0;
	width: 1.5em;
	height: 1.5em;
	cursor: pointer;
	display: flex;
	padding: 0.5em;
	transition: top 0.1s ease, right 0.1s ease;
	opacity: 0.5;
}

.menu-icon:hover
{
	opacity: 1;
}

.nav-icon
{
	background-color: var(--text-color);
	display: block;
	height: 0.1em;
	width: 100%;
	position: relative;
	margin: auto;
	top: 0;
	right: 0;
	transition: background-color 0.3s;
}

.nav-icon::before
{
	top: 0.5em;
}

.nav-icon::after
{
	top: -0.5em;
}

#mainMenu:checked ~ .menu-icon
{
	top: 0.4em;
	right: 0.4em;
}

#mainMenu:checked ~ * .nav-icon
{
	background-color: transparent;
	width: 70%;
	transition: top 0.1s ease, right 0.1s ease;
}

.nav-icon::before,
.nav-icon::after
{
	background-color: var(--text-color);
	display: block;
	width: 100%;
	height: 100%;
	content: '';
	position: absolute;
	transition: top .1s ease, right .1s ease, transform .3s ease;
}

#mainMenu:checked ~ * .nav-icon::before
{
	background-color: MenuText;
	transform: rotate(-135deg);
	top: 0;
	right: 0;
}

#mainMenu:checked ~ * .nav-icon::after
{
	background-color: MenuText;
	transform: rotate(135deg);
	top: 0;
	right: 0;
}

#mainMenu:checked ~ * .nav-icon::before,
#mainMenu:checked ~ * .nav-icon::after
{
	transition: top .1s ease-out, right .1s ease, transform .3s ease-out;
}

label.toggle[value="0"] .options > :nth-child(1),
label.toggle[value="1"] .options > :nth-child(2),
label.toggle[value="2"] .options > :nth-child(3),
label.toggle[value="3"] .options > :nth-child(4),
label.toggle[value="4"] .options > :nth-child(5),
label.toggle[value="5"] .options > :nth-child(6)
{
	display: inline;
}

.menu > header
{
	min-height: 2em;
	border-bottom: 1px solid #7f7f7f7f;
	text-align: center;
	/* margin-right: 1em; */
	line-height: 2em;
	color: greytext;
}

.font08
{
	font-size: 0.8em;
}

:root:not(.has-dark) [data-setting="d"]
{
	display: none;
}

@supports not(color-scheme: dark)
{
	[data-setting="d"]
	{
		display: none;
	}
}