div.fancy-select {
    position: relative;
    width: 100%;
    font-weight: 400;
    font-size: 17px;
    height: 54px;
    color: rgb(10, 20, 30);
}

div.fancy-select .fancified {
    right: 0 !important;
}

div.fancy-select select {
    position: relative;
    width: 100% !important;
}

div.fancy-select.disabled {
    opacity: 0.5;
}

div.fancy-select select:focus + div.trigger.open {
    box-shadow: none;
}

div.fancy-select div.trigger {
    border-radius: 4px;
    cursor: pointer;
    height: 54px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    background: transparent;
    border: none;
    width: auto;
    line-height: 54px;
    text-align: right;
    padding: 0 50px 0 0;

    transition: all 240ms ease-out;
    -webkit-transition: all 240ms ease-out;
    -moz-transition: all 240ms ease-out;
    -ms-transition: all 240ms ease-out;
    -o-transition: all 240ms ease-out;
}

div.fancy-select div.trigger:after {
    content: "";
    display: block;
    position: absolute;
    width: 40px;
    height: 54px;
    top: 0;
    right: 10px;
    background: url(/images/arrow-down.svg) no-repeat;
    background-position: right center;
    background-size: 18px;
}

div.fancy-select div.trigger.open {
    box-shadow: none;
    border: none;
}

div.fancy-select ul.options {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 60px;
    right: 0;
    visibility: hidden;
    opacity: 0;
    z-index: 9994;
    max-height: 40vh;
    overflow: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    -webkit-box-shadow: 0px 3px 10px 0px rgba(0,0,0,0.1);
    -moz-box-shadow: 0px 3px 10px 0px rgba(0,0,0,0.1);
    box-shadow: 0px 3px 10px 0px rgba(0,0,0,0.1);
    border: solid 1px rgba(10,20,30, 0.1);
    width: 60%;
    overflow: auto;

    transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out;
    -webkit-transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out;
    -moz-transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out;
    -ms-transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out;
    -o-transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out;
}

div.fancy-select ul.options:after {
    content: "";
    display: block;
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    right: 20%;
    width: 0;
    height: 0;
    overflow: visible;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;

    border-bottom: 10px solid rgba(20, 30, 40, 0.9);
}

.fancyWrapper.right .fancy-select ul.options {
    left: auto;
    right: 0;
}

div.fancy-select ul.options.open {
    visibility: visible;
    top: 50px;
    opacity: 1;

    /* have to use a non-visibility transition to prevent this iOS issue (bug?): */
    /*http://stackoverflow.com/questions/10736478/css-animation-visibility-visible-works-on-chrome-and-safari-but-not-on-ios*/
    transition: opacity 300ms ease-out, top 300ms ease-out;
    -webkit-transition: opacity 300ms ease-out, top 300ms ease-out;
    -moz-transition: opacity 300ms ease-out, top 300ms ease-out;
    -ms-transition: opacity 300ms ease-out, top 300ms ease-out;
    -o-transition: opacity 300ms ease-out, top 300ms ease-out;
}

div.fancy-select ul.options.overflowing {
    top: auto;
    bottom: 40px;

    transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out;
    -webkit-transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out;
    -moz-transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out;
    -ms-transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out;
    -o-transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out;
}

div.fancy-select ul.options.overflowing:after {
    content: "";
    display: block;
    position: absolute;
    width: 10px;
    height: 10px;
    top: auto;
    bottom: -20px;
    right: 20%;
    width: 0;
    height: 0;
    overflow: visible;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-top: 10px solid rgba(20, 30, 40, 0.9);
}

div.fancy-select ul.options.overflowing.open {
    top: auto;
    bottom: 50px;

    transition: opacity 300ms ease-out, bottom 300ms ease-out;
    -webkit-transition: opacity 300ms ease-out, bottom 300ms ease-out;
    -moz-transition: opacity 300ms ease-out, bottom 300ms ease-out;
    -ms-transition: opacity 300ms ease-out, bottom 300ms ease-out;
    -o-transition: opacity 300ms ease-out, bottom 300ms ease-out;
}

div.fancy-select ul.options li {
    position: relative;
    width: 100%;
    padding: 14px 15px;
    color: rgba(10, 20, 30, 1);
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    text-align: left;
    font-size: 17px;
    border-bottom: 1px solid rgba(245, 245, 245, 1);

    transition: all 150ms ease-out;
    -webkit-transition: all 150ms ease-out;
    -moz-transition: all 150ms ease-out;
    -ms-transition: all 150ms ease-out;
    -o-transition: all 150ms ease-out;
}

div.fancy-select ul.options li:hover:after {
    content: "";
    display: block;
    position: absolute;
    width: 40px;
    height: 100%;
    top: 0;
    right: 20px;
    background: url(/images/check.svg) no-repeat;
    background-position: right center;
    background-size: 18px;
}

div.fancy-select ul.options li.selected {
    background: rgba(25, 50, 80, 1);
    color: rgba(255, 255, 255, 1);
}

div.fancy-select ul.options li.selected:after {
    content: "";
    display: block;
    position: absolute;
    width: 40px;
    height: 100%;
    top: 0;
    right: 20px;
    background: url(/images/check-white.svg) no-repeat;
    background-position: right center;
    background-size: 18px;
}

div.fancy-select ul.options li.selected:hover {
    background: rgba(25, 50, 80, 1);
    color: rgba(255, 255, 255, 1);
}