.ui-keyboard-button {
	background: transparent;
	color: @keyboard-color;
	min-width: 0 !important;
	margin: 1px !important;
	padding: 0 !important;
	border: 0 none;
	.rem(font-size, 22);
	max-width: 80px;
	min-height: 33px;
	width: 8vw;

	&:active, &.touch-focus {
		color: @main-color-text;
		background: @main-color;
		.border-radius(5px, 5px, 5px, 5px);
		position: relative;
		margin-top: -32px !important;
		padding-bottom: 40px !important;
		max-height: 75px;
	}
}

.ui-keyboard-right,
.ui-keyboard-left {
	color: @keyboard-background;
	position: absolute;
	top: 4px;
	right: 40px;
	width: 30px;

	&:active, &.touch-focus {
		position: absolute;
		background: transparent;
		margin-top: 0 !important;
		padding-bottom: 0 !important;
		max-height: 43px;

		span {
			color: @main-color;
		}
	}
}
.ui-keyboard-right {
	right: 10px;
}



.ui-keyboard-shift {
	span {
		display: none !important;
	}
	&:after {
		.font-icon-reset();
		content: @fa-legacy-var-arrow-up;
		.rem(font-size, 25);
		max-height: 43px;
	}
}

.ui-keyboard-accept {
	clear: right;
}

.ui-keyboard-cancel,
.ui-keyboard-accept {
	float: right;
	.border-radius(50%,50%,50%,50%);
	background: @keyboard-accept;

	margin-top: 2px !important;
	width: 1.8rem;
	height: 1.8rem !important;

	.rem(line-height, 20) !important;
	text-align: center;

	span {
		display: none !important;
	}

	&:after {
		.font-icon-reset();
		content: @fa-legacy-var-check;
		color: @keyboard-background;
	}
}
.ui-keyboard-cancel {
	background: @btn-danger-background;
	margin-right: 10px !important;

	@media (max-width: 300px) {
		margin-right: 5px !important;
	}

	&:after {
		.font-icon-reset();
		content: @fa-legacy-var-level-down;
	}
}


.ui-keyboard-shift,
.ui-keyboard-default,
.ui-keyboard-meta1,
.ui-keyboard-meta2 {
	float: left;
	min-width: auto !important;
	width: auto;
	opacity: .7;
	.rem(font-size, 17);
	padding: 0 10px !important;
}

.ui-keyboard-keyset {
	width: 100%;
}


.ui-keyboard-space {
	width: 33vw !important;
	max-width: none;
	position: relative;

	&:after {
		.border-radius(5px, 5px, 5px, 5px);
		content: "";
		display: inline-block;
		height: 20px;
		width: 100%;
		background: mix(@keyboard-background, contrast(@keyboard-background), 70%);

		top: 50%;
		position: absolute;
		left: 0;
		margin-top: -10px;
	}
	&:active, &.touch-focus {
		background: transparent;
		margin-top: 0 !important;
		padding-bottom: 0 !important;
		max-height: 43px;

		&:after {
		background: mix(@keyboard-background, contrast(@keyboard-background), 40%);
		}
	}
}


.ui-keyboard-bksp {
	float: right;
	margin-right: 10px;
	min-width: 40px !important;
	max-width: 40px;
	overflow: visible !important;

	span {
		position: relative;
		margin-right: -17px !important;
		.rem(line-height, 40);

		&:after {
			.font-icon-reset();
			content: @fa-legacy-var-remove;

			background: contrast(@keyboard-background);
			color: @keyboard-background;
			.rem(font-size, 19);
			width: 24px;
			display: block;
			.rem(line-height, 26);
			height: 1.6rem;
			overflow: hidden;
			text-indent: -3px;
		}
		&:before {
			content: "";
			background: transparent;
			border: 0.8rem solid transparent;
			border-right-color: contrast(@keyboard-background);
			position: absolute;
			left: -1.6rem;
			top: 0;
		}
	}

	&:active, &.touch-focus {
		background: transparent;
		margin-top: 0 !important;
		padding-bottom: 0 !important;
		max-height: 43px;

		span {
			&:after {
				color: contrast(@keyboard-remove);
				background: @keyboard-remove;
			}
			&:before {
				border-right-color: @keyboard-remove;
			}
		}
	}

}


.ui-keyboard {
	background: @keyboard-background;
	top: auto !important;
	bottom: 0;
	width: 100%;
	.box-sizing(border-box);
}
.ui-keyboard-accept span,
.ui-keyboard-cancel span {
	padding: 0 10px !important;
}
.ui-keyboard {
	padding: 0.3em;
	position: fixed;
	left: 0;
	top: 0;
	z-index: 16000;
}
.ui-keyboard-has-focus {
	z-index: 16001;
}
.ui-keyboard div {
	font-size: 1.1em;
}
.ui-keyboard-button {
	height: 2em;
	min-width: 2em;
	margin: 0.1em;
	cursor: pointer;
	overflow: hidden;
	line-height: 2em;
	-moz-user-focus: ignore;
}
.ui-keyboard-button span {
	padding: 0;
	margin: 0;
	white-space: nowrap;
	display: inline-block;
}
.ui-keyboard-button-endrow {
	clear: left;
}
.ui-keyboard-space {
	width: 15em;
}
.ui-keyboard-empty span,
.ui-keyboard-space span {
	display: none;
	font: 0/0 a;
	.text-shadow(none);
	color: transparent;
}
.ui-keyboard-preview-wrapper {
	text-align: center;
	position: relative;
	overflow: hidden;
	padding: 4px;
	.box-sizing(border-box);

	input, textarea {
		margin: 0;
		padding-right: 60px !important;
		padding-left: 15px !important;
	}
	textarea {
		padding-top: 10px;
		padding-bottom: 10px;
		height: 20vh;
		min-height: 70px;
	}
}
.ui-keyboard-preview {
	background: contrast(@keyboard-background);
	color: @keyboard-background;
	text-align: left;
	display: block !important;
	width: 100% !important;
	height: auto !important;
	padding: 0 15px;
	line-height: 2.3rem;
	.box-sizing(border-box);
}
.ui-keyboard-keyset {
	text-align: center;
	white-space: nowrap;
}
.ui-keyboard-input {
	text-align: left;
}
.ui-keyboard-placeholder {
	color: @keyboard-color;
}
.ui-keyboard-nokeyboard {
	color: @keyboard-color;
	border-color: @keyboard-background;
}
.ui-keyboard-spacer {
	display: inline-block;
	width: 1px;
	height: 0;
	cursor: default;
}
.ui-keyboard-LRM span,
.ui-keyboard-NBSP span,
.ui-keyboard-RLM span,
.ui-keyboard-ZWJ span,
.ui-keyboard-ZWNJ span,
.ui-keyboard-ZWSP span {
	font-size: 0.5em;
	line-height: 1.5em;
	white-space: normal;
}
.ui-keyboard-button.ui-keyboard-combo.ui-state-default {
	border-color: @light-dark-color;
}
button.ui-keyboard-accept.ui-keyboard-valid-input {
	border-color: #0c0;
	background: #080;
	color: #fff;
}
button.ui-keyboard-accept.ui-keyboard-valid-input:hover {
	background: #0a0;
}
button.ui-keyboard-accept.ui-keyboard-invalid-input {
	border-color: #c00;
	background: #800;
	color: #fff;
	.opacity(0.5);
}
button.ui-keyboard-accept.ui-keyboard-invalid-input:hover {
	background: #a00;
}
.ui-keyboard-caret {
	background: #c00;
	width: 1px;
	margin-top: 3px;
}
div.ui-body.ui-keyboard button.ui-keyboard-button.ui-btn {
	padding: 0.5em 1em;
	border-color: transparent;
}
.ui-body .ui-keyboard-button {
	width: 3em;
	height: 3em;
	display: inline-block;
}
.ui-body .ui-keyboard-widekey {
	width: 5.5em;
}
.ui-body .ui-keyboard-space {
	width: 15em;
	display: inline-flex;
	height: 2rem;
}
.ui-body .ui-keyboard-space span {
	visibility: hidden;
}
.ui-body .ui-keyboard-keyset {
	line-height: 0.5em;
}
.ui-body input.ui-input-text,
.ui-body textarea.ui-input-text {
	width: 95%;
}
.ui-body .ui-btn-inner {
	height: 2em;
	padding: 0.2em 0;
	margin: 0;
}
.ui-body .ui-btn {
	margin: 0;
	.rem(font-size, 13);
}
button.ui-keyboard-button.btn {
	padding: 1px 6px;
}
button.ui-keyboard-toggle span {
	width: 0.8em;
	height: 0.8em;
	display: inline-block;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: contain;
	background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgZmlsbD0iIzExMSI+PHBhdGggZD0iTTguNyw0LjRINy41SDUuMHYtMS45YzAtMS40LTEuMS0yLjUtMi41LTIuNWMtMS40LDAtMi41LDEuMS0yLjUsMi41djEuOWgxLjIgdi0xLjljMC0wLjcsMC42LTEuMiwxLjItMS4yczEuMiwwLjYsMS4yLDEuMnYxLjljLTAuNywwLTEuMiwwLjYtMS4yLDEuMlY4LjggYzAsMC43LDAuNiwxLjIsMS4yLDEuMmg1LjBDOS40LDEwLDEwLDkuNCwxMCw4LjhWNS42QzEwLDUuMCw5LjQsNC40LDguOCw0LjR6IE02LjYsNy40djEuMCBjMCwwLjItMC4xLDAuMy0wLjMsMC4zUzYuMCw4LjYsNi4wLDguNFY3LjRjLTAuMi0wLjEtMC4zLTAuMy0wLjMtMC41YzAtMC4zLDAuMy0wLjYsMC42LTAuNiBTNi45LDYuNiw2LjksNi45QzYuOSw3LjEsNi44LDcuMyw2LjYsNy40eiIvPjwvc3ZnPg==);
}
.ui-keyboard-dark-theme button.ui-keyboard-toggle span {
	background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgZmlsbD0iI2VlZSI+PHBhdGggZD0iTTguNyw0LjRINy41SDUuMHYtMS45YzAtMS40LTEuMS0yLjUtMi41LTIuNWMtMS40LDAtMi41LDEuMS0yLjUsMi41djEuOWgxLjIgdi0xLjljMC0wLjcsMC42LTEuMiwxLjItMS4yczEuMiwwLjYsMS4yLDEuMnYxLjljLTAuNywwLTEuMiwwLjYtMS4yLDEuMlY4LjggYzAsMC43LDAuNiwxLjIsMS4yLDEuMmg1LjBDOS40LDEwLDEwLDkuNCwxMCw4LjhWNS42QzEwLDUuMCw5LjQsNC40LDguOCw0LjR6IE02LjYsNy40djEuMCBjMCwwLjItMC4xLDAuMy0wLjMsMC4zUzYuMCw4LjYsNi4wLDguNFY3LjRjLTAuMi0wLjEtMC4zLTAuMy0wLjMtMC41YzAtMC4zLDAuMy0wLjYsMC42LTAuNiBTNi45LDYuNiw2LjksNi45QzYuOSw3LjEsNi44LDcuMyw2LjYsNy40eiIvPjwvc3ZnPg==);
}
button.ui-keyboard-toggle.ui-keyboard-disabled span {
	background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgZmlsbD0iIzExMSI+PHBhdGggZD0iTTcuNCA0LjRWMi41YzAtMS40LTEuMS0yLjUtMi41LTIuNWMtMS40IDAtMi41IDEuMS0yLjUgMi41djEuOSBjLTAuNyAwLTEuMiAwLjUtMS4yIDEuMnYzLjFDMS4zIDkuNCAxLjggMTAgMi41IDEwaDQuOWMwLjcgMCAxLjItMC42IDEuMi0xLjJWNS42IEM4LjcgNC45IDguMSA0LjQgNy40IDQuNHogTTUuMyA3LjR2MS4wYzAgMC4yLTAuMSAwLjMtMC4zIDAuM2MtMC4yIDAtMC4zLTAuMS0wLjMtMC4zVjcuNCBjLTAuMi0wLjEtMC4zLTAuMy0wLjMtMC41YzAtMC4zIDAuMy0wLjYgMC42LTAuNmMwLjMgMCAwLjYgMC4zIDAuNiAwLjYgQzUuNiA3LjEgNS41IDcuMyA1LjMgNy40eiBNNi4yIDQuNEgzLjdWMi41YzAtMC43IDAuNS0xLjIgMS4yLTEuMmMwLjcgMCAxLjIgMC42IDEuMiAxLjIgVjQuNHoiLz48L3N2Zz4=);
}
.ui-keyboard-dark-theme button.ui-keyboard-toggle.ui-keyboard-disabled span {
	background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgZmlsbD0iI2VlZSI+PHBhdGggZD0iTTcuNCA0LjRWMi41YzAtMS40LTEuMS0yLjUtMi41LTIuNWMtMS40IDAtMi41IDEuMS0yLjUgMi41djEuOSBjLTAuNyAwLTEuMiAwLjUtMS4yIDEuMnYzLjFDMS4zIDkuNCAxLjggMTAgMi41IDEwaDQuOWMwLjcgMCAxLjItMC42IDEuMi0xLjJWNS42IEM4LjcgNC45IDguMSA0LjQgNy40IDQuNHogTTUuMyA3LjR2MS4wYzAgMC4yLTAuMSAwLjMtMC4zIDAuM2MtMC4yIDAtMC4zLTAuMS0wLjMtMC4zVjcuNCBjLTAuMi0wLjEtMC4zLTAuMy0wLjMtMC41YzAtMC4zIDAuMy0wLjYgMC42LTAuNmMwLjMgMCAwLjYgMC4zIDAuNiAwLjYgQzUuNiA3LjEgNS41IDcuMyA1LjMgNy40eiBNNi4yIDQuNEgzLjdWMi41YzAtMC43IDAuNS0xLjIgMS4yLTEuMmMwLjcgMCAxLjIgMC42IDEuMiAxLjIgVjQuNHoiLz48L3N2Zz4=);
}
.ui-keyboard.ui-keyboard-disabled button:not(.ui-keyboard-toggle),
.ui-keyboard.ui-keyboard-disabled input {
	opacity: 0.5;
}
.ui-keyboard-overlay {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	background: rgba(0,0,0,.5);
}
.ui-keyboard-popup {
	display: inline-block;
	max-width: 22em;
}
div.ui-keyboard-extender {
	float: right;
	margin-left: 5px;
}
button.ui-keyboard-extender span {
	width: 0.9em;
	height: 0.9em;
	display: inline-block;
	margin-bottom: 3px;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: contain;
	background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgc3R5bGU9ImZpbGw6IzExMSI+PGc+PHBhdGggc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzExMSIgZD0iTSAwLjUsNC41IDE1LjUsNC41IDE1LjUsMTUuNSAwLjUsMTUuNSBaIj48L3BhdGg+PHJlY3Qgd2lkdGg9IjIiIGhlaWdodD0iMiIgeD0iMiIgeT0iNiI+PC9yZWN0PjxyZWN0IHdpZHRoPSIyIiBoZWlnaHQ9IjIiIHg9IjUiIHk9IjYiPjwvcmVjdD48cmVjdCB3aWR0aD0iMiIgaGVpZ2h0PSIyIiB4PSI4IiB5PSI2Ij48L3JlY3Q+PHBhdGggZD0ibSAxMSw2IDMsMCAwLDUgLTIsMCAwLC0zIC0xLDAgeiI+PC9wYXRoPjxyZWN0IHdpZHRoPSIyIiBoZWlnaHQ9IjIiIHg9IjEyIiB5PSIxMiI+PC9yZWN0PjxyZWN0IHdpZHRoPSI2IiBoZWlnaHQ9IjIiIHg9IjUiIHk9IjEyIj48L3JlY3Q+PHJlY3Qgd2lkdGg9IjIiIGhlaWdodD0iMiIgeD0iOSIgeT0iOSI+PC9yZWN0PjxyZWN0IHdpZHRoPSIyIiBoZWlnaHQ9IjIiIHg9IjYiIHk9IjkiPjwvcmVjdD48cmVjdCB3aWR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dD48L2c+PC9zdmc+);
}
@media all and (max-width:319px) {
	.ui-keyboard div {
		.rem(font-size, 9);
	}
	.ui-keyboard .ui-keyboard-input {
		.rem(font-size, 12);
	}
	.ui-body .ui-btn {
		margin: 0;
		.rem(font-size, 9);
	}
	.ui-body .ui-keyboard-button {
		width: 1.8em;
		height: 2.5em;
	}
	.ui-body .ui-keyboard-widekey {
		width: 4em;
	}
	.ui-body .ui-keyboard-space {
		width: 8em;
	}
	.ui-body .ui-btn-inner {
		height: 2.5em;
		padding: 0.3em 0;
	}
}
@media all and (min-width:320px) and (max-width:479px) {
	.ui-keyboard div {
		.rem(font-size, 9);
	}
	.ui-keyboard .ui-keyboard-input {
		.rem(font-size, 14);
	}
	.ui-body .ui-btn {
		margin: 0;
		.rem(font-size, 11);
	}
	.ui-body .ui-keyboard-button {
		width: 1.8em;
		height: 3em;
	}
	.ui-body .ui-keyboard-widekey {
		width: 4.5em;
	}
	.ui-body .ui-keyboard-space {
		width: 10em;
	}
	.ui-body .ui-btn-inner {
		height: 3em;
		padding: 0.7em 0;
	}
}
@media all and (min-width:480px) and (max-width:767px) {
	.ui-keyboard div {
		.rem(font-size, 13);
	}
	.ui-keyboard .ui-keyboard-input {
		.rem(font-size, 14);
	}
	.ui-body .ui-btn {
		margin: 0;
		.rem(font-size, 10);
	}
	.ui-body .ui-keyboard-button {
		height: 2.5em;
	}
	.ui-body .ui-btn-inner {
		height: 2.5em;
		padding: 0.5em 0;
	}
}
