$speaking-indicator-color: #45b29d;
.webcamPreview {
  display: flex;
  flex-direction: column;
  align-items: center;

  .mediaPreview {
    position: relative;
    margin: 0 auto;
    width: 300px;
    height: 210px;
    color: #666666;
    display: flex;

    @media only screen and (min-width: 420px) {
      width: 80%;
      max-width: 350px;
    }

    @media only screen and (min-width: 500px) {
      max-width: 380px;
    }

    .audioPreview {
      margin: 0 auto;
      h5 {
        padding: 15px;
      }
    }

    .pt-callout {
      text-align: center;
      max-height: 100%;

      &.pt-intent-warning {
        overflow-y: auto;
        overflow-x: hidden;
      }

      .detail {
        display: flex;
        flex-direction: row;
        flex-direction: row;
        align-items: center;
      }

      i {
        font-size: 2.0em;
        margin: 0 10px;
      }
    }
    .description {
      margin-top: 20px;
      font-size: 1.1em;
    }

    .videoStream {
      height: 100%;
      width: 100%;
      position: absolute;

      &.speaking video{
        border: 3px solid $speaking-indicator-color;
      }

      video {
        width: 100%;
        height: 100%;
        max-height: 100%;
        max-width: 100%;
        border-radius: 5px;
        border: 3px solid transparent;
        transition : border 500ms ease-out;
      }

      .videoMuteCover {
        top: 0;
        z-index: 5;
        position: absolute;
        height: 100%;
        width: 100%;
        background-color: white;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .speakingIndicator {
        opacity: 0;
        z-index: 10;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 5px;
        transition: opacity 0.5s ease-out;
        border-radius: 3px;
        background-color: #45b29d;
        will-change: opacity;
        &.speaking {
          opacity: 1;
        }
      }

      .controls {
        color: white;
        width: 80px;
        background-color: black;
        border-radius: 5px;
        // border-top-left-radius: 0px;
        // border-top-right-radius: 0px;
        height: 40px;
        position: absolute;
        bottom: -42px;
        left: calc(50% - 40px);
        // right: -40px;
        // top: calc(50% - 50px);
        overflow: hidden;
        user-select: none;
        z-index: 10;
        box-shadow: inset 0 0 0 1px rgba(16, 22, 26, 0.2), inset 0 -1px 0 rgba(16, 22, 26, 0.1);

        .control {
          cursor: pointer;
          display: inline-block;
          height: 40px;
          width: 40px;
          text-align: center;
          line-height: 40px;
          font-size: 1.2em;
          opacity: 0.95;

          &:active {
            opacity: 1.0;
          }

          transition: background-color 0.4s ease, opacity 0.4s ease;
          border-right: 1px solid white;

          &:last-child {
            border: none !important;
          }

          &.muted {
            background-color: indianred !important;
          }

          &.active {
            background-color: mediumseagreen;
          }

          &.error {
            background-color: darkred !important;
          }
        }
      }
    }
  }

  .settingControls {
    padding: 8px;
    background: honeydew;
    border-radius: 5px;
    margin-top: 5px;
    width: 320px;
    font-size: 1.1em;
    .control {
      padding: 2px;
      select {
        float: right;
      }
    }
  }
}

@keyframes growAndShrink {
  0% {
    transform: scale(1.05, 1.05);
  }
  50% {
    transform: scale(1.2, 1.2);
  }
  100% {
    transform: scale(1.05, 1.05);
  }
}
