.chat-wrapper {
    position: absolute;
    width: 0;
    height: 0;
    z-index: 998;
}

.chat-wrapper:hover {
    width: 400px;
    height: 250px;
}

.not-read::after {
    content: "";
    top: 5px;
    left: 40px;
    width: 8px;
    height: 8px;
    position: absolute;
    display: block;
    border-radius: 100%;
    background-color: #a924d9;

    -webkit-animation: not-read-circle 0.8s ease-in-out infinite both;
    animation: not-read-circle 0.8s ease-in-out infinite both;
}

.chat-img {
    width: 50px;
    height: 50px;
    cursor: move;
}

.chat-container-anchor {
    position: relative;
    width: 100%;
    height: 100%;
}

.chat-container-head {
    width: 100%;
    height: 45px;
    top: 0;
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.chat-name {
    text-shadow: 0px 0px 40px #fff;
    font-family: "Montserrat", sans-serif;
    font-weight: 900;
    font-size: 22px;
}

.chat-pinned {
    height: 7px;
    width: 7px;
    font-size: 12px !important;
    color: #359cf9;
}

.chat-container {
    top: 30px;
    left: 25px;
    position: absolute;
    width: 0px;
    height: 0px;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    
    transform: skewX(90deg) scale(0);
    transform-origin: top left;

    transition-duration: 150ms;
    transition-property: visibility transform;
}

.chat-container.open-left {
    transform: skewX(90deg) scale(0) translateX(-100%);
}

.chat-container.open-top {
    transform: skewX(90deg) scale(0) translateY(-100%);
}

.chat-container.open-top-left {
    transform: skewX(90deg) scale(0) translateX(-100%) translateY(-100%);
}

.chat-wrapper:hover .chat-container,
.chat-wrapper.opened .chat-container {
    width: 400px;
    height: 300px;
    visibility: visible;
    transform: skewX(0deg) scale(1);
}


.chat-wrapper:hover .chat-container.open-left,
.chat-wrapper.opened .chat-container.open-left {
    transform: skewX(0deg) scale(1) translateX(-100%);
}

.chat-wrapper:hover .chat-container.open-top,
.chat-wrapper.opened .chat-container.open-top {
    transform: skewX(0deg) scale(1) translateY(-100%);
}

.chat-wrapper:hover .chat-container.open-top-left,
.chat-wrapper.opened .chat-container.open-top-left {
    transform: skewX(0deg) scale(1) translateX(-100%) translateY(-100%);
}

.chat-messages {
    width: calc(100% - 20px);
    height: 100%;
    margin: 0 10px;
    overflow-x: hidden;
    overflow-y: scroll;
}

.chat-sender {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    width: min-content;
    margin: 0;
    
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
}

.chat-timestamp {
    margin: 0;
    margin-left: 2px;
    
    font-size: 8px;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
}

.chat-message {
    position: relative;
    padding: 6px 10px;
    width: max-content;
    max-width: 300px;
    min-width: 75px;
    margin: 0;
    margin-bottom: 3px;

    transition-property: transform;
    transition-duration: 200ms;
}

.chat-message::after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    right: auto;
    top: 0;
    bottom: auto;
    border: 6px solid;
}

.chat-message:first-of-type {
    margin-top: 45px;
}

.chat-message:last-of-type {
    margin-bottom: 60px;
}

.chat-message-sended {
    background-color: #359cf9a0;
    margin-right: 10px;
    margin-left: auto;
    border-radius: 5px 0 5px 5px;
    transform-origin: top right;
}

.chat-message-sended::after {
    border-top-color: #359cf9a0;
    border-right-color: #359cf9a0;
    border-bottom-color: transparent;
    border-left-color: transparent;
    right: -12px;
    transform: scaleX(-1);
}

.chat-message-received {
    background-color: #a924d9a0;
    margin-left: 10px;
    margin-right: auto;
    border-radius: 0 5px 5px 5px;
    transform-origin: top left;
}

.chat-message-received::after {
    border-top-color: #a924d9a0;
    border-right-color: #a924d9a0;
    border-bottom-color: transparent;
    border-left-color: transparent;
    left: -12px;
}

.chat-message-sending {
    transform: scale(0);
}

.chat-text {
    margin: 0;

    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.chat-buttons {
    width: 375px;
    display: flex;
    margin: 12.5px;
    bottom: 0;
    position: absolute;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;

    color: #fff;
    border-radius: 15px;
    box-shadow: 0 0 25px #00000025;
}

.chat-text-input {
    width: calc(100% - 45px) !important;
    height: 30px !important;
    border-radius: 10px;
    font-size: 13px !important;

    padding-inline-start: 10px !important;
    padding-inline-end: 10px !important;
}

.chat-send-button {
    margin-left: -12.5px;
    transform: scale(.9);
    cursor: pointer;
    opacity: .75px;

    color: #252525;
    line-height: 35px;
    
    transition-duration: 300ms;
    transition-property: all;
}

.chat-send-button.submit-valid {
    color: #359cf9;
}

.chat-send-button.submit-valid:hover {
    color: #359cf9;
    background-color: #359cf920;
    border-radius: 5px;
}

.chat-send-button.submit-valid:active {
    transform: scale(0.75);
}

@-webkit-keyframes not-read-circle {
    0% {
      -webkit-transform: scale(0.6);
              transform: scale(0.6);
      opacity: 0.8;
    }
    80% {
      -webkit-transform: scale(1.6);
              transform: scale(1.6);
      opacity: 0;
    }
    100% {
      -webkit-transform: scale(2.6);
              transform: scale(2.6);
      opacity: 0;
    }
  }
  @keyframes not-read-circle {
    0% {
      -webkit-transform: scale(0.6);
              transform: scale(0.6);
      opacity: 0.8;
    }
    80% {
      -webkit-transform: scale(1.6);
              transform: scale(1.6);
      opacity: 0;
    }
    100% {
      -webkit-transform: scale(2.6);
              transform: scale(2.6);
      opacity: 0;
    }
  }