#jsxc-video-dialog {
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 998;

  .jsxc-status {
    background-color: $video-status-bg;
    border-radius: 0.5em;
    color: $video-status-color;
    display: none;
    font-weight: bold;
    left: 50%;
    padding: 15px;
    position: absolute;
    text-align: center;
    top: 30px;
    transform: translateX(-50%);
    z-index: 9999;

    &--visible {
      display: block;
    }

    p {
      margin: 0;
    }

    p + p {
      margin-top: 0.5em;
    }
  }

  li .jsxc-name {
    cursor: auto;

    &:hover {
      color: $window-bar-color;
    }
  }

  &.jsxc-minimized {
    bottom: auto;
    box-shadow: 0 0 10px -5px #000;
    left: 10px;
    min-height: 120px;
    min-width: 160px;
    right: auto;
    top: 10px;

    .jsxc-video-container {
      z-index: 99;
    }

    .jsxc-local-video {
      bottom: 0;
      display: block;
      right: 0;
    }

    .jsxc-video-control {
      font-size: 16px;
      width: 22px;
    }

    .jsxc-minmax::before {
      content: map-get($jsxc-icons-map, "maximize");
    }

    .jsxc-fullscreen {
      display: none;
    }
  }
}

.jsxc-establishing,
.jsxc-ringing {
  &::after {
    background-color: rgba(0, 0, 0, 0.4);
    bottom: 0;
    left: 0;
    // content: " ";
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10;
  }
}

.jsxc-establishing::before {
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-name: jsxc-establishing;
  background-color: $establishing-color1;
  box-sizing: border-box;
  content: " ";
  display: block;
  height: 10px;
  left: 50%;
  margin-left: -20px;
  margin-top: -5px;
  position: absolute;
  top: 50%;
  width: 40px;
  z-index: 20;
}

.jsxc-ringing::before {
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-name: jsxc-ringing;
  background-color: $ringing-color1;
  border-radius: 50%;
  box-sizing: border-box;
  content: " ";
  display: block;
  height: 20px;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  position: absolute;
  top: 50%;
  width: 20px;
  z-index: 20;
}

.jsxc-video-container {
  background-color: $video-bg;
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;

  video {
    display: none;
  }

  .jsxc-no-remote-video {
    display: none;
  }

  &[data-videos="1"] {
    .jsxc-video-wrapper {
      height: 100%;
      width: 100%;
    }
  }

  &[data-videos="2"] {
    .jsxc-video-wrapper {
      height: 100%;
      width: 50%;
    }
  }

  &[data-videos="3"] {
    .jsxc-video-wrapper {
      height: 50%;
      width: 50%;

      &:last-child {
        height: 50%;
        width: 100%;
      }
    }
  }

  &[data-videos="4"] {
    .jsxc-video-wrapper {
      height: 50%;
      width: 50%;
    }
  }

  @media (min-width: 768px) {
    // right: 250px;

    .jsxc-controlbar {
      opacity: 0;
    }

    &:hover {
      .jsxc-controlbar {
        opacity: 1;
      }
    }
  }
}

.jsxc-video-wrapper {
  float: left;
  position: relative;
  text-align: center;
  white-space: nowrap;

  video {
    display: none;
  }

  &.jsxc-ice-connected {

    background-image: url("../images/camera_disabled_icon_white.svg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 10%;

    &::before {
      content: "";
      display: inline-block;
      height: 100%;
      margin-right: -0.25em;
      vertical-align: middle;
    }

    video {
      display: inline-block;
      max-height: 100%;
      max-width: 100%;
      vertical-align: middle;
      width: 100%;
    }

    &.jsxc-video-available {
      background-image: url("");
    }
  }
}

.jsxc-remote-video {
  @extend %fullscreen;
}

.jsxc-no-video {
  @extend %fullscreen;

  p {
    bottom: 0;
    color: $novideo-color;
    left: 0;
    position: absolute;
    text-align: center;
    width: 100%;
    z-index: 100;
  }

  > div {
    height: 200px;
    left: 50%;
    margin-left: -100px;
    margin-top: -100px;
    overflow: hidden;
    position: absolute;
    top: 50%;
    width: 200px;

    > div {
      background-color: $novideo-bg;

      &:first-child {
        border-radius: 50%;
        height: 50%;
        left: 50%;
        margin-left: -25%;
        position: absolute;
        top: 10%;
        width: 50%;
      }

      &:last-child {
        border-radius: 50%;
        bottom: -50%;
        height: 100%;
        position: absolute;
        width: 100%;
      }
    }
  }
}

.jsxc-local-video {
  background-color: $black;
  bottom: 10px;
  cursor: move;
  height: 120px;
  position: absolute;
  right: 10px;
  transform: rotateY(180deg);
  width: 160px;
  z-index: 9990;
}

div {
  &:full-screen {
    background-color: $black;
    height: 100%;
    width: 100%;

    &.jsxc-local-video {
      border: 1px solid $white;
    }
  }

  &:fullscreen {
    background-color: $black;
    height: 100%;
    width: 100%;

    &.jsxc-localvideo {
      border: 1px solid $white;
    }
  }

  &.jsxc-video,
  &.jsxc-audio {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 15px 15px;
    opacity: 0.4;

    &:not(.jsxc-disabled) {
      &:hover {
        opacity: 1;
      }
    }
  }

  &.jsxc-video {
    align-items: center;
    display: flex;
    justify-content: center;

    &::before {
      @extend %jsxc-icon-font;
      content: map-get($jsxc-icons-map, "camera");
    }

    &.jsxc-disabled::before {
      @extend %jsxc-icon-font;
      content: map-get($jsxc-icons-map, "camera-disabled");
    }
  }

  &.jsxc-audio {
    align-items: center;
    display: flex;
    justify-content: center;

    &::before {
      @extend %jsxc-icon-font;
      content: map-get($jsxc-icons-map, "pick-up");
    }

    &.jsxc-disabled::before {
      @extend %jsxc-icon-font;
      content: map-get($jsxc-icons-map, "pick-up-disabled");
    }
  }
}

.jsxc-controlbar {
  align-items: center;
  display: flex;
  justify-content: center;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 50px;
  transition: 1s opacity;
  z-index: 9995;

  &.jsxc-visible {
    opacity: 1;
  }

  > div {
    background-color: var(--jsxc-color-background-dark-translucent);
    border-radius: 22px;
    display: flex;
    height: 44px;
    padding: 0 5px;
  }

  .jsxc-video-control {
    @extend %jsxc-icon-font;
    align-items: center;
    color: var(--jsxc-color-main-background);
    cursor: pointer;
    display: flex;
    font-size: 23px;
    height: 44px;
    justify-content: center;
    margin: 0 5px;
    opacity: 0.6;
    width: 44px;

    &:hover {
      opacity: 1;
    }
  }

  .jsxc-hang-up::before {
    color: var(--jsxc-color-error);
    content: map-get($jsxc-icons-map, "hang-up");
  }

  .jsxc-microphone {
    &::before {
      content: map-get($jsxc-icons-map, "microphone");
    }

    &.jsxc-disabled::before {
      content: map-get($jsxc-icons-map, "microphone-disabled");
    }
  }

  .jsxc-fullscreen::before {
    content: map-get($jsxc-icons-map, "fullscreen");
  }

  .jsxc-minmax::before {
    content: map-get($jsxc-icons-map, "minimize");
  }

  .jsxc-showchat {
    float: right;
  }

  @media (min-width: 768px) {
    bottom: 5%;
    top: initial;
  }
}

.jsxc-buttongroup {
  display: inline;

  button {
    &:first-child {
      border-bottom-right-radius: 0;
      border-top-right-radius: 0;
      margin-right: 0;
    }

    &:last-child {
      border-bottom-left-radius: 0;
      border-top-left-radius: 0;
      margin-left: 0;
    }
  }
}

.jsxc-chatarea {
  background-color: $window-bg;
  bottom: 0;
  display: none;
  position: absolute;
  right: 0;
  top: 0;
  width: 250px;

  .jsxc-settings {
    display: none !important;
  }

  .jsxc-close {
    display: none !important;
  }

  .jsxc-video {
    display: none !important;
  }

  .jsxc-window {
    bottom: 0;
    box-shadow: none;
  }

  > ul {
    height: 100%;
    list-style: none;
    padding: 0;
    width: 100%;
  }

  @media (min-width: 768px) {
    // display: block;
  }
}

.jsxc-fullscreen.jsxc-localvideo {
  border: 1px solid $white;
}

.jsxc-video-suitable .jsxc-name {
  font-style: italic;
}
