// Dropdown
// 
// This is a dropdown menu, but the old version. You should check out the Select menu now.

// Dropdown
// 
// Markup:
// <div class="dd"></div>
// 
// .msg-alert			- alert messaging

.dropdown {
	position: relative;

	display: inline-block;

	line-height: normal;

	-moz-border-radius: @radius;
	     border-radius: @radius;
	.dropdown-list {
		.radius;

		padding: 0;

		list-style-type: none;
	}
	.dropdown-label {
		display: block;
		padding: 5px;

		white-space: nowrap;
		cursor: pointer;
		&:hover {
			color: @dd-label-color-hover;

			background-color: @dd-label-bgcolor-hover;
		}
	}
	.dropdown-input {
		.pos(absolute);

		left: -9999px;
		&:checked + .dd-label {
			color: @dd-input-color;

			background-color: @dd-input-bgcolor;
			&:hover {
				background-color: @dd-input-bgcolor-hover;
			}
		}
	}
	.dropdown-active {
		display: inline-block;
		padding: .25rem .5rem;

		color: @font-color;
		text-decoration: none;
		cursor: pointer;
		&.open {
			~ .dd-list {
				display: inline-block;
			}
		}
	}
	// DROPDOWN SPECIFIC STYLES
	.transport {
		display: inline-block;
		> .top {
			margin-top: -((@px * .5) / 2);
			margin-bottom: ((@px * .5) / 2);

			border-right-width: (@px * .5);
			border-bottom-width: (@px * .5);
			border-left-width: (@px * .5);
		}
		> .bottom {
			margin-top: -((@px * .5) / 2);
			margin-bottom: ((@px * .5) / 2);

			border-top-width: (@px * .5);
			border-right-width: (@px * .5);
			border-left-width: (@px * .5);
		}
	}
}

// when a dropdown is in a button group
.btn-group {
	.dropdown {
		&:last-child,
		&.last {
			.dropdown-active {
				border-left-width: 0;
				-moz-border-radius: 0 @radius @radius 0;
				     border-radius: 0 @radius @radius 0;
			}
		}
		&:first-child,
		&.first {
			float: left;
			.dropdown-active {
				border-left-width: 1px;
				-moz-border-radius: @radius 0 0 @radius;
				     border-radius: @radius 0 0 @radius;
			}
		}
	}
}
