app/(default-layout)/conversation/components/conversation-header/ConversationHeader.module.scss
@use '/app/scss/mixins.scss' as *;

.c-header {
    height: var(--header-height);
    border-bottom: var(--solid-border);
    display: flex;
    align-items: center;
    padding: 0 12px;

    position: relative;
    @include respond-to('mobile') {
        padding-left: 52px;
        padding-right: 12px;
        height: var(--mobile-header-height);
    }
}

.c-header {
    .tool-icon {
        &.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
    }
}

.user-info {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: calc(100% - 36px);

    align-items: center;

    .h-avatar {
        margin-right: 8px;
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;

        @include respond-to('mobile') {
            min-width: 36px;
            min-height: 36px;
            width: 36px;
            height: 36px;
        }
    }
}

.c-header-tools {
    display: flex;

    * {
        margin: 0 2px;
    }
}

.tool-icon {
    width: 34px;

    @include respond-to('mobile') {
        width: 28px;
    }
}

.tool-icon:hover {
    cursor: pointer;
    opacity: 0.5;
}

.user-info-text {
    max-width: calc(100% - 52px);
    width: 100%;
}

.user-name {
    display: block;
    font-family: Lora;
    color: var(--foreground);
    font-size: 1.5rem;
    width: 100%;
    overflow: hidden;
    text-wrap: nowrap;
    white-space: nowrap;
    text-overflow: ellipsis;

    @include respond-to('mobile') {
        font-size: 1.4rem;
    }
}

.user-status {
    font-family: var(--font-family);
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--text-low-color);
    font-weight: 400;

    @include respond-to('mobile') {
        font-size: 1.3rem;
    }
}

.user-status::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    margin-left: 8px;
}

.online:after {
    background-color: var(--green);
}

.c-close-btn {
    display: none;
    visibility: hidden;
    width: 0;
    height: 0;

    @include respond-to('mobile') {
        display: block;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 6px;
        width: 36px;
        height: 36px;
        border-radius: 10rem;
        visibility: visible;

        @include center-align;

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

.calling {
    animation: pulse 2s infinite;
    border-radius: 10rem;
    width: 32px;
    height: 32px;
    color: green;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(14, 172, 59, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}
