/* 공통 CSS */

/* 뱃지 */
.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.badge_type { background: #f0f0f0; color: #666; }
.badge_primary { background: #E3F2FD; color: #1976D2; }
.badge_success { background: #E8F5E9; color: #388E3C; }
.badge_warning { background: #FFF3E0; color: #F57C00; }
.badge_info { background: #E0F7FA; color: #0097A7; }
.badge_danger { background: #FFEBEE; color: #D32F2F; }
.badge_secondary { background: #F5F5F5; color: #757575; }

/* 필터 바 & 칩 */
.filter_bar { padding: 8px 16px; background: #fff; border-bottom: 1px solid #f0f0f0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.filter_scroll { display: flex; gap: 8px; white-space: nowrap; }
.filter_chip { display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 13px; color: #666; background: #f5f5f5; text-decoration: none; }
.filter_chip.active { background: #4A90D9; color: #fff; font-weight: 600; }

/* 정렬 바 */
.sort_bar { display: flex; align-items: center; justify-content: flex-end; padding: 8px 16px; background: #fff; border-bottom: 1px solid #f0f0f0; gap: 8px; }
.sort_btn { padding: 4px 10px; font-size: 13px; color: #999; background: none; border: none; cursor: pointer; }
.sort_btn.active { color: #333; font-weight: 600; }

/* 빈 상태 */
.empty_state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; }
.empty_state .empty_icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty_state .empty_text { font-size: 14px; color: #999; text-align: center; line-height: 1.6; }

/* no_data 세로 중앙정렬 */
.no_data {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.no_data .comment { font-size: 13px; color: #767676; white-space: pre-line; text-align: center; }

/* 채팅 메시지 */
.chat_start_msg { text-align: center; padding: 40px 0; }
.chat_start_msg p { color: #999; font-size: 14px; }
.system_msg { display: flex; justify-content: center; padding: 8px 16px; }
.system_msg_box { text-align: center; padding: 8px 16px; background: #f0f0f0; border-radius: 16px; max-width: 80%; }
.system_text { font-size: 12px; color: #666; line-height: 1.4; }
.system_time { font-size: 10px; color: #999; margin-top: 4px; display: block; }
.msg_image { max-width: 200px; border-radius: 8px; overflow: hidden; cursor: pointer; }
.msg_image img { width: 100%; height: auto; display: block; }
.msg_meta { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.msg_unread { font-size: 10px; color: #4A90D9; font-weight: 600; }
.chat_disabled { opacity: 0.6; }
.chat_input_disabled { display: flex; align-items: center; justify-content: center; padding: 16px; background: #f8f9fa; border-top: 1px solid #eee; }
.disabled_text { font-size: 13px; color: #999; }
.target_info_btn_area { text-align: center; padding: 4px 0; }
.btn_view_target_info { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #e8f4fd; color: #4A90D9; border: 1px solid #4A90D9; border-radius: 20px; font-size: 13px; cursor: pointer; }

/* 채팅 목록 아이템 */
.chat_item_wrap { position: relative; overflow: hidden; }
.chat_item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #f5f5f5; position: relative; transition: transform 0.2s ease; cursor: pointer; text-decoration: none; color: inherit; }
.chat_item_wrap.swiped .chat_item { transform: translateX(-80px); }
.chat_item .profile_img { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.chat_item .profile_img img { width: 100%; height: 100%; object-fit: cover; }
.chat_item .chat_info { flex: 1; min-width: 0; }
.chat_item .info_top { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.chat_item .info_badges { display: flex; gap: 4px; flex-shrink: 0; }
.chat_item .info_middle { margin-bottom: 2px; }
.chat_item .last_msg { font-size: 13px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat_item .info_bottom { display: flex; align-items: center; justify-content: space-between; }
.chat_item .time { font-size: 11px; color: #999; }
.chat_item .unread_count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #FF3B30; color: #fff; font-size: 11px; font-weight: 600; }
.chat_item_actions { position: absolute; right: 0; top: 0; height: 100%; width: 80px; display: flex; align-items: stretch; }
.btn_leave { width: 100%; background: #FF3B30; color: #fff; font-size: 13px; border: none; cursor: pointer; }

/* 토글 스위치 */
.toggle_switch { position: relative; width: 44px; height: 24px; }
.toggle_switch input { opacity: 0; width: 0; height: 0; }
.toggle_switch .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #ccc; border-radius: 12px; transition: 0.3s; }
.toggle_switch .slider:before { content: ''; position: absolute; width: 20px; height: 20px; left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: 0.3s; }
.toggle_switch input:checked + .slider { background: #4A90D9; }
.toggle_switch input:checked + .slider:before { transform: translateX(20px); }
