/* 改至 select2.css ，只取本網站需要的style，需對照fitness-style.css FORM 的樣式設定 */
/* 前台樣式 */
.frontend .select2-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}

.frontend .select2-container.select2-container--open:not(.select2) {
    margin-top: .5rem;
}

.frontend .select2-selection__rendered {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 3.575rem;
    padding: .875rem 3rem .875rem 1.5rem;
    background: url(../img/visual-element/chev_down.svg) no-repeat #FFFFFF right 1rem center;
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
    cursor: default;
    -webkit-appearance: none;
    -moz-appearance: none;
    -o-appearance: none;
    appearance: none;
    outline: none;
}

.frontend :focus .select2-selection__rendered,
.frontend .select2-container--open .select2-selection__rendered {
    border-color: var(--primary);
}

.frontend .select2-selection__rendered:focus {
    min-width: 10rem;
    background: url(../img/visual-element/chev_up.svg) no-repeat #FFFFFF right 1rem center;
    border-color: var(--primary);
    box-shadow: none;
}

.frontend .select2-selection__rendered:active,
.frontend .select2-selection__rendered:focus {
    background-color: var(--gray-100);
    box-shadow: none;
    border-color: var(--primary);
}

@media (min-width: 900px) {
    .frontend .select2-selection__rendered {
        min-width: 10rem;
        width: auto;
        padding: .875rem 3rem .875rem 1.5rem !important;
    }

}

.frontend .select2-dropdown {
    position: absolute;
    display: block;
    width: 100%;
    left: -100000px;
    padding: .5rem 0;
    border: 1px solid var(--primary);
    background-color: #ffffff;
    border-radius: .5rem;
    box-sizing: border-box;
    z-index: 1051;
}

.frontend .select2-container--open .select2-dropdown {
    left: 0;
}

.frontend .select2-results__option--selectable {
    cursor: pointer;
}

.frontend .select2-search.select2-search--dropdown {
    display: block;
    width: 100%;
    padding: .5rem
}

.frontend .select2-search.select2-search--dropdown .select2-search__field {
    width: 100%;
    padding: .5rem 1rem;
    border-radius: .5rem;
}

.frontend .select2-results__options {
    margin: 0;
    padding: 0;
    list-style: none;
}

.frontend .select2-results__option {
    padding: .875rem 1rem .875rem 1.5rem;
    line-height: 1.7;
    color: var(--gray-400);
    border-bottom: 1px solid var(--primary);
    user-select: none;
    -webkit-user-select: none;
    transition: .3s ease;
}

.frontend .select2-results__option--selected {
    background-color: var(--primary);
    color: #ffffff !important;
}

.frontend .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--primary);
    color: #ffffff;
}

.frontend .select2-results__option.select2-results__option--selectable:not(.select2-results__option--selected):hover {
    background-color: var(--primary);
    color: var(--black);
}

.frontend .select2-container--default .select2-results > .select2-results__options {
    max-height: 200px;
    overflow-y: auto;
}

.frontend .select2-results__option.select2-results__option--selectable:not(.select2-results__option--selected):hover {
    background-color: var(--primary);
    color: #ffffff;
}


/* 後台樣式 */
.backend .select2-container .select2-search--inline .select2-search__field {
    height: 1.5rem;
    margin-top: .375rem;
    margin-left: .75rem;
}

.backend .select2-container--default .select2-selection--multiple {
    padding-right: 2.25rem;
    padding-bottom: .375rem;
    border-color: var(--gray-100);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
}

.backend .select2-container--open .select2-dropdown--below {
    border-color: var(--gray-100);
}

.backend .select2-results__option {
    padding: .5rem 1rem;
}

.backend .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--primary);
}

.backend .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--primary);
    border-color: var(--primary);
}

.backend .select2-container--default .select2-results__option--selected {
    background-color: var(--primary);
    color: var(--black);
}

.backend .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    border-color: var(--primary);
    color: var(--black);
}

.backend .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,
.backend .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus {
    background-color: var(--primary);
}

.backend .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    padding-left: .75rem;
}