/* Main Padding */
.main {
	flex: 1 0 100%;
	align-content: flex-start;
	padding: 0 2.8rem;
	max-width: 100%;
}
body.page,
body.single {
	.main {
		padding: 0 2.8rem;
	}
}

/* Fixes background scrolling on chrome in iframe */
body.custom-background {
	backface-visibility: hidden;
}

.row:before,
.row:after {
	display: inline-block;
	}

.site-content {
	display: flex;
	flex-direction: column;
	flex: 1 0 auto;
}
@media only screen and (min-width: 768px) {
	.site-content {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

/** Headings **/
.palette-primary {
	@include headings() {
		font-style: normal;
		word-wrap: break-word;
		hyphens: auto;
	}
}

/* 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. */
.main {
	.btn,
	.button-primary,
	.button-secondary {
		&:hover,
		&:focus {
			text-decoration: none;
		}
	}
}

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;
		}
	}
}

.page-header {
	display: block;
	margin: 0;
	width: 100%;
}

// Header overlay element.
#wp-custom-header {
	&::after {
		content: '';
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 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;
}

// @TODO: allow display.
.bgtfw-edit-link {
	display: none !important;
	position: relative;
	width: auto;
	height: auto;
	float: left;
	padding: 0;
	margin: -1px 0 0 -1px;
	border: 0;
	background: transparent;
	color: transparent;
	-webkit-box-shadow: none;
	box-shadow: none;
	outline: none;
	z-index: 199;
}

.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: 201;
	-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;
}

.entry-footer span {
	display: flex;
	padding-left: 15px;
	padding-right: 15px;
	white-space: pre-wrap;
	width: 100%;
	&:last-child:not(.comments-link) {
		justify-content: flex-end;
		flex: 1 0 auto;
		padding-right: 15px;
	}
	&:first-child {
		padding-left: 15px;
	}
}

@-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);
	}
}
