/* [하모이닷컴] 1:1 채팅 모달 — 2026-08-25 인라인에서 분리
   열기 전에는 화면에 보이지 않는 창이라 통째로 뒤로 미뤄도 안전하다. */
/* 1:1 채팅 모달 전체 컨테이너 */
#hamoi-chat-modal {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 360px;
    height: 520px;
    background-color: #1a1b1e;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    z-index: 99999;
    font-family: 'Noto Sans KR', sans-serif;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
}

/* 상단 헤더 */
.chat-header {
    background-color: #25262b;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2c2e33;
}
.chat-header .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-header .target-nick {
    font-weight: bold;
    font-size: 15px;
    color: #f1f3f5;
}
.peer-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: normal;
    color: #868e96;
}
.peer-status .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #868e96;
    display: inline-block;
}
.peer-status.online { color: #51cf66; }
.peer-status.online .dot { background: #51cf66; }
.chat-header .close-btn {
    background: none;
    border: none;
    color: #a6a7ab;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.chat-header .close-btn:hover { color: #fff; }

/* 대화 내용 스크롤 영역 */
.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #141517;
}

/* 말풍선 기본 스타일 */
.chat-bubble {
    max-width: 75%;
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    word-break: break-all;
}
/* 상대방 메시지 (좌측) */
.chat-msg.incoming {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.chat-msg.incoming .chat-bubble {
    background-color: #2c2e33;
    color: #e9ecef;
    border-top-left-radius: 2px;
}
.chat-msg.incoming .msg-time {
    font-size: 10px;
    color: #868e96;
    margin-top: 3px;
    margin-left: 2px;
}

/* 내가 보낸 메시지 (우측) */
.chat-msg.outgoing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.chat-msg.outgoing .chat-bubble {
    background-color: #3b5bdb;
    color: #ffffff;
    border-top-right-radius: 2px;
}
.chat-msg.outgoing .msg-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    margin-right: 2px;
}
.chat-msg.outgoing .msg-time {
    font-size: 10px;
    color: #868e96;
}
.chat-msg.outgoing .msg-read {
    font-size: 10px;
    color: #4c6ef5;
    font-weight: bold;
}

/* 이미지 말풍선 스타일 */
.chat-bubble img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    display: block;
}

/* 하단 입력 폼 영역 */
.chat-footer {
    padding: 10px;
    background-color: #25262b;
    border-top: 1px solid #2c2e33;
}
.chat-input-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #1a1b1e;
    border: 1px solid #373a40;
    border-radius: 20px;
    padding: 4px 12px;
}
.chat-input-box input[type="text"] {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    padding: 8px 0;
    font-size: 13.5px;
    outline: none;
}
.chat-input-box .img-btn {
    color: #adb5bd;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
}
.chat-input-box .img-btn:hover { color: #fff; }
.chat-input-box .send-btn {
    background-color: #3b5bdb;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}
.chat-input-box .send-btn:hover { background-color: #4c6ef5; }
