﻿/*--------------------------------------------
-------------------SELECT2--------------------
--------------------------------------------*/
.select2-container--open .select2-dropdown {
    left: 0;
    box-shadow: 0 1px 3px #0000002e;
    border-color: #e2e4e9 !important;
    border-radius: 0 0 4px 4px !important;
}

span.select2.select2-container {
    width: 100% !important;
}

span.selection {
    width: 100%;
}

span.select2-selection {
    height: 36px !important;
    border-color: #d3d3d3 !important;
    padding: 0;
}

span.select2-selection__arrow {
    display: none;
}

.select2-selection__rendered {
    height: 34px;
    padding: 0 38px 0 12px !important;
    display: flex !important;
    align-items: center;
    width: calc(100% - 48px);
}

input.select2-search__field {
    outline: none;
    border: none !important;
    padding: 0 12px !important;
}

span.select2-search.select2-search--dropdown {
    padding: 0 !important;
    border-bottom: 1px solid #d3d3d3;
}

li.select2-results__option {
    padding: 6px 12px;
    color: #212529;
    border-bottom: 1px dashed #cacaca;
    position: relative;
}

li.select2-results__option:last-child {
    border-bottom: none;
}

input.select2-search__field {
    height: 36px;
}

.select2-container--default .select2-selection--single {
    border-color: #dee2e6 !important;
    border-radius: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    font-weight: 500 !important;
    font-size: 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    padding-bottom: 2px;
    right: 8px;
    top: 8px;
    border-radius: 50%;
    color: #565656;
}

tr.tr-filter .select2-container--default .select2-selection--single .select2-selection__clear {
    top: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    background: #0000001f;
}

.select-0 {
    width: 0;
    height: 0;
    padding: 0;
    border: 0;
}

.select-on-mobile span.select2-selection {
    height: 30px !important;
    font-size: 14px;
}

.select-on-mobile .select2-selection__rendered {
    height: 28px !important;
}

.tr-filter .select2-container .select2-selection--single {
    height: 32px !important;
}

.tr-filter .select2-container--default .select2-selection--single .select2-selection__rendered {
    height: 30px !important;
}

.tr-filter .select2-container {
    z-index: 1;
}

.tr-filter .mb-2 {
    margin-bottom: 0 !important;
}

.app-pagination span.select2-selection {
    height: 31px !important;
}

.app-pagination .select2-selection__rendered {
    height: 29px !important;
}

/* ========= Select2 PRO THEME ========= */
.select2-container {
    font-family: inherit;
}

/* wrapper line-height */
.select2-container .select2-selection--multiple {
    min-height: 50px;
    height: auto !important;
    background: rgba(255, 255, 255, .86) !important;
    transition: box-shadow .12s ease, border-color .12s ease, transform .12s ease;
    position: relative;
    overflow: hidden;
}

/* subtle inner highlight */
.select2-container .select2-selection--multiple:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .72));
    pointer-events: none;
    opacity: .65;
}

/* render area */
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    position: relative;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px !important;
    margin: 0;
    height: auto !important;
}

/* inline search */
.select2-container--default .select2-search--inline {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.select2-container--default .select2-search--inline .select2-search__field {
    margin: 0 !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    min-width: 160px;
}

.select2-container--default .select2-search--inline .select2-search__field::placeholder {
    color: #94a3b8;
}

/* chips */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    border: 1px solid var(--chip-border) !important;
    background: linear-gradient(180deg, rgba(37, 99, 235, .12), rgba(37, 99, 235, .06)) !important;
    color: var(--chip-text) !important;
    border-radius: 999px !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 18px;
    box-shadow: 0 1px 1px rgba(37, 99, 235, .10);
    backdrop-filter: blur(6px);
    position: relative;
}

/* remove x */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    border: none !important;
    color: #1d4ed8 !important;
    margin-right: 6px !important;
    margin-left: 4px !important;
    font-weight: 900 !important;
    opacity: .85;
    transition: opacity .12s ease, transform .12s ease;
    height: 100%;
    font-size: 14px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    opacity: 1;
    transform: scale(1.05);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    padding-left: 12px !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: rgba(37, 99, 235, .10) !important;
    color: #0f172a !important;
}

/* selected */
.select2-container--default .select2-results__option--selected {
    background: rgba(37, 99, 235, .16) !important;
    color: #0f172a !important;
    font-weight: 500;
}

/* tick icon for selected */
.select2-container--default .select2-results__option--selected::after {
    content: "✓";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #1d4ed8;
    font-weight: 900;
    opacity: .9;
}

.select2-results__options::-webkit-scrollbar {
    width: 10px;
}

.select2-results__options::-webkit-scrollbar-track {
    background: transparent;
}

.select2-results__options::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .55);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
}

.select2-results__options::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, .65);
    border: 3px solid transparent;
    background-clip: content-box;
}