/**
 * 대화창 공통 컴포넌트 CSS
 */

/* 컨테이너 */
.chat-box-component {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 메시지 목록 영역 */
.chat-messages-container {
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
    padding: 16px 0;
}

/* 메시지 카드 */
.chat-box-component .user-profile-card {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.chat-box-component .user-profile-card:last-child {
    border-bottom: none;
}

/* 내 메시지 */
.chat-box-component .user-profile-card.mine {
    background: #f0f7ff;
    border-radius: 8px;
    margin: 8px 0;
    padding: 12px;
}

/* 프로필 영역 */
.chat-box-component .profile__image__container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.chat-box-component .profile__image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* 메시지 내용 */
.chat-box-component .profile__text__content {
    padding-left: 40px;
}

.chat-box-component .profile__text__content p.tx02 {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
}

/* 멘션 하이라이트 */
.chat-box-component .comment {
    color: #1976d2;
    font-weight: 500;
}

/* 첨부파일 영역 */
.chat-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-top: 8px;
    margin-left: 40px;
}

.chat-attachment-icon {
    width: 16px;
    height: 16px;
}

.chat-attachment-name {
    flex: 1;
    font-size: 12px;
    color: #1976d2;
    text-decoration: none;
}

.chat-attachment-name:hover {
    text-decoration: underline;
}

/* 입력 영역 */
.chat-input-area {
    padding: 16px 0;
    border-top: 1px solid #E5E5EC;
    position: relative;
}

.chat-input {
    width: 100%;
    min-height: 60px;
    padding: 12px;
    border: 1px solid #E5E5EC;
    border-radius: 8px;
    resize: none;
    font-size: 13px;
    line-height: 1.5;
}

.chat-input:focus {
    outline: none;
    border-color: #1976d2;
}

/* 첨부파일 미리보기 */
.chat-attachments-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}

.chat-attachment-preview-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
}

.chat-attachment-preview-item .remove-btn {
    color: #f44336;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

/* 멘션 자동완성 */
.mention-autocomplete {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #E5E5EC;
    border-radius: 8px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.mention-item:hover,
.mention-item.selected {
    background: #f5f5f5;
}

.mention-item-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.mention-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.mention-item-org {
    font-size: 11px;
    color: #999;
}

/* 액션 버튼 영역 */
.chat-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.chat-file-btn {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
}

.chat-file-btn img {
    width: 20px;
    height: 20px;
}

.chat-send-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #1976d2;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
}

.chat-send-btn:hover {
    background: #1565c0;
}

.chat-send-btn img {
    width: 16px;
    height: 16px;
}

/* 검색 입력 */
.chat-search {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E5E5EC;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* 빈 상태 */
.chat-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 13px;
}

/* 로딩 상태 */
.chat-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* 비활성화 상태 */
.chat-disabled-notice {
    padding: 40px 16px;
    text-align: center;
    color: #7A7F8A;
}

.chat-disabled-notice p {
    font-size: 13px;
    line-height: 1.5;
}

/* 페이지 타입 표시 배지 */
.chat-page-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 11px;
    color: #666;
    margin-left: 8px;
}

/* 날짜/시간 표시 개선 */
.chat-box-component .profile__image__container .tx04 {
    font-size: 11px;
    color: #999;
    margin-left: auto;
}

/* 답글 표시 */
.chat-box-component .comment__icon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}
