/* ----------------------------------
 * 10. 커스텀 검색/무한스크롤 셀렉트 (Dark Theme)
 * ---------------------------------- */

/* 셀렉트 박스 전체 래퍼 */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    font-size: 13px;
    color: #ccc; /* 기본 텍스트 색상 */
    box-sizing: border-box;
}
.custom-select-wrapper * {
    box-sizing: border-box;
}

/* 1. 트리거 (평소에 보이는 박스) */
.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 32px;
    padding: 0 30px 0 10px;
    background: #2c2c2c; /* 다크 배경 */
    border: 1px solid #444; /* 다크 테두리 */
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

/* 트리거 텍스트 */
.custom-select-trigger span {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff; /* 흰색 텍스트 */
}

/* 화살표 아이콘 */
.custom-select-trigger::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 8px;
    height: 8px;
    border-bottom: 1px solid #999; /* 화살표 색상 밝게 */
    border-right: 1px solid #999;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s;
}

/* 열렸을 때 스타일 */
.custom-select-wrapper.open .custom-select-trigger {
    border-color: #666;
    border-bottom-color: #2c2c2c; /* 연결 부위 가림 */
    border-radius: 4px 4px 0 0;
}
.custom-select-wrapper.open .custom-select-trigger::after {
    transform: translateY(-30%) rotate(225deg);
}

/* 2. 드롭다운 (목록 영역) */
.custom-options {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    right: 0;
    background: #2c2c2c; /* 다크 배경 */
    border: 1px solid #666;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); /* 그림자 진하게 */
    margin-top: -1px;
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

/* 3. 검색 입력창 영역 */
.custom-select-search {
    padding: 8px;
    background-color: #1a1a1a; /* 더 어두운 배경 */
    border-bottom: 1px solid #444;
}

.custom-select-search input {
    width: 100%;
    height: 28px;
    padding: 0 8px;
    background: #333; /* 입력창 배경 */
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 12px;
    color: #fff; /* 입력 텍스트 */
    outline: none;
}
.custom-select-search input:focus {
    border-color: #4a9eff; /* 포커스 시 포인트 컬러 */
}
.custom-select-search input::placeholder {
    color: #777;
}

/* 4. 옵션 목록 (스크롤 영역) */
.custom-options-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* 다크 테마 스크롤바 */
.custom-options-list::-webkit-scrollbar {
    width: 8px;
}
.custom-options-list::-webkit-scrollbar-track {
    background: #1a1a1a;
}
.custom-options-list::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}
.custom-options-list::-webkit-scrollbar-thumb:hover {
    background-color: #777;
}

/* 개별 옵션 */
.custom-option {
    padding: 8px 10px;
    font-size: 13px;
    color: #ccc; /* 기본 텍스트 */
    cursor: pointer;
    border-bottom: 1px solid #3a3a3a; /* 구분선 */
    transition: background 0.1s;
}
.custom-option:last-child {
    border-bottom: none;
}

/* 호버 상태 */
.custom-option:hover {
    background-color: #444;
    color: #fff;
}

/* 선택된 상태 */
.custom-option.selected {
    background-color: #4a9eff; /* 포인트 컬러 */
    color: #fff;
    font-weight: 600;
}

/* 로딩/검색결과없음 메시지 */
.custom-loading-item {
    text-align: center;
    color: #777;
    font-size: 12px;
    padding: 10px;
    cursor: default;
}