@import './apps/commudle-admin/src/assets/styles/variables';

.user-video-container {
  height: 100%;
  position: relative;
  width: 100%;

  &:hover {
    .video-controls {
      opacity: 1;
      transition: opacity 0.6s ease-in-out;
    }
  }

  .video-controls {
    background-color: rgba($black, 0.3);
    border-radius: 32px;
    gap: $space-8;
    left: 50%;
    opacity: 0;
    padding: $space-8;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease-in-out;
    z-index: 2;
  }

  .user-video {
    border: 2px solid $black;
    border-radius: 10px;
    height: 100%;
    overflow: hidden;
    position: relative;
    width: 100%;

    &.speaker {
      border: 2px solid #21a15d;
    }

    .hidden {
      display: none;
    }

    video {
      height: 100%;
      object-fit: cover;
      width: 100%;
      z-index: 1;
    }

    .screen-share {
      object-fit: contain;
    }

    .user-avatar {
      transform: translate(-50%, -50%);
      @apply com-h-16 com-w-16 com-rounded-full com-object-cover;
      @apply com-absolute com-left-1/2 com-top-1/2 com-overflow-hidden;
    }
  }

  .user-name {
    background-color: rgba($black, 0.3);
    bottom: 0;
    color: $white;
    font-size: $fs-h5;
    left: 0;
    padding: $space-4;
    position: absolute;

    a {
      color: $white;
      text-decoration: none;
    }

    &:hover {
      background-color: rgba($black, 0.4);
    }

    nb-icon {
      font-size: $fs-h5;
    }
  }
}
