@import 'inc/bootstrap';

.select2-container * {
    text-decoration: none !important;
}

.select2-drop {
    font-family: $regularFont;
    font-weight: 400;
    //@include font-size(12);

    [data-symbol]:before {
        content: attr(data-symbol);
        display: inline-block;
        width: 20px;
        line-height: 20px;
        margin-right: 4px;
        text-align: center;
        color: $textColor;
    }
}

.select2-container {
    margin: 0;
    position: relative;
    display: inline-block;
    /* inline-block for ie7 */
    zoom: 1;
    *display: inline;
    vertical-align: middle;
}

.select2-container,
.select2-drop,
.select2-search,
.select2-search input {
    /*
      Force border-box so that % widths fit the parent
      container without overlap because of margin/padding.

      More Info : http://www.quirksmode.org/css/box.html
    */
    -webkit-box-sizing: border-box; /* webkit */
    -moz-box-sizing: border-box; /* firefox */
    box-sizing: border-box; /* css3 */
}

.select2-container .select2-choice {
    display: block;
    height: 26px;
    padding: 0 0 0 8px;
    overflow: hidden;

    @include simple-border();
    @include border-radius(1);
    white-space: nowrap;
    line-height: 23px;
    color: $textColor;
    text-decoration: none;

    background-clip: padding-box;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    background-color: $uiGeneralContentBg;
}

.select2-container.select2-drop-above .select2-choice {
}

.select2-container.select2-allowclear .select2-choice .select2-chosen {
    margin-right: 42px;
}

.select2-container .select2-choice > .select2-chosen {
    margin-right: 26px;
    display: block;
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.select2-container .select2-choice abbr {
    display: none;
    width: 12px;
    height: 12px;
    position: absolute;
    right: 24px;
    top: 8px;

    font-size: 1px;
    text-decoration: none;

    border: 0;
    background-position: right top;
    cursor: pointer;
    outline: 0;
}

.select2-container.select2-allowclear .select2-choice abbr {
    display: inline-block;
    top: 5px;
}

.select2-container .select2-choice abbr:hover {
    background-position: right -11px;
    cursor: pointer;
}

.select2-drop-mask {
    border: 0;
    margin: 0;
    padding: 0;
    position: fixed;
    left: 0;
    top: 0;
    min-height: 100%;
    min-width: 100%;
    height: auto;
    width: auto;
    opacity: 0;
    z-index: 109998;
    /* styles required for IE to work */
    background-color: $uiClickableDefaultBg;
    filter: alpha(opacity=0);
}

.select2-drop {
    width: 100%;
    margin-top: -1px;
    position: absolute;
    z-index: 109999;
    top: 100%;

    background: $uiGeneralContentBg;
    color: $textColor;
    @include simple-border();
    border-top-width: 0;

    border-radius: 0 0 2px 2px;

    &.rtl {
        direction: rtl;
    }
    &.ltr {
        direction: ltr;
    }
}

.select2-drop-auto-width {
    border-top: 1px solid $uiGeneralContentBorder;
    width: auto;
}

.select2-drop-auto-width .select2-search {
    padding-top: 4px;
}

.select2-drop.select2-drop-above {
    margin-top: 1px;
    border-top: 1px solid $uiGeneralContentBorder;
    border-bottom-width: 0;

    border-radius: 2px 2px 0 0;
}

.select2-drop-active {
    @include simple-border();
    border-top-width: 0;
}

.select2-drop.select2-drop-above.select2-drop-active {
}

.select2-container .select2-choice .select2-arrow {
    display: inline-block;
    width: 18px;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    background-clip: padding-box;
}

.select2-container .select2-choice .select2-arrow b {
    display: block;
    width: 100%;
    height: 100%;
    font-family: 'tao';
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    font-size: 1.05rem;
    @include font-size(10.5);
    line-height: 2.3;
    text-align: center;
    /* Better Font Rendering =========== */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    &:before {
        @include icon-down;
    }
    &:hover {
        background-color: $uiClickableHoverBg;
        color: $textHighlight;
    }
}

.select2-search {
    display: inline-block;
    width: 100%;
    min-height: 26px;
    margin: 0;
    padding: 4px 4px 0 4px;

    position: relative;
    z-index: 100000;

    white-space: nowrap;
}

.select2-search input {
    width: 100%;
    height: auto !important;
    min-height: 26px;
    padding: 4px 20px 4px 5px;
    margin: 0;

    outline: 0;
    font-family: sans-serif;
    font-size: 1em;

    border: 1px solid $uiGeneralContentBorder;
    border-radius: 0;

    -webkit-box-shadow: none;
    box-shadow: none;

    background-color: $uiGeneralContentBg;
    background-position: 100% -22px;
}

.select2-drop.select2-drop-above .select2-search input {
    margin-top: 4px;
}

.select2-search input.select2-active {
    background: $uiGeneralContentBg;
}

.select2-container-active .select2-choice,
.select2-container-active .select2-choices {
    border: 1px solid $uiClickableActiveBg;
    outline: none;
}

.select2-dropdown-open .select2-choice {
}

.select2-dropdown-open.select2-drop-above .select2-choice,
.select2-dropdown-open.select2-drop-above .select2-choices {
}

.select2-dropdown-open .select2-choice .select2-arrow {
    background: transparent;
    border-left: none;
    filter: none;
}

.select2-dropdown-open .select2-choice .select2-arrow b {
    background-position: -18px 1px;
}

/* results */
.select2-results {
    max-height: 200px;
    padding: 0 !important;
    margin: 4px 0 4px 0;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: inherit;
}

.select2-results ul.select2-result-sub {
    margin: 0;
    padding-left: 0;
}

.select2-results ul.select2-result-sub > li .select2-result-label {
    padding-left: 20px;
}

.select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label {
    padding-left: 40px;
}

.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label {
    padding-left: 60px;
}

.select2-results
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    > li
    .select2-result-label {
    padding-left: 80px;
}

.select2-results
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    > li
    .select2-result-label {
    padding-left: 100px;
}

.select2-results
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    > li
    .select2-result-label {
    padding-left: 110px;
}

.select2-results
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    ul.select2-result-sub
    > li
    .select2-result-label {
    padding-left: 120px;
}

.select2-results li {
    list-style: none;
    display: list-item;
    background-image: none;
}

.select2-results li.select2-result-with-children > .select2-result-label {
    font-weight: bold;
}

.select2-results .select2-result-label {
    padding: 3px 7px 4px;
    margin: 0;
    cursor: pointer;

    min-height: 1em;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.select2-results .select2-highlighted {
    background: $uiClickableHoverBg;
    color: $textHighlight;
}

.select2-results li em {
    background: $uiGeneralContentBg;
    font-style: normal;
}

.select2-results .select2-highlighted em {
    background: transparent;
}

.select2-results .select2-highlighted ul {
    background: $uiGeneralContentBg;
    color: $textColor;
}

.select2-results .select2-no-results,
.select2-results .select2-searching,
.select2-results .select2-selection-limit {
    background: $uiClickableDefaultBg;
    display: list-item;
}

.select2-results .select2-no-results {
    padding-left: 7px;
}

.select2-hidden-accessible {
    display: none;
}

/*
disabled look for disabled choices in the results dropdown
*/
.select2-results .select2-disabled.select2-highlighted {
    color: #999;
    display: list-item;
    cursor: default;
}

.select2-results .select2-disabled .select2-result-label {
    cursor: default;
}

.select2-results .select2-disabled {
    display: list-item;
    cursor: default;
    color: #999;
}

.select2-results .select2-selected {
    display: none;
}

.select2-more-results.select2-active {
    background: $uiClickableDefaultBg url('img/select2/select2-spinner.gif') no-repeat 100%;
}

.select2-more-results {
    background: $uiClickableDefaultBg;
    display: list-item;
}

/* disabled styles */

.select2-container.select2-container-disabled .select2-choice {
    background-color: $uiClickableDefaultBg;
    background-image: none;
    border: 1px solid $uiGeneralContentBorder;
    cursor: default;
}

.select2-container.select2-container-disabled .select2-choice .select2-arrow {
    background-color: $uiClickableDefaultBg;
    background-image: none;
    border-left: 0;
}

.select2-container.select2-container-disabled .select2-choice abbr {
    display: none;
}

/* multiselect */

.select2-container-multi .select2-choices {
    height: auto !important;
    height: 1%;
    margin: 0;
    padding: 0;
    position: relative;

    border: 1px solid $uiGeneralContentBorder;
    cursor: text;
    overflow: hidden;

    background-color: $uiGeneralContentBg;
}

.select2-locked {
    padding: 3px 5px 3px 5px !important;
}

.select2-container-multi .select2-choices {
    min-height: 26px;
}

.select2-container-multi.select2-container-active .select2-choices {
    border: 1px solid $uiGeneralContentBorder;
    outline: none;
}

.select2-container-multi .select2-choices li {
    float: left;
    list-style: none;
}

.select2-container-multi .select2-choices .select2-search-field {
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.select2-container-multi .select2-choices .select2-search-field input {
    padding: 5px;
    margin: 1px 0;

    font-family: sans-serif;
    font-size: 100%;
    color: #666;
    outline: 0;
    border: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
    background: transparent !important;
}

.select2-container-multi .select2-choices .select2-search-field input.select2-active {
    background: $uiGeneralContentBg url('img/select2/select2-spinner.gif') no-repeat 100% !important;
}

.select2-default {
    color: #999 !important;
}

.select2-container-multi .select2-choices .select2-search-choice {
    padding: 3px 5px 3px 18px;
    margin: 3px 0 3px 5px;
    position: relative;

    line-height: 13px;
    color: $textColor;
    cursor: default;
    border: 1px solid $uiGeneralContentBorder;

    border-radius: 1px;

    background-clip: padding-box;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    background-color: blacken($uiClickableDefaultBg, 0.1);

    &.partial {
        background-color: whiten($uiClickableDefaultBg, 0.6);
    }
}

.select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
    cursor: default;
}

.select2-container-multi .select2-choices .select2-search-choice-focus {
    background: #d4d4d4;
}

.select2-search-choice-close {
    display: block;
    width: 12px;
    height: 13px;
    position: absolute;
    right: 3px;
    top: 4px;

    font-size: 1px;
    outline: none;
    background-position: right top;
}

.select2-search-choice-close,
.select2-container .select2-choice abbr,
.select2-search input {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAoCAYAAACiu5n/AAACLElEQVR42u3Zz0sUYRzH8bUISoyF1i5iXSooyYgOEXapZNYNojwU/aAfUAT9A4YhUgdxt1To0KFIBCMIvEcUEXntUtivpYuUhYFIdDBMmD69he/hObgsbSnb13ngdZjZhX3eO8/MDrMpSctKErwsg//HUSgU7uNYsB3hHla4CybqEoRPaMJGFCEMewxuxnsIk5iALPqg1yVdj9eQGUdjiuE1eAs+QOYztrsMJqwFk8EyHguW95klD+ZD08gsYvBFCBPYgHXBOT1UNpg3ncQpnAicRbrCCQ3j8SIf5QvYEWxvxnlb0mWDr0MIvcOaCiayC78gRKmlH+WDbaIjkJnDzgq/+VHIvMWqag3ehBkIAxXGdkAIDVRlsE24H9//4ty9hju4Hej710c5m83WYging32HMYjMnwSvx75UlQ+iOiDEaEMLZiA8dPc7TFQDnkGYxQ8Iz9Hs8k4riqIa4l5ApojVbm8tiduPL5CZRs5lMGFH8DNYxo+C5d3tMfgohJeow0qMQujxuqRb0RBsZ3DA2ZIuP5LgJDgJToKr4ZHOWjTOy+fzNa6DiezCFGReod1lMGF3IYzjMm5B5rirYIJyEJ4iHezfjW+YRr2n4EHE2LrAa1cg5DwFj2DWLlKljn67p+B+CIdKPAaOsddTcBOEKbTZvjp0Qvjo8Sp9DjJFfIVMjBsef4f34AHeYAxX0VfqMbDnfw97IXMTta6DLbobcxBa3Qdb9BPE2LZQ8G98530ecQi/2QAAAABJRU5ErkJggg==);
    background-repeat: no-repeat;
    min-width: inherit;
}

.select2-container-multi .select2-search-choice-close {
    left: 3px;
}

.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
    background-position: right -11px;
}

.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
    background-position: right -11px;
}

/* disabled styles */
.select2-container-multi.select2-container-disabled .select2-choices {
    background-color: $uiClickableDefaultBg;
    background-image: none;
    border: 1px solid $uiGeneralContentBorder;
    cursor: default;
}

.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
    padding: 3px 5px 3px 5px;
    border: 1px solid $uiGeneralContentBorder;
    background-image: none;
    background-color: $uiClickableDefaultBg;
}

.select2-container-multi.select2-container-disabled
    .select2-choices
    .select2-search-choice
    .select2-search-choice-close {
    display: none;
    background: none;
}

/* end multiselect */

.select2-offscreen,
.select2-offscreen:focus {
    clip: rect(0 0 0 0) !important;
    width: 1px !important;
    height: 1px !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    outline: 0 !important;
    left: 0px !important;
    top: 0px !important;
}

.select2-display-none {
    display: none;
}

.select2-measure-scrollbar {
    position: absolute;
    top: -10000px;
    left: -10000px;
    width: 100px;
    height: 100px;
    overflow: scroll;
}

.form_radlst[disabled] {
    .select2-container {
        pointer-events: none;
        cursor: default;
        color: $textColor;
        opacity: 0.55 !important;

        .select2-search-field,
        .select2-search-choice-close,
        .select2-arrow {
            display: none;
        }
        .select2-search-choice {
            cursor: default;
            padding-left: 5px;
        }
    }
}

/* writing-mode vertical-rl, only for single select without search */
.writing-mode-vertical-rl {
    &.select2-container .select2-choice {
        height: auto;
        block-size: 26px;
        padding-block: 0;
        padding-inline: 8px 0;
    }
    &.select2-container.select2-allowclear .select2-choice .select2-chosen {
        margin-right: 0;
        margin-inline-end: 42px;
    }
    &.select2-container .select2-choice > .select2-chosen {
        margin-right: 0;
        margin-inline-end: 26px;
    }
    &.select2-container .select2-choice .select2-arrow {
        width: auto;
        height: auto;
        right: auto;
        top: auto;
        inline-size: 18px;
        block-size: 100%;
        inset-inline-end: 0;
        inset-block-start: 0;
    }
    &.select2-container .select2-choice .select2-arrow b {
        overflow: hidden;
    }
    &.select2-container .select2-choice .select2-arrow b:before {
        display: inline-block;
        transform: rotate(90deg);
    }

    &.select2-drop {
        writing-mode: vertical-rl;
        width: auto;
        margin-top: 0;
        top: auto;
        border-top-width: 1px;
        inline-size: 100%;
        margin-block-start: -1px;
        inset-block-start: 100%;
        border-block-start-width: 0;
        border-start-start-radius: 0;
        border-start-end-radius: 0;
        border-end-end-radius: 2px;
        border-end-start-radius: 2px;
    }
    &.select2-drop.select2-drop-above {
        margin-top: 0;
        border-top-width: 1px;
        border-bottom-width: 1px;
        margin-block-start: 1px;
        border-block-start-width: 1px;
        border-block-end-width: 0;
        border-start-start-radius: 2px;
        border-start-end-radius: 2px;
        border-end-end-radius: 0;
        border-end-start-radius: 0;
    }
    &.select2-drop-active {
        border-top-width: 1px;
        border-block-start-width: 0;
    }
    &:where(.select2-drop) .select2-results {
        max-height: none;
        max-block-size: 200px;
        margin-block: 4px;
        margin-inline: 0;
        overflow-x: auto;
        overflow-y: hidden;
    }
    &:where(.select2-drop) .select2-results .select2-result-label {
        min-height: auto;
        min-block-size: 1em;
        padding-block: 3px 4px;
        padding-inline: 7px;
    }
    &:where(.select2-drop) .select2-results .select2-no-results {
        padding-left: 0;
        padding-inline-start: 7px;
    }
}
