
/* Container used for styling the custom select, the buttom class below adds the bg gradient, corners, etc. */
.custom-select {
    position: relative;
    display: block;
    margin-top: .5em;
    padding: 0;
}


/* This is the native select, we're making everything but the text invisible so we can see the button styles in the wrapper */
.custom-select select {
    /* General select styles: change as needed */
    font-family: helvetica, sans-serif;
    /* Font size must the 16px or larger to prevent iOS page zoom on focus */
    font-size: 1em;
    font-weight: bold;
    line-height: 1.3;
    /* Prefixed box-sizing rules necessary for older browsers */
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: .6em 1.9em .5em .8em;
    color: #444444;
    border: 1px solid transparent;
    outline: none;
    background: none;
    /* Remove select styling */
            appearance: none;
    -webkit-appearance: none;
}


/* Custom arrow sits on top of the select - could be an image, SVG, icon font, etc. or the arrow could just baked into the bg image on the select. Note this si a 2x image so it will look bad in browsers that don't support background-size. In production, you'd handle this resolution switch via media query but this is a demo. */

.custom-select::after {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 1em;
    width: 9px;
    height: 8px;
    margin-top: -4px;
    content: '';
    /* This hack make the select behind the arrow clickable in some browsers */
    pointer-events: none;
    background-image: url(/media/img/rankings/select-arrow.png);
    background-repeat: no-repeat;
    background-size: 100%;
}


/* Hover style */
/*.custom-select:hover {
  border:1px solid #888;
}*/

/* Focus style */
.custom-select select:focus {
    color: #222222;
    border: 1px solid #AAAAAA;
    outline: none;
    /*box-shadow: 0 0 1px 3px rgba(180,222,250, 1);*/
    background-color: transparent;
}

/* Set options to normal weight */
.custom-select option {
    font-weight: normal;
}






/* ------------------------------------  */
/* START OF UGLY BROWSER-SPECIFIC HACKS */
/* ----------------------------------  */

/* OPERA - Pre-Blink nix the custom arrow, go with a native select button to keep it simple. Targeted via this hack http://browserhacks.com/#hack-a3f166304aafed524566bc6814e1d5c7 */
x:-o-prefocus,
 .custom-select::after {
    display: none;
}

/* IE 10/11+ - This hides native dropdown button arrow so it will have the custom appearance, IE 9 and earlier get a native select - targeting media query hack via http://browserhacks.com/#hack-28f493d247a12ab654f6c3637f6978d5 - looking for better ways to achieve this targeting */
/* The second rule removes the odd blue bg color behind the text in the select button in IE 10/11 and sets the text color to match the focus style's - fix via http://stackoverflow.com/questions/17553300/change-ie-background-color-on-unopened-focused-select-box */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .custom-select select::-ms-expand {
        display: none;
    }
    .custom-select select:focus::-ms-value {
        color: #222222;
        background: transparent;
    }
}


/* FIREFOX won't let us hide the native select arrow, so we have to make it wider than needed and clip it via overflow on the parent container. The percentage width is a fallback since FF 4+ supports calc() so we can just add a fixed amount of extra width to push the native arrow out of view. We're applying this hack across all FF versions because all the previous hacks were too fragile and complex. You might want to consider not using this hack and using the native select arrow in FF. Note this makes the menus wider than the select button because they display at the specified width and aren't clipped. Targeting hack via http://browserhacks.com/#hack-758bff81c5c32351b02e10480b5ed48e */
/* Show only the native arrow */
@-moz-document url-prefix() {
    .custom-select {
        overflow: hidden;
    }
    .custom-select select {
        width: 120%;
        width: calc(100% + em);
    }
}

/* Firefox focus has odd artifacts around the text, this kills that. See https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-focusring */
.custom-select select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #000000;
}



/* ------------------------------------  */
/*  END OF UGLY BROWSER-SPECIFIC HACKS  */
/* ------------------------------------  */
