:root {
  --bg-color: #fffdf2;
  --bg-color-2: #443;
  --text-color: #000;
  --accent-color: #ea3726;
  --border-radius: 20px;
}

body {
	margin: 0;
	background-color: var(--bg-color-2);
}

#options {
	font-size: 14px;
	border-radius: 0px var(--border-radius) 0px 0px;
	flex-grow: 1;
	flex-shrink: 0;
	background-color: var(--bg-color-2);
	color: var(--text-color);
}

#outimg {
	background-color: var(--bg-color);
	flex-grow: 1;
	min-width: 100%;
	max-width: 100%;
	max-height: 100%;
	flex-shrink: 1;
	object-position: center;
	object-fit: contain;
	image-rendering: pixelated;
}

.hidden {display: none !important}

#inimg {
	height: 0;
	min-height: 100%;
	position: absolute;
	object-fit: contain;
	max-width: 80%;
	max-height: 80%;
	flex-grow: 1;
	min-width: 0;
	flex-shrink: 1;
}

small {
	font-size: 11pt;
}

.btn {
	position: absolute;
	right: 5px;
	top: 5px;
	font-size: var(--border-radius);
	border-radius: 50%;
	width: 30px;
	height: 30px;
	opacity: 50%;
	border: none;
	color: var(--text-color);
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: var(--border-radius);
	display: inline-flex;
	justify-content: center;
	align-items: center;
}

.btn:hover {
	opacity: 100%;
}

.btn[disabled] {
	display: none;
}

input[disabled] {
/*	filter: blur(1px);*/
filter: opacity(50%);
}

#reset_input_button::after {
	display: inline-block;
	content: "\00d7";
	top: -.5px;
	position: relative;
}

#download_button > img {
	width: 1em;
}

img[src=""] {
	display: none;
}

#file_input {
	display: none;
}

#file_input_label > label {
	color: var(--accent-color);
	cursor: pointer;
}

#file_input_label > label:hover {
	text-decoration: underline;
}

#exposure_slider {
	vertical-align: middle;
}

#contrast_slider {
	vertical-align: middle;
}

#form {
/*	min-width: 75%;
	max-width: 75%;
	margin: 1em;
*/}

.form-row {
	display: flex;
/*	justify-content: flex-end;*/
	text-align: left;
}

.form-row > label {
	user-select: none;
	-webkit-user-select: none;
	min-width: 5em;
}

.form-row > input, .form-row > select {
	flex: 2;
}

.form-row > input[type="text"] {
	max-width: 5em;
}

input[type="color"] {
	background: transparent;
	appearance: none;
	height: 60px;
	width: 60px;
	border: none;
	padding: 0;
	margin-bottom: -5px;
}

input[type="color"]::-webkit-color-swatch
{
	border: solid 1px var(--bg-color-2);
	border-radius: 10px;
}

input[type="color"]::-moz-color-swatch
{
	border: solid 1px var(--bg-color-2);
	border-radius: 10px;
}

.wrapper {
	display: grid;
	gap: 5px;
	grid-template-columns: 1fr 90px 3fr;
	grid-template-rows: 38% 1fr;
	grid-template-areas:
		"input-pane palette-pane output-pane"
		"option-pane palette-pane output-pane";
	width: 100%;
	height: 100%;
	position: absolute;
/*	min-height: 100vh;
	min-height: -webkit-fill-available;
*/}

.wrapper > * {
	background-color: var(--bg-color);
	color: var(--text-color);
}

.input-pane {
	min-width: 350px;
	font-family: "EB Garamond";
	font-weight: bold;
	-webkit-font-smoothing: none;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30pt;
	grid-area: input-pane;
	border-radius: 0px 0px var(--border-radius) 0px;
	position: relative;
}

.input-pane small {
	-webkit-font-smoothing: antialiased;
}

.option-pane {
	padding: 0;
	grid-area: option-pane;
	border-radius: 0px var(--border-radius) 0px 0px;
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.palette-pane {
	padding: 5px;
	display: block;
	overflow-y: scroll;
	grid-area: palette-pane;
}

.output-pane {
	display: flex;
	grid-area: output-pane;
	background-color: var(--bg-color);
}

.tab-container {
	font-family: "EB Garamond";
	font-weight: bold;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	background-color: var(--bg-color-2);
}

.tab-container > .tab-title {
	flex-grow: 1;
	color: var(--bg-color);
	text-align: center;
	font-size: 15pt;
	-webkit-font-smoothing: none;
}

.tab-container > .active {
	filter: none;
}
.tab-container > button {
	font-family: "EB Garamond";
	filter: brightness(0.8);
	padding-top: 6px;
	padding-bottom: 4px;
	margin-left: 4px;
	width: 110px;
	appearance: none;
	background-color: var(--bg-color);
	border: none;
	box-shadow: 0 0 0 2px transparent;
	border-radius: var(--border-radius) var(--border-radius) 0 0;
	font-size: 12pt;
}

.tab-content {
/*	margin-bottom: 5px;*/
/*	height: 100%;*/
	flex: 1;
	background-color: var(--bg-color);
	border-radius: 0 0 var(--border-radius) 0;
	padding: 1em;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.tab-section {
	flex: 1 1;
	min-height: 13em;
	display: flex;
	flex-direction: column;
}

#palette-selector {
/*  width: 20em;*/
  vertical-align: center;
  height: 8em;
  overflow-x: scroll;
  white-space: nowrap;
}

.color-swatch {
	outline: solid 1px;
  width: 4.5em;
  height: 4.5em;
  display: inline-flex;
  flex-wrap: wrap;
  vertical-align: top;
  margin: 1em;
  position: relative;
}

.color-swatch-overlay {
	color: white;
	background-color: rgba(0,0,0,.4);
/*	filter: ;*/
	text-align: center;
	line-height: 4.5em;
	width: 100%;
	height: 100%;
	position: absolute;
	opacity: 0;
}

.color-swatch-overlay:hover {
	opacity: 1;
}

.color-swatch-element {
  flex: 1 1 auto;
  width: 1em;
}

.number-stepper {
	width: 100%;
	display: flex;
/*	height: 4em;*/
/*	height: 4em;*/
	/*width: 4em;
	height: 1em;*/
}
.number-stepper > * {
	flex: 1 1 auto;
}
.number-stepper > input {
	font-size: 16pt;
	padding: 0;
	min-width: 1em;
	text-align: center;
	border: 1px solid var(--bg-color-2);
}
.minus-btn, .plus-btn {
	font-size: 20pt;
/*	padding-left: 8%;
	padding-right: 8%;
	padding-top: 10px;
	padding-bottom: 10px;
*/	border: solid 1px var(--bg-color-2);
}

.minus-btn {
	border-radius: var(--border-radius) 0 0 var(--border-radius);
	border-right: 0;
}
.plus-btn {
	border-radius: 0 var(--border-radius) var(--border-radius) 0;
	border-left: 0;
}

.from-image-tab {
	display: flex;
	gap: 5px;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

#quant-button {
	width: 110px;
	border: solid 1px var(--bg-color-2);
	border-radius: calc(var(--border-radius)/2);
}

#quant-dropdown {
	appearance: none;
	padding: 1px;
	padding-left: 4px;
	text-align: center;
	width: 110px;
	border: solid 1px var(--bg-color-2);
	border-radius: calc(var(--border-radius)/2);
}

#not-supported-overlay {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: xx-large;
	background-color: var(--bg-color);
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 1000;
}

.wrapper {display: none}

@media (min-width: 700px) {
	#not-supported-overlay {
		display: none;
	}
	.wrapper {
		display: grid;
	}
}

.pal_entry {
	display: flex;
}

.del_btn::after {
	content: "\00d7";
}

.del_btn {
	background: none;
	border: none;
/*	appearance: none;*/
	padding: 0;
}

.add_btn {
  margin-left: 1.5px;
  margin-top: 2px;
  width: 55px;
	border: solid 1px var(--bg-color-2);
	border-radius: calc(var(--border-radius)/2);
	height: 20px;
}

.sort_btn {
  margin-left: 1.5px;
  width: 55px;
	border: solid 1px var(--bg-color-2);
	border-radius: calc(var(--border-radius)/2);
	height: 20px;
}