/** Headings **/
.palette-primary {
	@include headings() {
		line-height: 1.1;
	}
}

/* Removes Blue Box in Chrome */
*:focus {
	outline: 0;
}

img {
	height: auto;
	max-width: 100%;
}

table {
	margin: 0 0 1.5em;
	width: 100%;
}

blockquote {
	border-left: 5px solid currentColor;
	font-size: 1.125em;
	p {
		font-size: 1.125em;
	}
}

/* Support for button wrapping classes. */
div {
	&.btn,
	&.button-primary,
	&.button-secondary {
		position: relative;

		a {
			color: currentColor !important;
		}

		a:after {
			position: absolute;
			content: '';
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
		}
	}
}

/* Post/Page password protected styles */
.post-password-form .button-primary {
	margin-left: 9px;
}

/* Adds bgtfw default fieldset lengend styles */
.palette-primary legend {
	color: currentColor;
	border-bottom: none;
}

/* Edit Post Links */
.bgtfw-edit-link {
	position: absolute;
	float: left;
	width: 1px; /* required to have a size to be focusable in Safari */
	height: 1px;
	padding: 0;
	margin: -1px 0 0 -1px;
	border: 0;
	background: transparent;
	color: transparent;
	-webkit-box-shadow: none;
	box-shadow: none;
	outline: none;
	z-index: 5;
}

.bgtfw-edit-link a {
	position: absolute;
	left: -32px;
	top: 2px;
	color: #fff;
	width: 30px;
	height: 30px;
	min-width: 30px;
	min-height: 30px;
	line-height: 1em !important;
	font-size: 18px;
	z-index: 5;
	-webkit-border-radius: 50%;
	border-radius: 50%;
	border: 2px solid #fff;
	-webkit-box-shadow: 0 2px 1px rgba(46,68,83,0.15);
	box-shadow: 0 2px 1px rgba(46,68,83,0.15);
	text-align: center;
	cursor: pointer;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	padding: 3px;
	-webkit-animation-fill-mode: both;
	animation-fill-mode: both;
	-webkit-animation-duration: .4s;
	animation-duration: .4s;
	opacity: 0;
	pointer-events: none;
}

.bgtfw-edit-link a svg {
	min-width: 20px;
	min-height: 20px;
	width: 20px;
	height: 20px;
	margin: auto;
}

.bgtfw-edit-link a:hover {
	opacity: 1;
}

body.bgtfw-edit-links-shown .bgtfw-edit-link a {
	-webkit-animation-name: bgtfw-edit-link-bounce-appear;
	animation-name: bgtfw-edit-link-bounce-appear;
	pointer-events: auto;
}
body.bgtfw-edit-links-hidden .bgtfw-edit-link a {
	-webkit-animation-name: bgtfw-edit-link-bounce-disappear;
	animation-name: bgtfw-edit-link-bounce-disappear;
	pointer-events: none;
}

.bgtfw-edit-link-hidden .bgtfw-edit-link a {
	visibility: hidden;
}

@-webkit-keyframes bgtfw-edit-link-bounce-appear {
	from, 20%, 40%, 60%, 80%, to {
		-webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
		animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
	}
	0% {
		opacity: 0;
		-webkit-transform: scale3d(.3, .3, .3);
		transform: scale3d(.3, .3, .3);
	}
	20% {
		-webkit-transform: scale3d(1.1, 1.1, 1.1);
		transform: scale3d(1.1, 1.1, 1.1);
	}
	40% {
		-webkit-transform: scale3d(.9, .9, .9);
		transform: scale3d(.9, .9, .9);
	}
	60% {
		opacity: 1;
		-webkit-transform: scale3d(1.03, 1.03, 1.03);
		transform: scale3d(1.03, 1.03, 1.03);
	}
	80% {
		-webkit-transform: scale3d(.97, .97, .97);
		transform: scale3d(.97, .97, .97);
	}
	to {
		opacity: 1;
		-webkit-transform: scale3d(1, 1, 1);
		transform: scale3d(1, 1, 1);
	}
}

@keyframes bgtfw-edit-link-bounce-appear {
	from, 20%, 40%, 60%, 80%, to {
		-webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
		animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
	}
	0% {
		opacity: 0;
		-webkit-transform: scale3d(.3, .3, .3);
		transform: scale3d(.3, .3, .3);
	}
	20% {
		-webkit-transform: scale3d(1.1, 1.1, 1.1);
		transform: scale3d(1.1, 1.1, 1.1);
	}
	40% {
		-webkit-transform: scale3d(.9, .9, .9);
		transform: scale3d(.9, .9, .9);
	}
	60% {
		opacity: 1;
		-webkit-transform: scale3d(1.03, 1.03, 1.03);
		transform: scale3d(1.03, 1.03, 1.03);
	}
	80% {
		-webkit-transform: scale3d(.97, .97, .97);
		transform: scale3d(.97, .97, .97);
	}
	to {
		opacity: 1;
		-webkit-transform: scale3d(1, 1, 1);
		transform: scale3d(1, 1, 1);
	}
}

@-webkit-keyframes bgtfw-edit-link-bounce-disappear {
	from, 20%, 40%, 60%, 80%, to {
		-webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
		animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
	}
	0% {
		opacity: 1;
		-webkit-transform: scale3d(1, 1, 1);
		transform: scale3d(1, 1, 1);
	}
	20% {
		-webkit-transform: scale3d(.97, .97, .97);
		transform: scale3d(.97, .97, .97);
	}
	40% {
		opacity: 1;
		-webkit-transform: scale3d(1.03, 1.03, 1.03);
		transform: scale3d(1.03, 1.03, 1.03);
	}
	60% {
		-webkit-transform: scale3d(.9, .9, .9);
		transform: scale3d(.9, .9, .9);
	}
	80% {
		-webkit-transform: scale3d(1.1, 1.1, 1.1);
		transform: scale3d(1.1, 1.1, 1.1);
	}
	to {
		opacity: 0;
		-webkit-transform: scale3d(.3, .3, .3);
		transform: scale3d(.3, .3, .3);
	}
}

@keyframes bgtfw-edit-link-bounce-disappear {
	from, 20%, 40%, 60%, 80%, to {
		-webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
		animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
	}
	0% {
		opacity: 1;
		-webkit-transform: scale3d(1, 1, 1);
		transform: scale3d(1, 1, 1);
	}
	20% {
		-webkit-transform: scale3d(.97, .97, .97);
		transform: scale3d(.97, .97, .97);
	}
	40% {
		opacity: 1;
		-webkit-transform: scale3d(1.03, 1.03, 1.03);
		transform: scale3d(1.03, 1.03, 1.03);
	}
	60% {
		-webkit-transform: scale3d(.9, .9, .9);
		transform: scale3d(.9, .9, .9);
	}
	80% {
		-webkit-transform: scale3d(1.1, 1.1, 1.1);
		transform: scale3d(1.1, 1.1, 1.1);
	}
	to {
		opacity: 0;
		-webkit-transform: scale3d(.3, .3, .3);
		transform: scale3d(.3, .3, .3);
	}
}
