/*
 * dgod: don't need the font just now
 */

@font-face {
  font-family: 'Keyboard Symbols';
  font-weight: 600;
  src: url('fonts/Keyboard-Symbols.ttf');
}

/* Reset */
* {
  margin: 0;
  padding: 0;  
  -webkit-tap-highlight-color: rgba(255,255,255,0);
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: rgba(0, 0, 0, 0);
  outline: none;
}

html {
  pointer-events: none;
}

body {
  overflow: hidden;
}

button::-moz-focus-inner {
  padding: 0;
  border: 0;
}

.keyboard-key:focus {
	outline: none;
}

/* Keyboard */
#keyboard {
  position: absolute;
  /* dgod: remove bottom, else android not show the keyboard */
  /* bottom: 0; */
  z-index: 15;
  width: 100%;
  background: #6a6f73;
  border-top: solid 1px #000;
  pointer-events: auto;
}

/* Rows */
.keyboard-row {
  width: 100%;
  white-space: nowrap;
  text-align: center;
  margin: 0 1px;
}

.keyboard-row.first-row {
  /* dgod 0.5 is too big, 0.3 may better */
  padding-top: 0.1rem;
  border-top: solid 1px #a6a9ab;
}

/* Buttons: logic keys */
.keyboard-key {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
  /* dgod work around webkit bug */
  /*padding: 0 0.1rem;*/
  padding: 0 1px;
  background: none;
  /*min-width: 2.6rem;*/
  display: inline-block;
  border: none;
  border-bottom: 0.2rem solid transparent;
}

/* Visible keys */
.keyboard-key > .visual-wrapper {
  display: inline-block;
  height: 3.8rem;
  margin-bottom: -0.3rem;
  width: 100%;
  /* dgod use the better name */
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
  position: relative;
  border: solid 1px #000;
  background-size: 100% 100%;
  background-color: #262422;
}

/* Standard key styles. */
.keyboard-key > .visual-wrapper > span {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  right: -1px;
  font: 2.4rem/3.5rem Sans-serif;
  font-weight: 500;
  text-align: center;
  color: #ddd;
  /* dgod: center and let button big */
  padding-top: 0.3rem;
  padding-bottom: 0.2rem;
}

/* Highlights */
.keyboard-key:not(.special-key).highlighted {
  position: relative;
  z-index: 100;
}
.keyboard-key:not(.special-key).highlighted > .visual-wrapper {
  background: #6ec5d5;
  border: solid 1px #8BD1DD;
  border-top: none;
  margin: -0.3rem 0 0;
  /*height: 5.0rem;
  bottom: 0.3rem;*/
  height: 4.8rem;
  bottom: 0.0rem;
}

.keyboard-key:not(.special-key).highlighted > .visual-wrapper:after {
  content: "";
  position: absolute;
  left: -0.3rem;
  top: 0.3rem;
  bottom: -0.3rem;
  right: -0.3rem;
  z-index: -1;
  background-color: #363839;
}
.keyboard-key:not(.special-key).highlighted:last-child > .visual-wrapper:after {
  right: -0.2rem;
}
.keyboard-key:not(.special-key).highlighted > .visual-wrapper:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.5rem;
  background: #6ec5d5;
  z-index: 1;
} 

.keyboard-key:not(.special-key).highlighted > .visual-wrapper > span {
  font: 2.4rem/3.5rem Sans-serif;
  font-weight: 500;
  background: #6ec5d5;
  color: #1a3f46;
  border: solid 1px #8BD1DD;
  top: -4.6rem;
  height: 4rem;
  left: -0.8rem;
  right: -0.8rem;
}

.keyboard-key:not(.special-key).highlighted > .visual-wrapper > span:after {
  content: "";
  position: absolute;
  left: -0.3rem;
  top: -0.3rem;
  bottom: -0.3rem;
  right: -0.3rem;
  z-index: -1;
  background-color: #363839;
}

.keyboard-key:not(.special-key).highlighted:last-child > .visual-wrapper > span:after {
  right: -0.2rem;
}

.keyboard-key:not(.special-key).highlighted:last-child  > .visual-wrapper > span {
  right: -1px;
}

.keyboard-key:not(.special-key).highlighted:first-child  > .visual-wrapper > span {
  left: -1px;
}

/*  Special keys */
.keyboard-key.special-key > .visual-wrapper {
  border-color: #2a2c2e;
  background: #43474a;
}
.keyboard-key.special-key > .visual-wrapper > span { 
  color: #ccc;
  font: 2.4rem/3.5rem 'Keyboard Symbols', Sans-serif;
}
.keyboard-key[data-keycode='-2'] > .visual-wrapper > span {
  font: 600 2.4rem/3.5rem Sans-serif;
}

/* Highlight for special keys */
.keyboard-key.special-key.highlighted {
  position: relative;
  z-index: 100;
}
.keyboard-key.special-key.highlighted > .visual-wrapper {
  background: #6ec5d5;
  border: solid 1px #8BD1DD;
  border-top: none;
  margin: -0.5rem 0 0;
  /*height: 5.0rem;
  bottom: 0.3rem;*/
  height: 4.8rem;
  bottom: 0.0rem;
  
}

.keyboard-key.special-key.highlighted > .visual-wrapper:after {
  content: "";
  position: absolute;
  left: -0.3rem;
  top: 0.3rem;
  bottom: -0.3rem;
  right: -0.3rem;
  z-index: -1;
  background-color: #363839;
}
.keyboard-key.special-key.highlighted:last-child > .visual-wrapper:after {
  right: -0.2rem;
}
.keyboard-key.special-key.highlighted > .visual-wrapper:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.5rem;
  background: #6ec5d5;
  z-index: 1;
} 

.keyboard-key.special-key.highlighted > .visual-wrapper > span {
  font: 2.4rem/3.5rem 'Keyboard Symbols', Sans-serif;
  font-weight: 500;
  background: #6ec5d5;
  color: #1a3f46;
  border: solid 1px #8BD1DD;
  height: 4rem;
  top: -4.6rem;
  left: -0.8rem;
  right: -0.8rem;
}
.keyboard-key.highlighted[data-keycode='-2'] > .visual-wrapper > span {
  font: 600 2.4rem/3.5rem Sans-serif;
}

.keyboard-key.special-key.highlighted > .visual-wrapper > span:after {
  content: "";
  position: absolute;
  left: -0.3rem;
  top: -0.3rem;
  bottom: -0.3rem;
  right: -0.3rem;
  z-index: -1;
  background-color: #363839;
}
.keyboard-key.special-key.highlighted:last-child > .visual-wrapper > span:after {
  right: -0.2rem;
}

.keyboard-key.special-key.highlighted:last-child  > .visual-wrapper > span {
  right: -1px;
  border-bottom-right-radius: 0;
}

.keyboard-key.special-key.highlighted:first-child  > .visual-wrapper > span {
  left: -1px;
  border-bottom-left-radius: 0;
}

.keyboard-key.highlighted[data-keycode="32"] > .visual-wrapper {
  border: solid 1px #3f5459;
  /*border-radius: 0.3rem;*/
  background: #4AB6CB;
  height: 4.4rem;
  bottom: 0;
}

.keyboard-key.highlighted[data-keycode="32"] > .visual-wrapper > span  {
  /*border: none;
  border-top: solid 1px #514e4d;
  background: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 100%;*/
  display:none;
}

.keyboard-key.highlighted[data-keycode="32"] > .visual-wrapper:after,
.keyboard-key.highlighted[data-keycode="32"] > .visual-wrapper:before,
.keyboard-key.highlighted[data-keycode="32"] > .visual-wrapper > span:after {
  display: none;
}

.keyboard-key.highlighted2 {
  padding: 0 0;
}

.keyboard-key.highlighted2 >.visual-wrapper {
  border: solid 0.3rem #4AB6CB;
}

.keyboard-key.highlighted2.alt-show >.visual-wrapper {
  border: solid 0.3rem #E35900;
}

.keyboard-key.highlighted2 .alt-note {
  visibility: hidden;
}

/* Key states */
/* Active */
.keyboard-key.kbr-key-active > .visual-wrapper > span {
  color: #4495A8;
}
/* Hold */
.keyboard-key.kbr-key-hold> .visual-wrapper {
  background: #4AB6CB;
  border: solid 1px #3f5459;
}
.keyboard-key.kbr-key-hold> .visual-wrapper > span {
  background: none;
  color: #1e4a52;
 }


/* IMEs */

#keyboard-candidate-panel {
  height: 4.3rem;    备选字框高低
  overflow: auto;
  white-space: nowrap;
  color: black;
  background: rgb(176, 174, 168);
  border-top: 1px solid #e8e8ff;
  /*border-bottom: 1px solid #808098;*/
  border-bottom: 0px solid #808098;
  display: none;
}

#keyboard.candidate-panel #keyboard-candidate-panel {
  display: block;
  width: 100%;
  overflow-y: hidden;
}

#keyboard-candidate-panel span {
  /*border-left: 1px solid #e8e8ff;
  border-right: 1px solid #808098;*/
  font-size: 2.5rem;     备选字体大小
  line-height: 3.7rem;  备选字离顶部距离，越大越低
  min-width: 3rem;
  display: inline-block;
  padding: 0.3rem 10px;
  text-align: center;
}

#keyboard-candidate-panel span.first {
 /*color: #E35900;*/
 color: #c35000;
}

#keyboard-candidate-panel span label.codetip {
 color: #008;
}

#keyboard-candidate-panel span[data-active="1"] {
  background: rgb(161,158,153);
}

.alt-note {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  color: #999;
  font: 1.1rem/1.1rem Sans-serif;
}

.keyboard-key.highlighted .alt-note {
  visibility: hidden;
}

#keyboard-candidate-panel .tool:last-child {
  color: #43474a;
  float: right;
}

#keyboard-candidate-panel .tool:not(last-child) {
  color: #43474a;
  float: left;
}

.emoji{
	position: absolute;
	border-top: 1px solid #a6a9ab;
	background: #6a6f73;
	z-index: 99;
	overflow-y: auto;
	overflow-x: hidden;
	pointer-events: auto;
}

.emoji button{
  background: #262422;
  color: #ddd;
  font: 2.4rem/3.5rem Sans-serif;
  border: 1px solid #000;
  display: inline-block;
  border-radius: 0px;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.emoji button:active{
	background-color:#6ec5d5;
	color: #000;
}

.editor{
	position: absolute;
	border-top: 1px solid #a6a9ab;
	background: #262422;
	z-index: 99;
	overflow-y: auto;
	overflow-x: hidden;
	pointer-events: auto;
}

.editor button{
  position: absolute;
  background: #262422;
  width: 6rem;
  color: #ddd;
  font: 2.4rem/3.5rem Sans-serif;
  border: 1px solid #000;
  display: inline-block;
  border-radius: 0px;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.editor button.arrow{
	width:4.2rem;
}

.editor button.select{
	width: 4.2rem;
}

.editor button.select.selected{
	background-color:#6ec5d5;
	color: #000;
}

.editor button:active{
	background-color:#6ec5d5;
	color: #000;
}

#keyboard-code-panel{
	position:fixed;
	left: 1rem;
	top: 0.4rem;
	background: rgba(255,255,255,0.6);
	white-space:nowrap;
}

#keyboard-code-panel .code-got{
	color: #000;
	font: 1rem;
}

#keyboard-code-panel .code-text{
	color: #000;
	font: 1rem;
}

#keyboard-code-panel .code-caret{
	color: #000;
	border: 1px solid #080;
}

#keyboard-candidate-panel .tool.landscape{
  color: #eee;
}

#keyboard-candidate-panel span.landscape {
  color: #eee;
  float: left;
}

#keyboard.candidate-panel #keyboard-candidate-panel.landscape{
  float:right;
  width:calc(30% - 2px);
  height:100%;
  padding-top:0.6rem;
  background-color:#262422;
  border:1px solid #808098;
  padding:0px;overflow:auto;
}

#keyboard-code-panel.landscape{
  left:calc(70% + 1rem);
}

#keyboard #keyboard-key.landscape{
  float:left;
  width:70%;
}
