/**
 * @author zhixin wen <wenzhixin2010@gmail.com>
 * @modified matthew trigg
 *
 * background: url(/IMG/icons/multiple-select.svg) : save as "Optimized SVG (*.svg)" (in Inkscape)
 | convert at https://yoksel.github.io/url-encoder/
 *
 * *** UNIQUE TO PORTAL ***
 */

 :root {
    --multipleSelectSVG: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='40pt' height='40pt' version='1.0' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg%3E%3Cpath transform='scale(.75)' d='m14.084 7.416-6.668 6.668h2l4.668-4.668 4.666 4.668h2l-6.666-6.668z' fill='%23808080' fill-rule='evenodd' stroke-width='0'/%3E%3Cpath d='m29.454 10.563-5.001-5.001h1.5l3.501 3.501 3.4995-3.501h1.5z' fill='%23808080' fill-rule='evenodd' stroke-width='0'/%3E%3Cellipse transform='rotate(45)' cx='40.925' cy='-.17752' rx='3.9057' ry='3.8542' fill='none' stroke='%23808080' stroke-width='1.374'/%3E%3C/g%3E%3Crect transform='rotate(45)' x='44.506' y='-.82625' width='6.8567' height='1.1708' fill='%23808080'/%3E%3Cellipse transform='rotate(45)' cx='51.377' cy='-.24239' rx='.72534' ry='.58189' fill='%23808080'/%3E%3C/svg%3E%0A")
 }


.ms-parent {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    height: 42px;
    width: 100%;
}

.ms-choice {
    display: block;
    width: 100%;
    height: 42px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: left;
    white-space: nowrap;
    line-height: 19px;
    text-decoration: none;
    background-color: #fff;
    font-size: 13px;
    font-family: "Open Sans", Arial, sans-serif;
}

.ms-choice.disabled {
    background-color: #f4f4f4;
    background-image: none;
    border: 1px solid #ddd;
    cursor: default;
}

.ms-choice > span {
    top: 50%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    padding-left: 5px;
    padding-right: 60px;
}

.ms-choice > span.placeholder {
    color: #999;
}

.ms-choice > div > div.icon-close {
    position: absolute;
    top: -12px;
    right: 16px;
    height: 100%;
}

.ms-choice > div > div.icon-close:before {
    content: '×';
    color: #888;
    position: absolute;
    top: 50%;
    right: 29px;
    font-size: 30px;
    font-weight: 100;
    margin-top: 3px;
}
.ms-choice > div > div.icon-close:hover:before {
    color: #333;
}

.ms-choice > div:after {
    content: '';
    position: absolute;
    top: 10px;
    right: 15px;
    background: var(--multipleSelectSVG) left top no-repeat;
    width: 22.5px;
    height: 22.5px;
    background-position: -42.5px -3px;
    background-size: 75px 75.5px;
}

.ms-choice > div.open:after {
    height: 22.5px;
    width: 22.5px;
    background-position: -7px -4px;
    background-size: 75px 75.5px;
}

.ms-drop {
    width: 100%;
    overflow: hidden;
    display: none;
    margin-top: -1px;
    padding: 0;
    position: absolute;
    z-index: 1000;
    background: #fff;
    color: #000;
    border: 1px solid #aaa;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}

.ms-drop.bottom {
    -webkit-border-radius: 0px 0px 4px 4px;
    -moz-border-radius: 0px 0px 4px 4px;
    border-radius: 0px 0px 4px 4px;
    -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
    -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
}

.ms-drop.top {
    bottom: 71%;
    -webkit-border-radius: 4px 4px 0px 0px;
    -moz-border-radius: 4px 4px 0px 0px;
    border-radius: 4px 4px 0px 0px;
    -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15);
    -moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15);
    box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15);
}

.ms-search {
    display: inline-block;
    margin: 0;
    min-height: 26px;
    padding: 4px;
    position: relative;
    white-space: nowrap;
    width: 100%;
    z-index: 10000;
}

.ms-search input {
    width: 100%;
    height: auto !important;
    min-height: 36px;
    padding: 0 36px 0 5px;
    margin: 0;
    outline: 0;
    font-family: sans-serif;
    font-size: 1em;
    border: 1px solid #aaa;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    background: #fff var(--multipleSelectSVG) no-repeat 100% -25px;
    background: #fff var(--multipleSelectSVG) no-repeat 100% -25px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
    background: #fff var(--multipleSelectSVG) no-repeat 100% -25px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
    background: #fff var(--multipleSelectSVG) no-repeat 100% -25px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
    background: #fff var(--multipleSelectSVG) no-repeat 100% -25px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
    background: #fff var(--multipleSelectSVG) no-repeat 100% -25px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
    background: #fff var(--multipleSelectSVG) no-repeat 100% -25px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
    background-size: 65px 60px;
    background-position: calc(100% - 1px) -30px;
}

.ms-search,
.ms-search input {
    -webkit-box-sizing: border-box;
    -khtml-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
}

.ms-drop ul {
    overflow: auto;
    margin: 0;
    padding: 5px 8px;
    -webkit-transition: all .5s ease;
    -moz-transition: all .5s ease;
    transition: all .5s ease;
}

.ms-drop ul > li {
    list-style: none;
    display: list-item;
    background-image: none;
    position: static;
    padding: 10px;
}

.ms-no-results[style*="display: list-item"] ~ .ms-drop ul > li {
    display: none;
}

.ms-drop ul > li .disabled {
    opacity: 0.35;
    filter: Alpha(Opacity=35);
}

.ms-drop ul > li.multiple {
    display: block;
    float: left;
}

.ms-drop ul > li.group {
    clear: both;
}

.ms-drop ul > li.multiple label {
    width: 100%;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-drop ul > li label {
    font-weight: normal;
    display: block;
    white-space: nowrap;
}

.ms-drop ul > li label > span {
    padding-left: 5px;
    vertical-align: sub;
}

.ms-drop ul > li label.optgroup {
    font-weight: bold;
}

.ms-drop input[type="checkbox"] {
    appearance: none;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 25%;
    transform: scale(1);
    vertical-align: middle;
    border: 1px solid #b9b8c3;
    transition: all 0.2s ease;
}

.ms-drop input[type="checkbox"]:hover {
    border-color: rgba(71, 144, 193, 0.95);
    cursor: pointer;
}

.ms-drop input[type="checkbox"]:checked {
    border-color: rgba(71, 144, 193, 0.95);
    background: rgba(71, 144, 193, 0.95);
    animation: check 0.6s ease;
}

.ms-drop input[type="checkbox"]:checked:before {
        content: "L";
        color: white;
        font-size: 16px;
        text-align: center;
        transition: all 0.3s ease;
        transition-delay: 0.1s;
        transform: scale(-1, 1) rotate(316deg);
        margin-left: 2px;
        font-weight: 600;
        display: block;
}

.ms-drop input[type="checkbox"]:checked:after {
        transform: scale(2.2);
        opacity: 0;
        transition: all .6s ease;
}

.ms-drop input[type="checkbox"]:after {
        content: "";
        width: 100%;
        height: 100%;
        background: #506EEC;
        display: block;
        transform: scale(0);
        opacity: 1;
        border-radius: 50%;
        transition-delay: .2s;
        position: relative;
        top: -22px;
        transition: all 0s;
}

.ms-drop input[type="radio"] {
    appearance: none;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 100%;
    transform: scale(1);
    vertical-align: middle;
    border: 1px solid #b9b8c3;
    transition: all 0.2s ease;
}

.ms-drop input[type="radio"]:hover {
    border-color: rgba(71, 144, 193, 0.95);
    cursor: pointer;
}

.ms-drop input[type="radio"]:checked {
    border-color: rgba(71, 144, 193, 0.95);
    background: rgba(71, 144, 193, 0.95);
    animation: check 0.6s ease;
}

.ms-drop input[type="radio"]:checked:before {
        content: "";
        color: white;
        font-size: 16px;
        text-align: center;
        transition: all 0.3s ease;
        transition-delay: 0.1s;
        transform: scale(-1, 1) rotate(316deg);
        margin-left: 2px;
        font-weight: 600;
        display: block;
}

.ms-drop input[type="radio"]:checked:after {
        transform: scale(2.2);
        opacity: 0;
        transition: all .6s ease;
}

.ms-drop input[type="radio"]:after {
        content: "";
        width: 100%;
        height: 100%;
        background: #506EEC;
        display: block;
        transform: scale(0);
        opacity: 1;
        border-radius: 50%;
        transition-delay: .2s;
        margin-top: 0px;
}

.ms-drop .ms-no-results {
    display: none;
}