/* web/css/chosung.css — chosung 모듈 전용 스타일 */

.chosung-panel {
  position: fixed;
  top: var(--header-h, 60px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  max-height: 70vh;
  background: var(--card, #FFFFFF);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.16), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--line, #E7E5E4);
  border-top: none;
  z-index: 25;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  animation: chosungSlideDown 0.18s ease-out;
}

.chosung-panel[hidden] {
  display: none !important;
}

@keyframes chosungSlideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -6px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* 스티키 카운트 헤더 */
.chosung-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line, #E7E5E4);
  flex-shrink: 0;
  user-select: none;
}

.chosung-count-text {
  font-size: 13.5px;
  color: var(--muted, #78716C);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.chosung-count-query {
  color: var(--accent, #D97706);
  font-weight: 700;
  margin-right: 2px;
}

.chosung-close-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 15px;
  line-height: 1;
  color: var(--muted, #78716C);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.chosung-close-btn:hover {
  color: var(--ink, #1C1917);
  background: rgba(0, 0, 0, 0.05);
}

/* 스크롤 리스트 */
.chosung-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  margin: 0;
  padding: 6px 0 16px;
  list-style: none;
}

.chosung-list::-webkit-scrollbar {
  width: 6px;
}
.chosung-list::-webkit-scrollbar-track {
  background: transparent;
}
.chosung-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}
.chosung-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* 인스타그램 스타일 친구 목록 행 */
.chosung-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease;
  outline: none;
}

.chosung-row:hover,
.chosung-row:focus-visible {
  background: #F7F5F0;
}

.chosung-row:active {
  background: #EFECE6;
}

.chosung-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.chosung-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chosung-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink, #1C1917);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chosung-sub {
  font-size: 12.5px;
  color: var(--muted, #78716C);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.chosung-view-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--line, #E7E5E4);
  background: var(--bg, #FAF7F2);
  color: var(--ink, #1C1917);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  pointer-events: none;
}

.chosung-row:hover .chosung-view-btn,
.chosung-row:focus-visible .chosung-view-btn {
  background: var(--accent, #D97706);
  border-color: var(--accent, #D97706);
  color: #FFFFFF;
}

/* 빈 결과 상태 */
.chosung-empty {
  padding: 44px 20px 48px;
  text-align: center;
  color: var(--muted, #78716C);
}

.chosung-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.chosung-empty-text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink, #1C1917);
  word-break: keep-all;
}

/* 무한 스크롤 감지용 센티널 */
.chosung-sentinel {
  height: 20px;
  list-style: none;
  visibility: hidden;
  margin: 0;
  padding: 0;
}
