/* 1. select2 요소 강제로 고정 너비 + block */
.select2-container--bootstrap-5 .select2-selection--single {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box;
}

/* 2. 선택된 값도 줄바꿈 없이 고정 */
.select2-selection__rendered {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 3. 폰트 사이즈 고정 */
.select2-container--bootstrap-5 .select2-selection,
.select2-container--bootstrap-5 .select2-results__option,
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    font-size: 1em !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection, .select2-container--bootstrap-5.select2-container--open .select2-selection,
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus {
     border-color: #dee2e6;
     box-shadow: inherit;
}

/* 옵션 배경색 */
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected, .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected=true] {
    color: #48494f;
    background-color: #F7F7F7;
}

/* 옵션 마진 테두리*/
.select2-results__option.select2-results__option--selectable,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected, .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected=true] {
    margin: 3px 10px;
    border-radius: 4px;
}

/* 테두리 색상 */
.select2-container--bootstrap-5 .select2-selection,
.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid #dee2e6;
}

/* 드롭다운 아래에 생길때 */
/* select 스타일 */
.select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection {
     border-bottom: 1px solid #dee2e6;
     border-bottom-right-radius: .25rem;
     border-bottom-left-radius: .25rem;
}
/* 드롭다운 스타일 */
.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--below {
    top: 5px;
    border-top: 1px solid #dee2e6;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
    box-shadow: -3px 3px 5px 0 rgb(79 79 79 / 5%), 3px 0 5px 0 rgb(79 79 79 / 5%);
    padding: 3px 0;
}

/* 드롭다운 위에 생길 때 */
/* select 스타일 */
.select2-container--bootstrap-5.select2-container--open.select2-container--above .select2-selection {
     border-top: 1px solid #dee2e6;
     border-top-left-radius: .25rem;
     border-top-right-radius: .25rem;
}
/* 드롭다운 스타일 */
.select2-container--bootstrap-5 .select2-dropdown.select2-dropdown--above {
    top: -5px;
    border-bottom: 1px solid #dee2e6;
    box-shadow: -3px -3px 5px 0 rgb(79 79 79 / 5%), 3px 0 5px 0 rgb(79 79 79 / 5%);
    border-bottom-left-radius: .25rem;
    border-bottom-right-radius: .25rem;
}

/* 검색창 */
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    padding: .3rem .7rem;
    font-size: 1em;
    line-height: 1;
}

/* 1-1) 플로팅 컨테이너 안의 select2 컨테이너를 블록 레벨로 인식하게 하고 */
/*     top/margin 조정으로 레이블과 겹치지 않도록 합니다. */
.form-floating > .select2-container--bootstrap-5 {
    /* 플로팅 레이블이 input 대신 이 컨테이너를 보고 움직이도록 */
    position: relative;
    display: block;
    margin-top: 0; /* input 기본 margin 제거 */
}

/* 1-2) select2 선택 박스 높이 & 패딩을 부트스트랩 form-control-sm 과 동기화 */
.form-floating > .select2-container--bootstrap-5 .select2-selection--single {
    height: 58px;
    padding: 0.5rem 0.75rem !important;          /* 좌/우 패딩도 form-control-sm 정도로 */
    line-height: 1.5;
    box-sizing: border-box;
    display: flex !important;
    align-items: end;
}

/* 평상시 라벨 위치 조금 아래로 내려서 보기 좋게 */
.form-floating > .select2-container--bootstrap-5 + label {
    font-size: 0.875rem;
    height: auto;
}