/* font */

:lang(zh-hant) {
	font-family: "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "PingFang TC", "Heiti TC", "LiHei Pro", "Microsoft JhengHei", "WenQuanYi Micro Hei", "Helvetica Neue", helvetica, arial, sans-serif;
}

:lang(zh-hans) {
	font-family: "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "PingFang SC", "Heiti SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Helvetica Neue", helvetica, arial, sans-serif;
}

:lang(ja) {
	font-family: "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Hiragino Kaku Gothic Pro", osaka, meiryo, "Helvetica Neue", helvetica, arial, sans-serif;
}

:lang(en) {
	font-family: "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", helvetica, arial, sans-serif;
}

/* layout */

html {
	background-size: 100% auto;
	background-position: bottom;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	display: flex;
	cursor: default;
	user-select: none;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	padding: 0 calc((1266px + 100px - 1026px) / 2);
	position: relative;
	font-size: 1rem;
}

/* for IE */
@media all and (-ms-high-contrast: none) {
	body {
		padding: 0;
	}
}

#locale-container {
	position: absolute;
	top: 24px;
	right: 48px;
	height: 34px;
	border: solid 1px #ddd;
	border-radius: 4px;
}

#locale-container::after {
	content: "";
	position: absolute;
	top: 15px;
	right: 17px;
	pointer-events: none;
	border-style: solid;
	border-width: 5px;
	border-color: transparent;
	border-top-color: #000;
}

#locale-container > select {
	font-size: 0.875rem;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	-ms-appearance: none;
	appearance: none;
	border: none;
	background-color: transparent;
	outline: none;
	padding: 0 41px 0 16px;
	height: 100%;
}

#locale-container > select option:checked,
#locale-container > select option[selected] {
	font-weight: bold;
}

#locale-container > select::-ms-expand {
	display: none;
}

#copyright {
	position: absolute;
	bottom: 14px;
	left: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.875rem;
	color: #999;
	pointer-events: none;
}

#application {
	position: absolute;
	right: 48px;
	bottom: 8px;
	display: flex;
	align-items: center;
}

#application-description {
	font-size: 0.875rem;
	color: #999;
	margin-right: 8px;
}

.download-button {
	width: 32px;
	height: 32px;
	box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.3);
	background-color: #ffffff;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	outline: none;
	text-decoration: none;
}

.download-button + .download-button {
	margin-left: 16px;
}

.download-button > img {
	width: 18px;
	height: 18px;
}

#main-block {
	display: flex;
	height: 457px;
	max-width: 1026px;
	flex: 1;
	justify-content: space-between;
}

/* for IE */
@media all and (-ms-high-contrast: none) {
	#main-block {
		flex: none;
	}
}

#left-block,
#right-block {
	flex: none;
	display: flex;
	flex-direction: column;
}

#left-block {
	width: 390px;
}

#content {
	width: 392px;
}

/* for IE */
@media all and (-ms-high-contrast: none) {
	#left-block {
		margin-right: 100px;
	}
}

#right-block {
	align-items: center;
	min-width: 536px;
}

#logo-container {
	overflow: hidden;
	flex: none;
}

#logo {
	max-height: 160px;
}

#greeting {
	font-size: 2rem;
	overflow: hidden;
	width: 390px;
	margin-top: 24px;
	overflow-wrap: break-word;
}

/* tab */

#tab {
	flex: 1;
	display: flex;
	flex-direction: column;
	margin-top: -12px;
	width: 100%;
	align-items: center;
}

#tab-heads {
	display: flex;
	align-items: stretch;
	height: 52px;
	border-bottom: 1px solid #ddd;
	align-items: stretch;
	flex: none;
	align-self: stretch;
}

#tab-heads > label:not([hidden]) {
	min-width: 128px;
	font-size: 1rem;
	cursor: pointer;
	text-align: center;
	border-bottom: 6px transparent solid;
	transition-duration: 300ms;
	transition-property: border-bottom-color, color;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
}

#tab-heads > label + label {
	margin-left: 8px;
}

#tab-1:checked ~ #tab-heads > label[for="tab-1"],
#tab-2:checked ~ #tab-heads > label[for="tab-2"],
#tab-3:checked ~ #tab-heads > label[for="tab-3"],
#tab-4:checked ~ #tab-heads > label[for="tab-4"],
#tab-5:checked ~ #tab-heads > label[for="tab-5"] {
	pointer-events: none;
	border-bottom-color: #f7921e;
	color: #000;
}

#tab > [name="tab-controller"] {
	display: none;
}

#tab-1:not(:checked) ~ #tab-bodies > [data-id="tab-1"],
#tab-2:not(:checked) ~ #tab-bodies > [data-id="tab-2"],
#tab-3:not(:checked) ~ #tab-bodies > [data-id="tab-3"],
#tab-4:not(:checked) ~ #tab-bodies > [data-id="tab-4"],
#tab-5:not(:checked) ~ #tab-bodies > [data-id="tab-5"] {
	display: none;
}

#tab-bodies {
	flex: 1;
	width: 392px;
	padding-top: 12px;
}

/* input */

.input-wrapper {
	position: relative;
	display: flex;
	align-items: stretch;
	height: 48px;
	cursor: text;
	margin: 12px 0;
}

.input-wrapper[data-icon]:before {
	position: absolute;
	left: 12px;
	top: 12px;
	pointer-events: none;
	width: 24px;
}

.input-wrapper[data-icon="email"]:before {
	content: url('/img/login_email.svg');
}

.input-wrapper[data-icon="lock"]:before {
	content: url('/img/login_lock.svg');
}

.input-wrapper[data-icon="code"]:before {
	content: url('/img/login_verified_user.svg');
}

.input-wrapper > input {
	min-width: 0;
	padding: 0 0 0 44px;
	font-size: 1rem;
	flex: 1;
	font-family: inherit;
	border-radius: 4px;
	border: solid 1px #ccc;
	background-color: #fff;
	outline-color: #1e90ff;
}

.input-wrapper > input:-ms-input-placeholder {
	color: #ccc;
}
.input-wrapper > input::placeholder {
	color: #ccc;
}

/* checkbox */

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

input[type="checkbox"] + label {
	position: relative;
	display: flex;
	cursor: pointer;
	height: 48px;
	font-size: 1rem;
	align-items: center;
	padding: 0 12px;
	margin: 12px 0;
}

input[type="checkbox"] + label::before {
	content: "";
	background-color: #ccc;
	width: 20px;
	height: 20px;
	border-radius: 2px;
	box-sizing: border-box;
	transition: background-color 150ms;
	margin-right: 10px;
}

input[type="checkbox"] + label:hover::before {
	outline: 1px #1e90ff auto;
}

input[type="checkbox"]:checked + label::before {
	animation: checkbox-shrink-bounce 150ms;
	background-color: #1e90ff;
}

@keyframes checkbox-shrink-bounce {
	0% {
		transform: scale(1);
	}
	33% {
		transform: scale(0.8);
	}
	100% {
		transform: scale(1);
	}
}

input[type="checkbox"]:checked + label::after {
	content: "";
	position: absolute;
	top: 22px;
	left: 15px;
	border-right: 2px solid transparent;
	border-bottom: 2px solid transparent;
	transform: rotate(45deg);
	transform-origin: 0% 100%;
	animation: checkbox-check 150ms 150ms forwards;
}

@keyframes checkbox-check {
	0% {
		width: 0;
		height: 0;
		border-color: #fff;
		transform: translate3d(0, 0, 0) rotate(45deg);
	}
	33% {
		width: 5px;
		height: 0;
		transform: translate3d(0, 0, 0) rotate(45deg);
	}
	100% {
		width: 5px;
		height: 10px;
		border-color: #fff;
		transform: translate3d(0, -10px, 0) rotate(45deg);
	}
}

.checkbox-group {
	display: flex;
	margin: 12px 0;
}

.checkbox-group > label {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.checkbox-group > label ~ label {
	margin-left: 8px;
}
/* icon button */

.icon-button {
	width: 40px;
	height: 40px;
	display: inline-flex;
	border-radius: 50%;
	background-color: #fff;
	border: 1px solid #ccc;
	align-items: center;
	justify-content: center;
	outline: none;
	cursor: pointer;
}

.icon-button:active {
	animation: icon-button-shrink-bounce 300ms;
}

@keyframes icon-button-shrink-bounce {
	0% {
		transform: scale(1);
	}
	33% {
		transform: scale(0.9);
	}
	100% {
		transform: scale(1);
	}
}

/* keyboard button */

.keyboard-button-container {
	position: relative;
	z-index: 1;
}

.keyboard-button {
	position: absolute;
	top: 4px;
	right: -56px;
}

#board {
	position: absolute;
	right: -16px;
	top: 48px;
}

/* button */

input[type="button"],
input[type="submit"] {
	border-radius: 4px;
	background-color: #1e90ff;
	height: 48px;
	display: block;
	border: none;
	width: 100%;
	color: #fff;
	margin-top: 12px;
	font-size: 1rem;
	cursor: pointer;
	transition: outline 300ms;
}

input[type="button"]:active,
input[type="submit"]:active {
	animation: button-shrink-bounce 300ms;
}

input[type="button"]:disabled,
input[type="submit"]:disabled {
	color: rgba(255, 255, 255, 0.4);
	cursor: not-allowed;
}

@keyframes button-shrink-bounce {
	0% {
		transform: scale(1);
	}
	33% {
		transform: scale(0.97);
	}
	100% {
		transform: scale(1);
	}
}

/* text link */
.text-links {
	margin-top: 33px;
	display: flex;
	justify-content: center;
}

.text-links > a {
	color: #1e90ff;
	font-size: 1rem;
	text-decoration: none;
	outline: none;
}

.text-links > a + a {
	margin-left: 33px;
	position: relative;
}

.text-links > a + a::before {
	pointer-events: none;
	position: absolute;
	top: 0;
	bottom: 0;
	left: -17px;
	content: "";
	display: block;
	background-color: #ccc;
	width: 1px;
}

/* message */

.message {
	margin: 24px 0;
	font-size: 1rem;
}

.error-message {
	margin: 24px 0;
	font-size: 1rem;
	color: #f44336;
}

.error-message > a {
	color: #1e90ff;
	text-decoration: none;
	outline: none;
}

/* RWD */

@media (max-width: 1266px), (max-height: 634px) {
	html {
		background: none!important;
	}

	#left-block,
	#locale-container,
	#copyright,
	#application {
		display: none;
	}

	#main-block {
		justify-content: center;
	}

	/* for all browsers except IE */
	@supports not (-ms-high-contrast: none) {
		#main-block {
			height: auto;
		}
	}

	#tab {
		margin-top: 0;
	}
}
