/* Container used for styling the custom select, the buttom class below adds the
 * bg gradient, corners, etc. */
.custom-select {
	color: #fff;
	position: relative;
	display: block;
	border-bottom: 1px solid;
	margin: 0 0 0 auto;
}

/* 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 {
	width: 100%;
	height: 100%;
	margin: 0;
	outline: none;
	padding: 0.25em 0.5em;
	/* Prefixed box-sizing rules necessary for older browsers */
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;

	/* Font size must be 16px to prevent iOS page zoom on focus */
	font-size: 16px;
	color: inherit;
}

.custom-select select option {
	color: #333;
}

.custom-select select:focus {
	outline: 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. */
.custom-select::after {
	content: " ";
	position: absolute;
	top: 50%;
	right: 0.75em;
	z-index: 2;
	/* These hacks make the select behind the arrow clickable in some browsers */
	pointer-events: none;
	display: none;
	width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 7px solid #fff;
    margin-top: -2px;
}

@supports ( -webkit-appearance: none ) or ( appearance: none )
	/* Firefox <= 34 has a false positive on @supports( -moz-appearance: none )
	 * @supports ( mask-type: alpha ) is Firefox 35+
	 */
	or ( ( -moz-appearance: none ) and ( mask-type: alpha ) ) {
	
	/* Show custom arrow */
	.custom-select::after {
		display: block;
	}

	/* Remove select styling */
	.custom-select select {
		padding-right: 2em; /* Match-01 */
		/* inside @supports so that iOS <= 8 display the native arrow */
		background: none; /* Match-04 */
		/* inside @supports so that Android <= 4.3 display the native arrow */
		border: 1px solid transparent; /* Match-05 */

		-webkit-appearance: none;
		-moz-appearance: none;
		appearance: none;
	}
	.custom-select select:focus {
		border-color: transparent; /* Match-03 */
	}
}

/* IE 10/11+ - This hides native dropdown button arrow so it will have the custom appearance. 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 {
		border-color: #aaa; /* Match-03 */
	}
	.custom-select select:focus::-ms-value {
		background: transparent;
		color: #222; /* Match-02*/
	}
	.custom-select select {
		padding-right: 2em; /* Match-01 */
		background: none; /* Match-04 */
		border: 1px solid transparent; /* Match-05 */
	}
	.custom-select::after {
		display: block;
	}
}
