*,
*::after,
*::before {
  box-sizing: border-box;
}

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;
  font-size: 20px;
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

header {
  background: #961010;
  margin: 0;
  padding: 1em 0;
  position: absolute;
  text-align: center;
  top: 0;
  width: 100%;
  z-index: 1;
}

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

div.warning {
  background-color: #a80202;
  color: black;
  font-weight: 400;
  opacity: 0.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);
}

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

label {
  margin: 0 10px 0 0;
}
label.title {
  display: block;
  margin-bottom: 0.55rem;
}

#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;
}

button {
  background-color: hsl(187deg 100% 24%);
  border: none;
  border-radius: 2px;
  color: white;
  font-size: 1rem;
  height: 2.75em;
  padding: 0.5em 1.5em;
  cursor: pointer;
}

button:hover,
button:focus-within {
  background-color: hsl(187deg 100% 27%);
}

button:focus-within {
  -webkit-box-shadow: 0 0 2px 5px hsl(187deg 100% 24% / 50%);
  -moz-box-shadow: 0 0 2px 5px hsl(187deg 100% 24% / 50%);
  box-shadow: 0 0 2px 5px hsl(187deg 100% 24% / 50%);
  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 2px #4c4c4f;
  color: #fff;
  display: inline-block;
  font-size: 1.6rem;
  padding: 0;
  margin-right: 1em;
  align-self: end;
}

input[type="text"]:focus {
  border-bottom: solid 2px hsl(187deg 100% 24%);
  outline: none;
}

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

label.error-label {
  color: #f44336;
  font-size: 0.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;
}

.centered {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.container {
  display: block;
}

.screen-share {
  display: none;
}

.hidden {
  display: none;
}

.screen-share.active {
  display: block;
  flex: 4 1 0;
  margin-right: 0.25rem;
}

.video-position {
  display: grid;
  grid-gap: 0.25rem;
  justify-items: center;
  justify-content: center;
  /*overflow: hidden;*/
}

#video-chat-container {
  /* width: 100%; */
  height: 100%;
  margin: auto;
  align-items: center;
  inline-size: fit-content;
  flex: 2 1 0;
}
#video-chat-container > div {
  position: relative;
  display: flex;
  /* width: 100%; */
  height: 100%;
}
#room-selection-container > img {
  height: 25vh;
  margin-right: 2rem;
  object-fit: contain;
}
#local-video,
#preview-video {
  transform: rotateY(-180deg);
}

.preview-video {
  display: block;
  margin: auto;
  margin-bottom: 2rem;
}

.chat-video {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}
.unmuted > .video-info {
  display: none;
}
.video-info {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: center;
  bottom: 5px;
}
.muted-indicator {
  background-color: #f00;
  border-radius: 50%;
  padding: 0.25rem;
}

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

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

#icons {
  bottom: 10px;
  left: 30px;
  position: fixed;
}

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;
}

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

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

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

#icons.active #hangup {
  transform: translateX(0) scale(1.3);
}

#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;
}
#screen-share.off {
  display: block;
}

#screen-share:hover,
#screen-share.on {
  background: #407cf7;
}
#screen-share:hover circle {
  fill: #407cf7;
}
#hangup {
  margin-top: 3.9vh;
  transition: 360ms;
}

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

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