

/* ===== 채팅 페이지 전용 ===== */
#chat-page-container {
    height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.chat-frame {
    height: 80vh;
    display: flex;
    flex-direction: column;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background-color: #fff;
    overflow: hidden;
}

.chat-body {
    flex: 1;
    display: flex;
    min-height: 0;
}


/* ============================
   유저 리스트 검색
============================ */
.chat-users {
    width: 260px;
    border-right: 1px solid #dee2e6;
    background-color: #f8f9fa;
    overflow-y: auto;
    transition: width 0.3s ease, padding 0.3s ease;
	padding: 8px; /* 전체 안쪽 여백 */
}

.chat-users.hide {
    width: 0 !important;
    padding: 0 !important;
    border-right: 0 !important;
}


.user-list {
    list-style: none;  /* 불릿 제거 */
    padding: 0;
    margin: 0;
}

.user-list li {
 all: unset; /* 상위 CSS 모두 초기화 */
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #dee2e6;
    transition: background 0.2s;
    gap: 8px;  /* 아바타와 이름 사이 */
}

.user-list li:hover {
    background-color: #e9ecef;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-name {
    font-size: 14px;
    color: #495057;
}


.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #6c757d;
    margin-right: 8px;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ============================
   채팅 영역
============================ */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f5f7fb;
    transition: flex 0.3s ease;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #ecf2ff;
}

.direct-chat-msg {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.kakao-wrap {
    display: flex;
    align-items: flex-start;
}

.direct-chat-msg.right .kakao-wrap {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #6c757d;
    flex-shrink: 0;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-content {
    max-width: 70%;
    margin: 0 10px;
    display: flex;
    flex-direction: column;
}

.chat-name {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.direct-chat-msg.right .chat-name {
    text-align: right;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius:8px;
    font-size: 14px;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    word-break: break-word;
}

.direct-chat-msg.right .chat-bubble {
    background-color: #0d6efd;
    color: #fff;
}

.chat-time {
    margin-top: 4px;
    font-size: 10px;
    color: #000;
}

.direct-chat-msg.right .chat-time {
    text-align: right;
}



/* ============================
   유저 검색창 (Bootstrap 스타일)
============================ */
.user-search {
    display: flex;
    width: 100%;
    border: 1px solid #bec8d0;
    border-radius:8px;
    overflow: hidden;
    margin: 8px auto;        /* 위아래 8px, 좌우 자동 → 가운데 정렬 */
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.user-search input {
    flex: 1;
    border: none;
    padding: 8px 12px; /* 위아래 8px, 좌우 12px */
    font-size: 13px;
    outline: none;
	border-radius:8px;
}

.user-search input:focus {
    border-color: #86b7fe;
    box-shadow: inset 0 0 0 0.25rem rgba(13,110,253,0.25);
}

.user-search button {
    flex-shrink: 0;
    padding: 8px 4px;  /* 좌우 padding 줄임 (기존 12px → 8px) */
    border: 0;
    border-left: none;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}


.user-search button:hover {
    background-color: #fff;
}



.user-list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

/* 왼쪽 유저 정보 */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ⭐ 타이머 박스 */
.user-timer-box {
    margin-left: auto;          /* 오른쪽 정렬 핵심 */
    min-width: 44px;
    text-align: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    background-color: #e9ecef;
    border-radius: 12px;
    white-space: nowrap;
}

.user-timer-box.long {
    background: #fff3cd;
    color: #664d03;
}

.user-timer-box.very-long {
    background: #f8d7da;
    color: #842029;
}


/* ============================
   스크롤바 스타일
============================ */
.chat-messages::-webkit-scrollbar,
.chat-users::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb,
.chat-users::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-track,
.chat-users::-webkit-scrollbar-track {
    background: transparent;
}


