app/(default-layout)/conversation/[[...id]]/conversation.module.scss
@use '/app/scss/mixins.scss' as *;

@keyframes fadeIn {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

.right-side {
    height: 100%;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.content {
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    // z-index: 1;
}

// right

.right-side {
    width: 0;
    border-left: var(--solid-border);
    // transition: all 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
    position: relative;

    @include respond-to('laptop') {
        position: absolute;
        right: 0;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        border: none;
        background-color: var(--background);
        z-index: 10;
    }

    @include respond-to('mobile') {
        position: absolute;
        right: 0;
        top: var(--mobile-header-height);
        height: calc(100vh - var(--mobile-header-height));
        border: none;
        background-color: var(--background);
        z-index: 10;
    }
}

.right-side.transition {
    transition: width 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.right-side.show {
    width: 25%;

    @include respond-to('laptop') {
        width: 100%;
    }
}

.right-side.show.left-visible {
    @include respond-to('laptop') {
        width: 60%;
    }
}

.right-side.hide {
    width: 0;

    .r-close-btn {
        display: none;
    }
}

.r-close-btn {
    display: none;
    width: 0;
    height: 0;
    padding: unset !important;

    @include respond-to('laptop') {
        display: block;
        position: absolute;
        top: 12px;
        left: 12px;
        width: 36px;
        height: 36px;
        border-radius: 10rem;
        @include center-align;

        &:hover {
            background-color: var(--gray-color);
        }
    }
}

// content

.content.show {
    width: 100%;

    @include respond-to('laptop') {
        border: none;
    }
}

.content.hide {
    width: 0;
    visibility: hidden;

    @include respond-to('laptop') {
        width: 100%;
        visibility: visible;
    }

    @include respond-to('mobile') {
        width: 0;
        visibility: hidden;
    }
}

.no-id {
    @include center-align;
}

.c-content {
    flex: 1;
    overflow: auto;
    // padding: 12px 24px;
    position: relative;
}

.c-footer {
    border-top: var(--solid-border);
}

// pin chat

.pin {
    position: absolute;
    background-color: var(--pinned-message-color);
    width: 100%;
    height: 50px;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    backdrop-filter: blur(4px);
    padding: 8px;
    max-height: 150px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;

    &-icon {
        margin-right: 12px;
        margin-left: 4px;
        background-color: var(--white);
        min-height: 24px;
        min-width: 24px;
        width: 24px;
        height: 24px;
        border-radius: 10rem;
    }

    &-icon:hover {
        background-color: var(--white-low);
        cursor: pointer;
    }

    &-text {
        flex: 1;
        margin-right: 24px;
        @include font-default;
        color: #cfcfcf;
        word-spacing: 1px;
        overflow: hidden;
        font-style: italic;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        max-height: 100%;
        transition: max-height 0.3s ease-in-out;
    }

    &:hover {
        max-height: 150px;
        height: 100%;
        background-color: #000;
        .pin-text {
            display: block;
            max-height: 120px;
            overflow-y: auto;
        }
    }

    &-close {
        position: absolute;
        right: 4px;
        top: 4px;
        min-width: 20px;
        background-color: var(--white);
    }
}

.loader {
    width: 100%;
    height: 100%;
    @include center-align;
}
