:root {
	--primary-color: #0c65aa;
	--secondary-color: #e0001b;
	--gray-color: #aaaaaa;
	--bg-color: #e9e9e9;
	--box-color: rgba(255,255,255,0.9);
	--font-color: #1a1a1a;
}

html, body {
	box-sizing: border-box;
	height: 100%;
	padding: 0;
	margin: 0;
}


body {
	font-family: apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	background: var(--bg-color);
	color:var(--font-color);
}

.wrapper {
	min-height: calc(100% - 60px);
	position: relative;
	margin-bottom: -30px;
	display: grid;
	justify-content: center; /* aligns the items horizontally */
	align-items: center; /* aligns the items vertically */
}

main {
	max-width:500px;
	padding:10px;
	margin: 0 auto;
}

footer, .push {
	height: 30px;
}

header, footer {
	position:relative;
	overflow:hidden;
	padding:10px;
	box-sizing: border-box;
}

a {
	color: inherit;
	text-decoration: none; 
}

h1 {
	color: var(--secondary-color);
	font-weight:400;
	margin:0;
	float:left;
}

h2 {
	margin-top:0px;
	text-transform:uppercase;
	font-size:1.1em;
	color: var(--primary-color);
}

h1 span {
	color: var(--primary-color);
	font-style:italic;
}

.menu {
	list-style: none;
	padding:0;
	margin:0;
	display:inline-block;
	text-decoration: none;
	position:absolute;
	right:10px;
	top:15px;
	font-size:160%;
}

.menu > li {
	display: inline-block;
	margin-left: 10px;
}

.menu li > * {
	cursor: pointer;
	vertical-align: middle;;
}

#copyright {
	width:100%;
	text-align: center;
	font-size:0.8em;
	text-transform: uppercase;
	color: var(--gray-color)
}

.hide {
	display:none;	
}

.column {
	float: left;
	width: 48%;
	height: 65px;
	margin-right:2%;
	overflow:hidden;
}

/* Clear floats after the columns */
.row:after {
	content: "";
	display: table;
	clear: both;
}

.modal-window label {
	text-transform:uppercase;
	color:var(--gray-color);
	font-size:90%;
	white-space: nowrap;
}

input, select {
	width:100%;
	-webkit-appearance: none;
	-webkit-border-radius: none;
	padding:5px;
	height:27px;
	font-size:120%;
	margin-bottom:10px;
	font-family: monospace;
	background:var(--bg-color);
	border:0;
	border-bottom:2px solid var(--gray-color);
	border-radius:0;
}

input {
	max-height:15px;
}

#errMsg {
	text-align: center;
	margin-bottom: 8px;
	color: var(--secondary-color);
	text-align: center;
	width: 100%;
	border-radius:5px;
	box-sizing: border-box;
	padding: 4px;
	border: var(--secondary-color) solid 2px;
	display:none;
}

#theimg, #theimg2, #theimg3 {
	width: 100%;
	margin-bottom: 10px;
}

.qrcode {
	padding:10px;
	letter-spacing: 1px;
	background:var(--box-color);
	opacity: 0.4;
	border-radius:8px;
	font-family: monospace;
	color:var(--gray-color);
	text-align:center;
	width:100%;
	box-sizing:border-box;
}

.modal-window {
	position: fixed;
	background-color: var(--box-color);
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: all 0.3s;
}
.modal-window:target {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}
.modal-window .foreground {
	width: 90%;
	position: absolute;
	top: 50%;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(3px);
	left: 50%;
	background: rgba(255,255,255,0.95);
	transform: translate(-50%, -50%);
	padding: 1em;
	box-sizing: border-box;
	box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.modal-close {
	color: var(--gray-color);
	font-size: 80%;
	position: absolute;
	right: 10px;
	text-align: center;
	top: 10px;
	display: block;
	padding: 10px;
	text-decoration: none;
}
.modal-close:hover {
	color: var(--font-color);
}

input[type="file"] {
	display: none;
}

/* ICONS */

.mdi--bookmark-plus {
	display: inline-block;
	width: 1em;
	height: 1em;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 3a2 2 0 0 1 2 2v16l-7-3l-7 3V5a2 2 0 0 1 2-2zm-6 4v2H9v2h2v2h2v-2h2V9h-2V7z'/%3E%3C/svg%3E");
}

.mdi--qrcode-edit {
	display: inline-block;
	width: 1em;
	height: 1em;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 5h2v2H5zM1 1h10v10H1zm2 2v6h6V3zm2 14h2v2H5zm-4-4h10v10H1zm2 2v6h6v-6zm10-2h4v2h2v-2h4v2h-4v2h4v6h-4v-2h-4v2h-2v-2h2v-2h-2zm8 8v-2h-2v2zm-2-4h-2v-2h-2v4h4zm3.7-13.65l-1 1l-2.05-2l1-1c.2-.21.54-.22.77 0l1.28 1.23c.21.2.22.54 0 .77M13 8.94l6.07-6.06l2.05 2.05L15.06 11H13z'/%3E%3C/svg%3E");
}

.mdi--edit {
	display: inline-block;
	width: 1em;
	height: 1em;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83l3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75z'/%3E%3C/svg%3E");
}

.mdi--qrcode-plus {
	display: inline-block;
	width: 1em;
	height: 1em;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 5h2v2H5zM1 1h10v10H1zm2 2v6h6V3zm2 14h2v2H5zm-4-4h10v10H1zm2 2v6h6v-6zm10-2h4v2h2v-2h4v2h-4v2h4v6h-4v-2h-4v2h-2v-2h2v-2h-2zm8 8v-2h-2v2zm-2-4h-2v-2h-2v4h4zM17 2v3h-3v2h3v3h2V7h3V5h-3V2Z'/%3E%3C/svg%3E");
}

.mdi--camera {
	display: inline-block;
	width: 1em;
	height: 1em;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h3l2-2h6l2 2h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m8 3a5 5 0 0 0-5 5a5 5 0 0 0 5 5a5 5 0 0 0 5-5a5 5 0 0 0-5-5m0 2a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3z'/%3E%3C/svg%3E");
}

/* Camera modal */
.camera-modal {
	position: fixed;
	inset: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.camera-modal.hide {
	display: none;
}
.camera-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.7);
}
.camera-modal-box {
	position: relative;
	background: #111;
	width: 92%;
	max-width: 480px;
	box-sizing: border-box;
	border-radius: 4px;
	overflow: hidden;
}
.camera-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px 6px;
	background: #111;
}
.camera-modal-header h2 {
	color: #fff;
	margin: 0;
	font-size: 1em;
}
.camera-modal-header .modal-close {
	position: static;
	color: #aaa;
	padding: 4px;
}
.camera-modal-header .modal-close:hover {
	color: #fff;
}
.camera-modal-header .mdi--close-thick {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12z'/%3E%3C/svg%3E");
}
#reader {
	width: 100%;
	background: #000;
}
#reader video {
	width: 100% !important;
	display: block;
}
.camera-hint {
	color: #888;
	font-size: 0.8em;
	text-align: center;
	margin: 6px 0 10px;
}
.camera-err {
	color: var(--secondary-color);
	font-size: 0.85em;
	text-align: center;
	padding: 8px 14px 10px;
}

.mdi--download {
	display: inline-block;
	width: 1em;
	height: 1em;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M5 20h14v-2H5m14-9h-4V3H9v6H5l7 7z'/%3E%3C/svg%3E");
}

.mdi--clipboard-paste {
	display: inline-block;
	width: 1em;
	height: 1em;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-7 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m0 4l4 4h-3v4h-2v-4H9z'/%3E%3C/svg%3E");
}

button.btn {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	font-size: inherit;
	line-height: inherit;
	vertical-align: middle;
}

/* QR actions + save button */
.qr-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 6px;
}

.save-btn {
	background: var(--primary-color);
	color: #fff;
	border: none;
	cursor: pointer;
	padding: 6px 14px;
	font-size: 0.9em;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border-radius: 4px;
}
.save-btn:hover {
	opacity: 0.85;
}

/* Name override card */
.name-override-card {
	background: var(--box-color);
	border-radius: 8px;
	padding: 10px 12px 4px;
	margin-top: 10px;
	box-sizing: border-box;
}
.name-override-label {
	text-transform: uppercase;
	color: var(--primary-color);
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.05em;
	margin-bottom: 4px;
}
.name-override-row {
	display: flex;
	gap: 10px;
}
.name-override-field {
	flex: 1;
}
.name-override-field label {
	display: block;
	text-transform: uppercase;
	color: var(--gray-color);
	font-size: 0.8em;
	white-space: nowrap;
}
.name-override-field input {
	width: 100%;
	box-sizing: border-box;
}

/* Paste modal */
.paste-modal {
	position: fixed;
	inset: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.paste-modal.hide {
	display: none;
}
.paste-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.4);
}
.paste-modal-box {
	position: relative;
	background: rgba(255,255,255,0.97);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 0 10px rgba(0,0,0,0.3);
	padding: 1.2em 1em 1em;
	width: 90%;
	max-width: 460px;
	box-sizing: border-box;
}
.paste-modal-box h2 {
	margin-bottom: 0.6em;
}
.paste-modal-err {
	color: var(--secondary-color);
	font-size: 0.85em;
	border: 2px solid var(--secondary-color);
	border-radius: 4px;
	padding: 4px 8px;
	margin: 0 0 0.6em;
}
.paste-modal-err.hide {
	display: none;
}

.paste-modal-box textarea {
	width: 100%;
	box-sizing: border-box;
	font-family: monospace;
	font-size: 0.95em;
	padding: 8px;
	border: 2px solid var(--gray-color);
	border-radius: 0;
	background: var(--bg-color);
	resize: vertical;
	display: block;
	margin-bottom: 0.8em;
}
.paste-modal-box textarea:focus {
	outline: none;
	border-color: var(--primary-color);
}
.paste-modal-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}
.paste-btn-clipboard, .paste-btn-apply {
	border: none;
	cursor: pointer;
	padding: 7px 14px;
	font-size: 1em;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.paste-btn-clipboard {
	background: var(--bg-color);
	color: var(--font-color);
	border: 2px solid var(--gray-color);
}
.paste-btn-clipboard:hover {
	border-color: var(--primary-color);
}
.paste-btn-apply {
	background: var(--primary-color);
	color: #fff;
}
.paste-btn-apply:hover {
	opacity: 0.85;
}

.mdi--close-thick {
	display: inline-block;
	width: 1em;
	height: 1em;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12z'/%3E%3C/svg%3E");
}