/**
* @version   $Id: mixins.less 12813 2013-08-16 21:57:09Z arifin $
* @author    RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2014 RocketTheme, LLC
* @license   http://www.rockettheme.com/legal/license.php RocketTheme Proprietary Use License
*/

@import "utilities.less";
@import "dropdowns.less";
@import "popover.less";
@import "buttons.less";

// Hexagon
.hexagon(@width: 160px, @height: 100px, @background: #FFFFFF) {
	width: @width;
	height: @height;
	margin: (@width / 2) auto;
	line-height: @height;
	background: @background;
	position: relative;
	&:before {
		content: "";
		position: absolute;
		top: -(@width / 4);
		left: 0;
		width: 0;
		height: 0;
		border-left: (@width / 2) solid transparent;
		border-right: (@width / 2) solid transparent;
		border-bottom: (@width / 4) solid @background;
	}
	&:after {
		content: "";
		position: absolute;
		bottom: -(@width / 4);
		left: 0;
		width: 0;
		height: 0;
		border-left: (@width / 2) solid transparent;
		border-right: (@width / 2) solid transparent;
		border-top: (@width / 4) solid @background;
	}
}

/* Ellipsis */
.ellipsis() {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	-webkit-text-overflow: ellipsis;
	-moz-text-overflow: ellipsis;
	-o-text-overflow: ellipsis;
	-ms-text-overflow: ellipsis;
}

// Text Color
.textColor (@a) when (lightness(@a) >= 40%) {
	color: darken(@a, 20%);
}
.textColor (@a) when (lightness(@a) < 40%) {
	color: lighten(@a, 20%);
}

// Accent Color
.accentColor (@a1, @a2, @background) when (@a1 = @background), (@a2 = @background) {
	a {
		color: darken(@background, 20%);
		&:hover {
			color: darken(@background, 30%);
		}
	}
	.readon {
		.buttonStyleFlat(@white, darken(@background, 10%), 0px);
		&:hover {
			.buttonStyleFlat(@white, darken(@background, 20%), 0px);
		}
	}
}

// System Messages
.sys-msg-style (@textColor: #0055BB, @bgColor: #BFD3E6) {
	color: @textColor;
	padding: 15px;
	border-radius: 4px;
	#gradient > .vertical(darken(@bgColor, 5%), darken(@bgColor, 5%));
}
.sys-msg () {
	.sys-msg-style(#0055BB, #BFD3E6);
}
.sys-msg (info) {
	.sys-msg-style(#4A677D, #B2CADA);
}
.sys-msg (error) {
	.sys-msg-style(#CC0000, #EFD3D4);
}

.sys-msg (notice) {
	.sys-msg-style(#A08B4C, #F5ECC1);
}
.sys-msg (success) {
	.sys-msg-style(#468847, #DFF0D8);
}