:root {
	/* Colors */
	--color-bg: #1a1a1a;
	--color-bg-debug: #666666;
	--color-bg-secondary: #2a2a2a;
	--color-bg-softkey: #111111;
	--color-text: #eee;
	--color-text-heading: #333;
	--color-border: #ccc;
	--color-border-light: #ddd;
	--color-border-focus: #91a666;
	--color-highlight: #3a3a3a;
	--color-overlay: rgba(0, 0, 0, 0.7);

	/* Sizes */
	--radius: 6px;
	--border-thin: 0.3rem;
	--border-thick: 1rem;

	/* Typography */
	--font-main: Arial, sans-serif;
	--font-size-base: 1rem;
	--font-size-small: 12px;
}

body.light-theme {
	--color-bg: #eee;
	--color-text: #1a1a1a;
	--color-bg-secondary: #bbb;
	--color-highlight: #999;
	--color-bg-softkey: #aaa;
	--color-overlay: rgba(0, 0, 0, 0.2);
}


body {
	font-family: var(--font-main);
	background-color: var(--color-bg);
	color: var(--color-text);
}

video {
	max-width: 90%;
	max-height: 90%;
	border: var(--border-thin) solid var(--color-border);
}

img {
	height: 100%;
	border: var(--border-thick) solid #fff;
}

pre {
	width: 90vw !important;
	max-width: 90vw;
	white-space: pre-wrap;
	overflow-x: auto;
	box-sizing: border-box;
	display: inline;
}
#qrcode {
	height: 60%;
	display: flex;
	margin-top: 0.1rem;
	flex-direction: column;
	text-align: center;
	padding: 2px;
	border-radius: var(--radius);
	align-items: center;
}

#qrcode.focused canvas {
	height:90vh;
	z-index: 2;
	object-fit: contain;
}
#qrcode.focused {
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	width: 100vw;
	border:none !important;
	z-index: 1;
	background: rgba(0,0,0,0.6);
}


#canvas {
	display: none;
}

#softkey {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 1.5rem;
	background: var(--color-bg-softkey);
	display: flex;
	justify-content: center;
}

#softkey-left {
	position: absolute;
	left: 0rem;
	text-align: left;
	justify-content: flex-start;
}

#softkey-right {
	position: absolute;
	right: 0rem;
	text-align: end;
	justify-content: flex-end;
}

#softkey > * {
	display: inline-block;
	width: 72px;
}

#softkey > *:hover {
	background: var(--color-bg-debug);
	color: var(--color-text);
}

#softkey-left,
#softkey-right,
#softkey-center {
	font-weight: 300;
	font-size: var(--font-size-base);
	color: var(--color-text);
	display: flex;
	white-space: nowrap;
}

#softkey-center {
	justify-content: center;
}

/*
#text {
	background-color: var(--color-bg-secondary);
	width: 100%;
	height: 3rem;
	border-radius: var(--radius);
	margin: 0vh 0vw 1vh 0vw;
	color: var(--color-text);
	font-size: var(--font-size-base);
}
*/

.maincontent {
	width: 100%;
	height: 90vh;
	display: flex;
	flex-direction: column;
	align-content: center;
	justify-content: baseline;
	align-items: center;
	overflow: hidden;
}

.cameraview {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: 90vh;
}

#result {
	text-align: center;
	padding: 0.5rem;
	font-weight: bold;
	width: 100vw;
	background-color: var(--color-overlay);
	color: var(--color-text);
	position: fixed;
	top: 0px;
	left: 0px;
}

h1,h2,h3 {
	text-align: center;
	color: var(--color-text);
}

label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
}

.slider-container label {
/*
	font-size: 0.7rem;
*/
}

input[type="text"],
input[type="file"],
button,
.color-selector,
.color-display {
	max-width: 50%;
	padding: 8px;
	border: 1px solid var(--color-border-light);
	border-radius: var(--radius);
	box-sizing: border-box;
	font-size: 16px;
	background: var(--color-bg-secondary);
	color: var(--color-text);
}

button {
	width: 100%;
	max-width: 100%;
}

input[type="text"] {
	width: 70%;
	max-width: 70%;
}

#file-trigger {
	max-width: 90%;
	overflow: hidden;

}

.focusable {
	border: 2px solid transparent;
	transition: border-color 0.2s;
	padding: 0.5rem;
	margin: 5px 0px 5px 0px;
	background: var(--color-bg-secondary);
	border-radius: var(--radius);
}

.focusable a
{
	position: absolute;
	right: 1rem;
	color: var(--color-bg-debug);
}

.focused {
	border: 4px solid var(--color-border-focus) !important;
	border-radius: var(--radius);
	background-color: var(--color-highlight);
}

button {
	background-color: var(--color-bg-secondary);
	color: var(--color-text);
	cursor: pointer;
	margin-top: 10px;
}

button.focused {
	background-color: var(--color-highlight);
}

.color-container {
	display: flex;
	align-items: center;
	gap: 10px;
}

.color-display {
	width: 50px;
	height: 40px;
	border: 2px solid var(--color-border-light);
	cursor: pointer;
	display: inline-block;
	flex-shrink: 0;
}

.color-value {
	flex: 1;
	padding: 8px;
	font-family: monospace;
	background: var(--color-bg);
	border: 1px solid var(--color-border-light);
	border-radius: var(--radius);
}

.instructions {
	position: fixed;
	bottom: 2rem;
	left: 0.5rem;
	right: 0.5rem;
	background: var(--color-bg-softkey);
	color: var(--color-text);
	padding: 10px;
	border-radius: var(--radius);
	font-size: var(--font-size-small);
	text-align: center;
}

.hidden {
	display: none;
}

#qrcode canvas {
	width: 90%;
	margin: 1rem 0rem 1rem 0rem;
}

	header {
		text-align: center;
		padding: 0.5rem;
		background: var(--color-bg-softkey);
	}
	ul {
		list-style: none;
		padding: 0;
		margin: 0;
		flex: 1;
	}
	li {
		padding: 12px;
		text-align: center;
		border-bottom: 1px solid #444;
	}
	.selected {
		background: var(--color-text);
		color: var(--color-bg);
	}
	.focusable:hover {
		background: var(--color-bg-debug);
	}


.container {
	margin-bottom: 2rem;
}

.form-group {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.form-group label {
	flex-shrink: 0;
	padding-right: 1rem;
}

.combobox {
	display:flex;
	flex-direction: row-reverse;
}

.combobox select
{
	width: auto;
	padding: 0.44rem 0px;
	border: none;
	border-radius: var(--radius);
	background: var(--color-bg-secondary);
	color: var(--color-text);
}

.combobox select.selected {
	border-color: var(--color-border-focus);
	color: var(--color-text);
	background: var(--color-bg);
}

.ekqr-logo {
	width: 40%;
	display: block;
	margin: 0 auto;
	border: none;
}

.hidden {
	display:none;
}

#colorPickerOverlay {
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background: rgba(0,0,0,0.8);
				z-index: 9999;
				display: flex;
				justify-content: center;
				align-items: center;
}

#picker {
	background: var(--color-bg);
	/* padding: 20px; */
	/* border-radius: 8px; */
	width: 100%;
	max-width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
}
.pickerwindow {
	padding: 1rem;
}

.picker-title {
		text-align: center;
		margin-bottom: 15px;
}

#colorPreview {
		width: 25%;
		border: 1px solid #ccc;
		margin-left: 10px;
		border-radius: var(--radius);
}

.slider-container {
	margin-bottom: 10px;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

.slider-container:last-of-type {
		margin-bottom: 15px;
}

.slider {
	width: 90%;
}

.hex-container {
	margin-bottom: 15px;
	display: flex;
	flex-direction: row;
}

#hexInput {
		width: 75%;
}

.button-container {
		text-align: center;
}

.color-button {
		padding: 3px;
		display:none;
}

#applyColor {
	margin-right: 10px;
}

.picker-focus {
	outline: 2px solid var(--color-border-focus);
	padding: 5px;
	background: var(--color-highlight);
	border-width: 3px;
	border-color: var(--color-border-focus);
}

input[type="range"].picker-focus {
	outline: 2px solid var(--color-border-focus);
	padding: 5px;
	background: var(--color-highlight);
	border-width: 3px;
	border-color: var(--color-border-focus);
}

button.picker-focus {
	outline: none;
}


/* sliders */
input[type="range"] {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background: transparent;
	cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
	background: #666; 
	height: 4px; 
	border-radius: 2px;
	border: none;
}

input[type="range"]::-moz-range-track {
	background: #666;
	height: 4px;
	border: none;
	border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	background: #eee;
	height: 16px;
	width: 16px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	margin-top: -6px;
}

input[type="range"]::-moz-range-thumb {
	background: #eee;
	height: 16px;
	width: 16px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
}


.softkey-hints {
		display: flex;
		justify-content: space-between;
		margin-top: auto;
		padding: 5px 0;
		border-top: 1px solid #ccc;
		background: var(--color-bg-softkey);
		color: var(--color-text);
}

.softkey-hint {
	font-size: 12px;
	padding: 2px 5px;
}

.softkey-hint.left {
	text-align: left;
}

.softkey-hint.right {
	text-align: right;
}