body {
    overflow-x: hidden;
}

#avatar .item {
    cursor: pointer;
    position: relative;
}

#avatar .item.project-create {
    min-height: 250px;
    border-radius: 10px;
}

#avatar .item .thumb_wrapper {
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    background-size: cover;
    background-position: center center;
    margin-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

#avatar .item .thumb_wrapper .cmd-section {
    position: absolute;
    width: 30px;
    right: 10px;
    top: 10px;
    z-index: 10;
}
#avatar .item .thumb_wrapper .btn {
    width: 30px;
    height: 30px;
    text-align: center;
    padding: 3px;
    background-color: #fff;
    margin-bottom: 10px;
    margin-top: 0px;
}

#avatar .item .thumb_wrapper .btn i {
    margin: 0px;
    font-size: 13px;
}

#avatar .item .metadata .title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 15px;
}

#avatar .item .title a {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

#avatar .item.plus {
    background-color: #ddd;
    display: flex; /* 플렉스 박스 사용 */
    align-items: center; /* 수직 정렬 */
    justify-content: center; /* 수평 정렬 */
    color: #666;
}

#avatar .item .footer {
    position: absolute;
    bottom: 0px;
    left: 0px;
    right: 0px;
    width: 100%;
    padding: 10px 15px;
}

#avatar .item .footer img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid #fff;
}

#avatar .item .footer img {
    position: relative;
    margin-left: -15%; /* 이미지가 20% 겹치도록 설정 */
}

#avatar .item .footer img:first-child {
    margin-left: 0; /* 첫 번째 이미지는 겹치지 않도록 설정 */
}

.avatar_list .item {
    padding: 5px;
    margin-bottom: 5px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
}

.avatar_list .item.active {
    border: 1px solid #ccc;
}

.avatar_list .item:hover {
    background-color: #eee;
}

/********************************
 * 채팅창
 ********************************/

#chat {
    display: flex;
    height: 100vh;
}

.avatar_wrapper {
    width: 250px;
    flex-shrink: 0; /* 고정 너비 */
    height: 100%; /* 상위 요소 높이 상속 */
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    padding: 10px;
}

.collapse-left {
    width: 30px;
    cursor: pointer;
    display: none;
}

@media (max-width: 768px) {
    /* 모바일 화면 기준 */
    .avatar_wrapper {
        margin-left: -250px;
    }

    .avatar_wrapper.active {
        margin-left: 0; /* 보여지는 상태 */
    }

    .collapse-left {
        display: block;
    }
}

.message_wrapper {
    flex-grow: 1; /* 남은 공간을 차지 */
    height: 100%; /* 상위 요소 높이 상속 */
    overflow: hidden; /* 내부 콘텐츠 넘침 방지 */
    position: relative;
    display: flex; /* 플렉스 컨테이너 설정 */
    flex-direction: column; /* 세로 방향으로 배치 */
    background-color: #f9f9f9; /* 임의 배경색 */
    margin-left: 0; /* 기본 상태 */
}

.message_wrapper.shifted {
    margin-right: -250px; /* avatar_wrapper가 보일 때 */
}

#message_list {
    flex-grow: 1; /* 남은 공간을 채움 */
    overflow-y: auto; /* 스크롤 가능 */
    padding: 15px;
}

#chat_header {
    height: 50px; /* 고정 높이 */
    padding: 10px;
    display: flex; /* Flexbox 적용 */
    align-items: center; /* 수직 중앙 정렬 */
    justify-content: space-between; /* 좌우 양끝 배치 */
    flex-shrink: 0; /* 고정 높이 */
}

#chat_footer {
    height: 50px; /* 고정 높이 */
    position: relative;
    border-radius: 19px;
    overflow: hidden;
    margin-right: 10px;
    margin-left: 10px;
    margin-bottom: 10px;
    flex-shrink: 0; /* 고정 높이 */
}

#chat_footer input {
    width: 100%;
    border: 0px;
    height: 100%;
}

#chat_footer .btn-send {
    position: absolute;
    right: 5px;
    top: 5px;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 5px;
}

#chat i {
    margin: 0px;
}
#chat .btn-link:hover {
    background-color: #f4f4f4;
}

.avatar_photo {
    width: 38px;
    height: 38px;
    border: 1px solid #ccc;
    border-radius: 50%;
    margin-right: 10px;
    background-size: cover;
}

#message_list .message-item.right {
    margin-left: auto;
    margin-right: 5px;
    text-align: right;
}

#message_list .message-item {
    max-width: 70%;
    margin-bottom: 20px;
    color: #000;
}

#message_list .message-item .message-user {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 5px;
}

#message_list .message-item.right .message-wrap {
    background-color: #ffeaa7;
    color: #333;
    padding: 15px;
}

#message_list .message-item .message-wrap {
    padding: 0px;
    background-color: #eeeeee;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 15px;
    position: relative;
    font-size: 15px;
    line-height: 18px;
    z-index: 2;
    padding: 15px;
    display: inline-block;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px; /* 아이콘 간 간격 */
}

.typing-indicator i {
    font-size: 12px; /* 아이콘 크기 */
    color: #ccc;
    animation: typing 1.5s infinite;
}

.typing-indicator i:nth-child(2) {
    animation-delay: 0.2s; /* 두 번째 점의 딜레이 */
}

.typing-indicator i:nth-child(3) {
    animation-delay: 0.4s; /* 세 번째 점의 딜레이 */
}

@keyframes typing {
    0% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.2;
        transform: scale(1);
    }
}

#avatarModal img {
    max-width: 100%;
}
