/*=====================
  3.3  chatting CSS start
==========================*/
.msger {
    margin-top: 10px;
}

.msg {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;

    &:last-of-type {
        margin: 0;
    }
}

.msg-img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 100%;
}

.msg-bubble {
    max-width: 190px;
    padding: 15px;
    border-radius: 15px;
    background: var(--left-msg-bg);
    font-size: 14px;
    width: max-content;
    @media (max-width: 600px) {
        padding: calc(10px + (15 - 10) * ((100vw - 320px) / (600 - 320)));
    }
}

.msg-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.msg-info-name {
    margin-right: 10px;
    font-weight: bold;

    [dir="rtl"] & {
        margin-left: 10px;
        margin-right: unset;
    }
}

.msg-info-time {
    font-size: 0.85em;
}

.left-msg {
    .msg-img {
        margin-left: 10px;

        .icon {
            width: 30px;
            height: 30px;
            border-radius: 100%;
        }
    }

    .msg-bubble {
        border-bottom-left-radius: 0;
        background: rgba(var(--white), 1);
        border-radius: 6px 6px 6px 0px;
        color: rgba(var(--title-color), 1);
        width: calc(100% - 50px - 10px - 40px);
        margin-right: 0;
        width: max-content;

        [dir="rtl"] & {
            margin-left: 0;
            margin-right: unset;
        }
    }
}

.right-msg {
    flex-direction: row-reverse;

    .msg-bubble {
        background: rgba(var(--theme-color), 1);
        border-radius: 6px 6px 0px 6px;
        color: rgba(var(--white), 1);

        .msg-text {
            color: rgba(255, 255, 255, 1) !important;
        }
    }

    .msg-img {
        margin-left: 10px;

        [dir="rtl"] & {
            margin-left: unset;
            margin-right: 10px;
        }

        .icon {
            width: 30px;
            height: 30px;
            border-radius: 100%;
        }
    }
}

.msger-inputarea {
    display: flex;
    padding: 20px;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background-color: rgba(var(--white), 1);
    max-width: 600px;
    margin: 0 auto;

    * {
        border: none;
        border-radius: 3px;
        font-size: 1em;
    }
}

.msger-input {
    background-color: rgba(var(--box-bg), 1);
    backdrop-filter: blur(2px);
    padding: 15px 80px 15px 40px;
    font-weight: 400;
    font-size: 14px;
    width: 100%;
    color: rgba(var(--title-color), 1);
    border-radius: 6px;
    [dir="rtl"] & {
        padding: 15px 40px 15px 80px;
    }
    &::placeholder {
        color: rgba(121, 125, 131, 1);
    }

    &:focus {
        outline: none;
    }
}
.mic {
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    right: 70px;
    transform: translateY(-50%);
    --Iconsax-Size: 22px;
    --Iconsax-Color: rgba(var(--content-color), 1);
    cursor: pointer;
    [dir="rtl"] & {
        left: 70px;
        right: unset;
    }
}

.smile {
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    cursor: pointer;
    [dir="rtl"] & {
        left: unset;
        right: 30px;
    }
}
.msger-send-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 6px;
    [dir="rtl"] & {
        right: unset;
        left: 30px;
    }
    .icon-btn {
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        --Iconsax-Color: rgba(255, 255, 255, 1);
        --Iconsax-Size: 20px;
        background-color: rgba(var(--theme-color), 1);
    }
}
