/*
 *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree.
 */

.hidden {
  display: none;
}

a {
  color: #4285F4;
  text-decoration: none;
}

a:hover {
  color: #3B78E7;
  text-decoration: underline;
}

#room-link a {
  white-space: nowrap;
}

body {
  background-color: #333;
  color: #fff;
  font-family: 'Roboto', 'Open Sans', 'Lucida Grande', sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

#remote-canvas {
  display: none;
  height: 100%;
  margin: 0 auto;
  width: 100%;
}

div.warning {
  background-color: #a80202;
  color: black;
  font-weight: 400;
  opacity: .9;
}

#container {
  height: 100%;
  position: absolute;
}

#info-div {
  z-index: 3;
}

#room-link {
  margin: 0 0 29px 0;
}

#status {
  z-index: 4;
}

#videos {
  font-size: 0; /* to fix whitespace/scrollbars problem */
  height: 100%;
  pointer-events: none;
  position: absolute;
  transition: all 1s;
  width: 100%;
}

#videos.active {
  -moz-transform: rotateY(180deg);
  -ms-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
}

footer > div {
  background-color: black;
  bottom: 0;
  color: white;
  display: none;
  font-size: .9em;
  font-weight: 300;
  line-height: 2em;
  max-height: 80%;
  opacity: 0;
  overflow-y: auto;
  padding: 10px;
  position: absolute;
  transition: opacity 1s;
  width: calc(100% - 20px);
}

footer > div.active {
  display: block;
  opacity: .8;
}

div#privacy {
  bottom: 7px;
  color: gray;
  position: absolute;
  right: 10px;
}

div#privacy a {
  color: gray;
  font-size: 14px;
}

html {
  height: 100%;
  margin: 0;
  width: 100%;
}

label {
  margin: 0 10px 0 0;
}

#local-video {
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: cover;  /* no letterboxing */
  -moz-transform: scale(-1, 1);
  -ms-transform: scale(-1, 1);
  -o-transform: scale(-1, 1);
  -webkit-transform: scale(-1, 1);
  transform: scale(-1, 1);
  transition: opacity 1s;
  width: 100%;
}

#mini-video {
  border: 1px solid gray;
  bottom: 20px;
  left: 20px;
  /* video div is flipped horizontally when active*/
  max-height: 17%;
  max-width: 17%;
  opacity: 0;
  position: absolute;
  transition: opacity 1s;
}

#mini-video.active {
  opacity: 1;
  z-index: 2;
}

#remote-video {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: cover;  /* no letterboxing */
  opacity: 0;
  position: absolute;
  -moz-transform: rotateY(180deg);
  -ms-transform: rotateY(180deg);
  -o-transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
  transition: opacity 1s;
  width: 100%;
}

#remote-video.active {
  opacity: 1;
  z-index: 1;
}

#confirm-join-div {
  position: absolute;
  text-align: center;
  top: 80%;
  width: 100%;
  z-index: 5;
}

#confirm-join-div div {
  font-size: 1.5em;
  margin-bottom: 10px;
}

/*////// room selection start ///////////////////*/
#recent-rooms-list {
  list-style-type: none;
  padding: 0 15px;
}

button {
  background-color: #4285F4;
  border: none;
  border-radius: 2px;
  -webkit-box-shadow: 1px 1px 5px 0 rgba(0,0,0,.5);
  -moz-box-shadow: 1px 1px 5px 0 rgba(0,0,0,.5);
  box-shadow: 1px 1px 5px 0 rgba(0,0,0,.5);
  color: white;
  font-size: 0.8em;
  height: 2.75em;
  margin: 0 5px 20px 5px;
  padding: 0.5em 0.7em 0.5em 0.7em;
  width: 8em;
}

button:active {
  background-color: #3367D6;
}

button:hover {
  background-color: #3B78E7;
}

button:focus {
  -webkit-box-shadow: 0 10px 15px 0 rgba(0,0,0,.5);
  -moz-box-shadow: 0 10px 15px 0 rgba(0,0,0,.5);
  box-shadow: 0 10px 15px 0 rgba(0,0,0,.5);
  outline: none;
}

button[disabled] {
  background-color: rgb(30, 30, 30);
  background-color: rgba(255, 255, 255, 0.12);
  color: rgb(76, 76, 76);
  color: rgba(255, 255, 255, 0.3);
}

input[type=text] {
  background-color: transparent;
  border: none;
  border-bottom: solid 1px #4c4c4f;
  color: #fff;
  display: block;
  font-size: 1em;
  margin-right: 20px;
  padding:.4em 0;
  width: 100%;
}

input[type="text"]:focus {
  border-bottom: solid 2px #4285F4;
  outline: none;
}

input[type="text"].invalid {
  border-bottom: solid 2px #F44336;
}

label.error-label {
  color: #F44336;
  font-size: .85em;
  font-weight: 200;
  margin: 0;
}

#room-id-input-div {
  margin: 15px;
}

#room-id-input-buttons {
  margin: 15px;
}

h1 {
  font-weight: 300;
  margin: 0 0 0.8em 0;
  padding: 0 0 0.2em 0;
}

div#room-selection {
  margin: 3em auto 0 auto;
  padding: 1em 1.5em 1.3em 1.5em;
  width: 25em;
}

p {
  color: #eee;
  font-weight: 300;
  line-height: 1.6em;
}

/*////// room selection end /////////////////////*/

/*////// icons CSS start ////////////////////////*/

#icons {
  bottom: 77px;
  left: 6vw;
  position: absolute;
}

circle {
  fill: #666;
  fill-opacity: 0.6;
}

svg.on circle {
  fill-opacity: 0;
}

/* on icons are hidden by default */
path.on {
  display: none;
}

/* off icons are displayed by default */
path.off {
  display: block;
}

/* on icons are displayed when parent svg has class 'on' */
svg.on path.on {
  display: block;
}

/* off icons are hidden when parent svg has class 'on' */
svg.on path.off {
  display: none;
}

svg {
  border-radius: 48px;
  box-shadow: 2px 2px 24px #444;
  display: block;
  margin: 0 0 3vh 0;
  transform: translateX(calc(-6vw - 96px));
  transition: all .1s;
  transition-timing-function: ease-in-out;
}

svg:hover {
  box-shadow: 4px 4px 48px #666;
}

#icons.active svg {
  transform: translateX(0);
}

#mute-audio {
  transition: 40ms;
}

#mute-audio:hover,
#mute-audio.on {
  background: #407cf7;
}

#mute-audio:hover circle {
  fill: #407cf7;
}

#mute-video {
  transition: 120ms;
}

#mute-video:hover,
#mute-video.on {
  background: #407cf7;
}

#mute-video:hover circle {
  fill: #407cf7;
}

#switch-video {
  transition: 200ms;
}

#switch-video:hover {
  background: #407cf7;
}

#switch-video:hover circle {
  fill: #407cf7;
}

#fullscreen {
  transition: 280ms;
}

#fullscreen:hover,
#fullscreen.on {
  background: #407cf7;
}

#fullscreen:hover circle {
  fill: #407cf7;
}

#hangup {
  transition: 360ms;
}

#hangup:hover {
  background: #dd2c00;
}
#hangup:hover circle {
  fill: #dd2c00;
}

/*////// icons CSS end /////////////////////////*/

