/*
# 変数定義

## カラーパレット
*/
/*
# タッチデバイス向けの指定
*/
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}
input,
.message {
  -webkit-user-select: auto;
}
body {
  -webkit-text-size-adjust: 100%;
}
/*
** ボタンにオレンジの枠線が表示されないようにするために指定。
Chrome for Android で、しかし、ヘッダとフッタが、フレンドリストやチャットの背後に
表示される不具合が発生した場合は、コメントアウトすること。 **
*/
button:focus {
  outline: none;
}
/*
# デフォルトスタイルの上書き、ノーマライズ

## レイアウト用
*/
* {
  box-sizing: border-box;
}
html {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, Arial, san-serif;
  overflow: hidden;
}
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #ffffff;
}
/*
## ボタンのデフォルトスタイルの上書き
*/
button {
  -webkit-appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
}
/*
# ページを実現するための指定
*/
#pages {
  margin: 0;
  width: 100%;
  height: 100%;
  -webkit-transition: -webkit-transform 0.2s ease-out 0s;
}
.showing-chat-page #pages {
  -webkit-transform: translateX(0%);
}
.showing-dial-page #pages {
  -webkit-transform: translateX(-100%);
}
.page {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: absolute;
}
#chatPage {
  left: 0%;
  top: 0;
}
#dialPage {
  left: 100%;
  top: 0;
}
/*
# ページ内部の指定
*/
/*
## チャットページ内部の指定
*/
#chatContainer {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}
#chatContainer {
  padding-bottom: 110px;
}
#chatContainer hr {
  margin-top: 25px;
  margin-bottom: 15px;
  border: 0;
  width: 80%;
  height: 1px;
  background-image: -webkit-linear-gradient(left, rgba(112, 127, 134, 0), #707f86 40%, #707f86 60%, rgba(112, 127, 134, 0));
}
#chatContainer .datetime {
  font-size: 12px;
  text-align: center;
  color: #707f86;
  margin: 20px 0 5px;
  line-height: 14px;
}
#chatContainer .datetime time,
#chatContainer .datetime address {
  display: inline;
  height: 14px;
  font-style: normal;
  padding: 0 5px;
}
/*
### 吹き出し
*/
.message-wrapper {
  position: relative;
}
.message {
  font-size: 14px;
  padding: 5px 10px;
  width: 60%;
  border-radius: 20px;
  line-height: 21px;
  -webkit-transition: all 0.2s ease-out 0s;
}
.my.message {
  margin: 5px 15px 15px auto;
  color: #ffffff;
  background-color: #8d8ab5;
  /*
  ** 吹き出しのデザインをやめる場合は、以下を有効にする。
  */

  /*
  border-bottom-right-radius: 0;
  */

}
.your.message {
  margin: 5px auto 15px 15px;
  background-color: #d5d8d9;
  /*
  ** 吹き出しのデザインをやめる場合は、以下を有効にする。
  */

  /*
  border-bottom-left-radius: 0;
  */

}
.my.message.current {
  color: #ffffff;
  background-color: #c6c4da;
}
.your.message.current {
  color: #707f86;
  background-color: #eaebec;
}
/*
** 吹き出しの残像が残る不具合や、チャットのスクロールができなくなる不具合が発生した時は、
:after と :before を使った吹き出しをコメントアウトすること。
ここから**
*/
.message:after {
  content: '';
  position: absolute;
  height: 40px;
  width: 40px;
  border-radius: 20px;
  z-index: -1;
  background-color: #ffffff;
  bottom: -12px;
}
.message:before {
  content: '';
  position: absolute;
  height: 40px;
  width: 40px;
  border-radius: 20px;
  z-index: -1;
  bottom: -10px;
}
.my.message:after {
  right: -3px;
}
.my.message:before {
  background-color: #8d8ab5;
  right: 10px;
}
.my.message.current:before {
  background-color: #c6c4da;
  right: 10px;
}
.your.message:after {
  left: -3px;
}
.your.message:before {
  background-color: #d5d8d9;
  left: 10px;
}
.your.message.current:before {
  background-color: #eaebec;
  left: 10px;
}
/*
** 吹き出しの残像が残る不具合や、チャットのスクロールができなくなる不具合が発生した時は、
:after と :before を使った吹き出しをコメントアウトすること。
ここまで**
*/
.edited {
  font-style: italic;
  text-decoration: underline;
}
/*
### フッタのボタン
*/
.button-wrapper {
  position: absolute;
  left: 0;
  bottom: 56px;
  width: 100%;
  padding: 9px 0;
  height: 54px;
  background-color: rgba(255, 255, 255, 0.9);
  text-align: center;
  opacity: 0;
  z-index: -100;
  -webkit-transition: all 0.2s linear 0s;
}
.button-wrapper button {
  width: 160px;
  height: 36px;
  font-size: 18px;
  line-height: 36px;
  border-radius: 10px;
}
.online #dialPage .button-wrapper {
  opacity: 1;
  z-index: 100;
}
.connected #chatPage .button-wrapper {
  opacity: 1;
  z-index: 100;
  background-color: rgba(199, 22, 30, 0.5);
}
#disconnectButton {
  color: #ffffff;
  background-color: #c7161e;
}
/*
## タブバー
*/
.tab-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 4px 0 5px 0;
  height: 56px;
  background-color: rgba(245, 245, 246, 0.9);
  text-align: center;
  border-top: 1px #d5d8d9 solid;
  opacity: 1;
  z-index: 100;
  -webkit-transition: all 0.2s linear 0s;
}
.tab-bar button {
  display: inline-block;
  margin: 0 50px;
  width: 46px;
  height: 46px;
  color: #004386;
  line-height: 1;
}
.tab-bar button .glyphicon {
  font-size: 28px;
  line-height: 32px;
}
.tab-bar button .button-label {
  font-size: 12px;
  line-height: 14px;
}
.showing-dial-page .dial-button {
  color: #707f86;
}
.showing-chat-page .back-button {
  color: #707f86;
}
/*
## ダイアルページの指定
*/
#anotherIdWrapper {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px #d5d8d9 solid;
  z-index: 100;
}
#anotherIdWrapper #anotherId {
  display: block;
  width: 100%;
  height: 100%;
  font-size: 24px;
  text-align: center;
  border: 0;
  padding: 0;
}
#dialPad {
  position: absolute;
  left: 0;
  top: -45px;
  /* = (50 - 30 - 50 - 60) / 2 */

  width: 100%;
  height: 100%;
}
#dialPad #dialPadInner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
}
#dialPad table {
  position: absolute;
  left: -105px;
  top: -140px;
  /* =  - 280 / 2 */

  margin: 0;
  padding: 0;
  border-spacing: 0;
  border-collapse: collapse;
  width: 210px;
  height: 280px;
}
#dialPad table tr td {
  width: 70px;
  height: 70px;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
}
#dialPad .number-button {
  border: 1px solid #707f86;
  width: 60px;
  height: 60px;
  border-radius: 50px;
  font-size: 24px;
  color: #707f86;
  -webkit-transition: all 0.5s linear 0s;
}
#dialPad .number-button:active {
  background: #8d8ab5;
  border-color: #8d8ab5;
  -webkit-transition: none;
}
#yourIdWrapper {
  position: absolute;
  left: 0;
  bottom: 110px;
  width: 100%;
  height: 30px;
  text-align: center;
  font-size: 18px;
  line-height: 30px;
}
#yourIdWrapper #yourId {
  -webkit-appearance: none;
  width: 9em;
  height: 30px;
  color: #c7161e;
  border: 0;
  margin: 0;
  padding: 4px;
  text-align: center;
}
#callButton {
  color: #ffffff;
  background-color: #18933b;
}
/*
# モーダルダイアログを実現するための指定
*/
.modal {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: absolute;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, 0.2);
  -webkit-transition: all 0.2s ease-out 0s;
  -webkit-transform: perspective(1000px) translateZ(1001px);
  /*
  ** transform: translateZ() だけでモーダルを非表示にすると、<body> に overflow: hidden を
  適用しているのにも関わらずスクロールできてしまうという、WebKitのバグが存在することがわかった。
  バグに対処するため、モーダルが非表示のときは display: none を設定する。**
  */

  display: none;
  opacity: 0;
  z-index: 200;
}
.showing-incoming-modal #incomingModal,
.showing-error-modal #errorModal {
  -webkit-transform: perspective(1000px) translateZ(0px);
  opacity: 1;
}
.dialog-wrapper {
  position: absolute;
  left: 50%;
  top: 50%;
}
.dialog {
  position: absolute;
  left: -140px;
  top: -105px;
  background-color: rgba(255, 255, 255, 0.9);
  width: 280px;
  height: 187px;
  border-radius: 10px;
}
.dialog h1 {
  position: absolute;
  left: 0;
  top: 15px;
  margin: 0;
  width: 100%;
  font-size: 18px;
  line-height: 21px;
  text-align: center;
}
.dialog p {
  position: absolute;
  left: 0;
  top: 51px;
  margin: 0;
  width: 100%;
  font-size: 14px;
  line-height: 21px;
  text-align: center;
}
.dialog button {
  position: absolute;
  bottom: 15px;
  display: block;
  width: 117px;
  height: 36px;
  font-size: 18px;
  line-height: 36px;
  border-radius: 10px;
}
.dialog #rejectButton {
  left: 15px;
  color: #ffffff;
  background-color: #c7161e;
}
.dialog #acceptButton {
  right: 15px;
  color: #ffffff;
  background-color: #18933b;
}
.dialog #closeButton {
  left: 81px;
  color: #ffffff;
  background-color: #18933b;
}
