// -------------------------------------------------------------------
// :: BUTTONS
// -------------------------------------------------------------------
// Use hyperlinks for navigation, buttons for everything else
// Form buttons (input[type="submit", reset, ...) are normalized
// in base/_forms.scss, but use .button classes for styling

@include FLOW-normalize-buttons();


// -------------------------------------------------------------------
// :: BUTTON
// -------------------------------------------------------------------
// Solid button with full background color

@mixin FLOW-button() {

	display: inline-block;
	position: relative;

	overflow: hidden;
	text-align: center;
	text-decoration: none;
	vertical-align: middle;
	cursor: pointer;
	margin: 0;
	font-size: rem(15px);
	text-transform: uppercase;
	font-family: $font-family-bold;

	background: transparent;
	border: none;
	border-radius: rem(20px);
	line-height: rem(40px);
	padding: 0 1.6875rem;
	z-index: 1;

	color: $white;

	&:before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		width: rem(20px);
		bottom: 0;
		border-radius: rem(18px);
		z-index: -1;
		background: $primary-color-dark;
		opacity: 0;
		transform-origin: top left;
		transition: width 200ms ease-out, opacity 200ms ease-out;
	}

	&:after {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;

		z-index: -2;
		background: $gradient-red;
	}

	&:not([disabled]):hover {
		&:before {
			opacity: 1;
			width: 100%;
		}
	}

	&:not([disabled]):active {
		top: 1px;
	}

	&[disabled] {
		opacity: 0.5;
	}


	&--lg {
		line-height: rem(50px) !important;
		border-radius: rem(25px) !important;

		&:before,
		&:after {
			border-radius: rem(23px) !important;
		}
	}

	&--round {
		padding: 0 !important;
		width: rem(42px);
		height: rem(42px);
		border-radius: 100% !important;

		&:before,
		&:after {
			border-radius: 100% !important;
		}
	}

	&.a-button--lg.a-button--round {
		width: rem(50px);
		height: rem(50px);

	}

	.is-hidden {
		overflow: hidden;
		text-indent: -5000em;
		width: 0;
		height: 0;
		display: block;
	}
}


// -------------------------------------------------------------------
// :: GENERAL BUTTON
// -------------------------------------------------------------------

.a-button{
	@include FLOW-button();
}

.a-button--icon {
	text-decoration: none;
	display: block;
	color: $dark-extra;
}

// -------------------------------------------------------------------
// :: DECORATED BUTTONS
// -------------------------------------------------------------------
// Decorated buttons with icons before or after a text label

.a-button [class*='icon'] {
	display: inline-block;
	line-height: 1;
	vertical-align: text-top;
}

// Size & positioning
// inside buttons

.a-button [class*='icon']:before {
	position: relative;
}

.a-button span + [class*='icon'],
.a-button [class*='icon'] + span,
.a-button--outline span + [class*='icon'],
.a-button--outline [class*='icon'] + span {
	margin-left: 1em;
}
