@use "../../variables" as v;

$bg: #3f464e;

.call {
  z-index: 27;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: slide_down_in 0.5s;
  .background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: v.$px1;
    display: flex;
    justify-content: center;
    align-items: center;
    .profpic {
      width: 150px;
      height: 150px;
      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        -o-object-fit: cover;
        -o-object-position: center;
        border-radius: 50%;
      }
    }
  }
  .videos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    .user {
      max-width: 100%;
      max-height: 100%;
    }
    .me {
      position: absolute;
      right: 20px;
      bottom: 20px;
      width: calc(30%);
      height: calc(30%);
      max-width: 150px;
      max-height: 200px;
      display: flex;
      justify-content: end;
      align-items: end;
      video {
        border-radius: 10px;
      }
    }
    .user,
    .me {
      video {
        width: fit-content;
        height: fit-content;
        max-width: 100%;
        max-height: 100%;
      }
    }
  }
  .btn {
    background-color: $bg;
    padding: 10px;
    border-radius: 50%;
    width: fit-content;
    height: fit-content;
  }
  .top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    .detail {
      display: flex;
      justify-content: left;
      align-items: center;
      gap: 10px;
      .caller {
        .ts {
          font-size: 0.8rem;
          color: v.$softwhite;
          text-shadow: v.$textshadow;
        }
        .displayname {
          text-shadow: v.$textshadow;
        }
      }
    }
    .act-info {
      width: fit-content;
      margin-right: 0;
      margin-left: auto;
      .card {
        margin-top: 10px;
        margin-left: auto;
        padding: 5px 10px;
        background-color: rgba($color: v.$px1, $alpha: 0.7);
        width: fit-content;
        border-radius: 10px;
      }
    }
  }
  .bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    .act-list {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      .call-act {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        background-color: #3f464e80;
        padding: 10px;
        border-radius: 10px;
        .btn {
          color: v.$white;
        }
        .btn-hangup {
          background-color: v.$sred;
        }
        .btn.active {
          background-color: v.$white;
          color: v.$sred;
        }
      }
      .call-act.disabled {
        opacity: 0;
      }
    }
  }
  &.minimized {
    background-color: v.$pm2;
    height: 35px;
    padding: 0 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    .background {
      display: none;
    }
    .videos {
      display: none;
    }
    .top {
      width: fit-content;
      position: relative;
      display: flex;
      justify-content: left;
      align-items: center;
      flex-direction: row-reverse;
      gap: 5px;
      padding: 0;
      .detail {
        .btn-minimize {
          display: none;
        }
        .caller {
          .displayname,
          .ts {
            display: inline;
            text-shadow: none;
          }
          .ts {
            margin-left: 1rem;
            text-shadow: none;
          }
        }
      }
      .act-info {
        margin-left: 0;
        display: flex;
        .card {
          margin-top: 0;
          padding: 0;
          background-color: #00000000;
          width: fit-content;
          span {
            display: none;
          }
        }
      }
    }
    .bottom {
      position: relative;
      width: fit-content;
      padding: 0;
      .act-list {
        justify-content: center;
        align-items: center;
        gap: 0;
        .call-act {
          gap: 0;
          background-color: #00000000;
          padding: 0;
          .btn {
            background-color: #00000000;
            padding: 0;
          }
          .btn:not(.active) {
            display: none;
          }
        }
        .call-act:has(.btn-hangup) {
          display: none;
        }
      }
    }
  }
  &.out {
    animation: slide_down_out 0.5s forwards;
  }
}
