/**
 * Select2 Country Dropdown Custom Styles
 * 네이티브 select 드롭다운 스타일과 유사하게
 */

/* 선택 박스 - 기존 input/select 스타일 유지 */
.select2-container--default .select2-selection--single {
    height: 60px !important;
    padding: 0 32px 0 16px !important;
    font-size: 16px !important;
    color: #151515 !important;
    background-color: #f1f1f1 !important;
    border: 0 !important;
    border-radius: 4px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 60px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    color: inherit !important;
}

/* 화살표 */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 60px !important;
    width: 32px !important;
    right: 10px !important;
    background: url('/images/arrow-down.svg') no-repeat center !important;
    background-size: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none !important;
}

/* 열렸을 때 화살표 회전 */
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow {
    transform: rotate(180deg) !important;
}

/* 드롭다운 */
.select2-container--default .select2-dropdown {
    background: #949797 !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
    margin-top: 4px !important;
}

/* 검색창 */
.select2-container--default .select2-search--dropdown {
    padding: 8px !important;
    margin: 0 !important;
    background: #858888 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 36px !important;
    padding: 0 12px !important;
    border: 1px solid #555 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: #fff !important;
    color: #333 !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field::placeholder {
    color: #999 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #007AFF !important;
}

/* 옵션 리스트 */
.select2-container--default .select2-results__options {
    max-height: 260px !important;
    overflow-y: auto !important;
    padding: 4px 0 !important;
}

/* 개별 옵션 */
.select2-container--default .select2-results__option {
    padding: 8px 16px 8px 32px !important;
    font-size: 15px !important;
    color: #fff !important;
    background: transparent !important;
    position: relative !important;
    line-height: 1.4 !important;
}

/* 옵션 호버 */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #007AFF !important;
    color: #fff !important;
}

/* 선택된 옵션 - 체크마크 */
.select2-container--default .select2-results__option--selected {
    background: transparent !important;
    color: #fff !important;
}

.select2-container--default .select2-results__option--selected::before {
    content: '✓' !important;
    position: absolute !important;
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 14px !important;
    color: #fff !important;
}

/* 선택된 옵션 + 호버 */
.select2-container--default .select2-results__option--selected.select2-results__option--highlighted {
    background: #007AFF !important;
}

/* 플래그 아이콘 */
.select2-container .fi {
    margin-right: 10px;
    vertical-align: middle;
}

/* 스크롤바 스타일 */
.select2-container--default .select2-results__options::-webkit-scrollbar {
    width: 6px;
}

.select2-container--default .select2-results__options::-webkit-scrollbar-track {
    background: transparent;
}

.select2-container--default .select2-results__options::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}

/* 모바일 */
@media screen and (max-width: 820px) {
    .select2-container--default .select2-selection--single {
        height: 50px !important;
        padding: 0 32px 0 16px !important;
        font-size: 15px !important;
    }
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 50px !important;
    }
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 50px !important;
    }
    .select2-container--default .select2-results__option {
        padding: 6px 12px 6px 28px !important;
        font-size: 14px !important;
    }
    .select2-container--default .select2-results__option--selected::before {
        left: 8px !important;
        font-size: 12px !important;
    }
}
