@import "include-media";
@import "customizer-testimonials-body-colours";

.single-testimonial {
	article.testimonial {
		margin: 0 auto;
		max-width: 585px;
	}

	.entry-tabs {
		.tab-pane {
			padding: 4rem;

			@include media(">=phone") {
				padding: 4rem 2rem;
			}
		}

		.nav-tabs {
			&:before,
			&:after {
				display: none;
			}

			align-items: stretch;
			display: flex;
			flex-flow: column nowrap;
			justify-content: flex-start;
			border-bottom: 0 none;
			margin: 4.25rem 0;
			padding-left: 0;

			@include media(">=phone") {
				flex-flow: row nowrap;
			}

			& > li {
				margin-bottom: 0;
				width: 100%;

				@include media(">=phone") {
					display: flex;
					flex: 1 1 auto;
					max-width: 350px;
				}

				& + li {
					@include media(">=phone") {
						margin-left: 5px;
					}
				}

				& > a {
					border: 0 none;
					border-radius: 0;
					font-size: 16px;
					margin: 0;
					padding: 1rem 0;
					text-align: center;
					transition: all 300ms ease;

					@include media(">=phone") {
						align-items: center;
						display: flex;
						flex: 1 1 auto;
						justify-content: center;
					}

					@include media(">=tablet") {
						font-size: 22px;
					}
				}

				&.active > a {
					border: 0 none;
					position: relative;

					@include media(">=phone") {
						&:after {
							content: "";
							border-style: solid;
							border-width: 0 6px 6px 6px;
							bottom: 0;
							height: 0;
							left: 50%;
							position: absolute;
							transform: translateX(-50%);
							width: 0;

							@include media(">=tablet") {
								border-width: 0 9px 9px 9px;
							}
						}
					}
				}
			}
		}
	}

	.lsx-testimonials-avatar {
		border-radius: 50%;
		display: block;
		height: 100px;
		margin: 0 auto 10px;
		overflow: hidden;
		width: 100px;
	}

	.lsx-testimonials-meta-wrap {
		display: block;
		font-size: 13px;
		margin-top: 1.2rem;
		text-align: center;

		& > .lsx-testimonials-meta {
			margin: 0 4px;
		}
	}

	.lsx-testimonials-content {
		max-width: none;
	}
}

.widget.lsx-testimonials {
	.tagline {
		& + .lsx-testimonials-shortcode {
			margin-top: 0;
		}
	}
}

.lsx-testimonials-archive-link-wrap {
	position: relative;
	margin-top: 6rem;
	overflow: hidden;
}

.lsx-testimonials-archive-link {
	display: inline-block;
	position: relative;

	&:before,
	&:after {
		content: "";
		display: block;
		height: 2px;
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		width: 999rem;
	}

	&:before {
		right: 120%;
	}
	&:after {
		left: 120%;
	}
}

.lsx-testimonials-shortcode {
	margin-top: -4rem;
}

.lsx-testimonials-slot {
	margin-top: 4rem;

	&:only-child {
		@include media(">=phone") {
			float: none;
			margin-left: auto !important;
			margin-right: auto !important;
			max-width: 585px;
			width: 100% !important;
		}
	}

	.lsx-testimonials-avatar {
		border-radius: 50%;
		display: block;
		height: 100px;
		margin: 0 auto 2rem;
		overflow: hidden;
		width: 100px;
	}

	.lsx-testimonials-title {
		margin-bottom: 0;
		text-align: center;
	}

	.lsx-testimonials-content {
		margin-bottom: 2rem;
		margin-top: calc(25px + 1.2rem);
		width: 100%;
		color: #4a4a4a;
		@include media(">=tablet") {
			margin-top: calc(30px + 1.2rem);
			max-width: none;
		}

		.moretag {
			font-size: 15px;
			font-style: normal;

			&:after {
				content: "\f178";
				display: inline-block;
				font-family: "FontAwesome";
				font-size: inherit;
				margin-left: 5px;
				text-rendering: auto;

				-webkit-font-smoothing: antialiased;
				-moz-osx-font-smoothing: grayscale;
			}
		}
	}

	.lsx-testimonials-meta-wrap {
		display: block;
		font-size: 13px;
		margin-top: 1.2rem;
		text-align: center;

		& > .lsx-testimonials-meta {
			margin: 0 4px;
		}
	}
}

#lsx-testimonials-slider {
	@include media(">=tablet") {
		margin-left: auto;
		margin-right: auto;
		width: 100%;

		&.slick-has-arrows {
			width: calc(100% - 8rem);
		}
	}

	@include media(">=1280px") {
		margin-left: -15px;
		margin-right: -15px;
		width: calc(100% + 30px);

		&.slick-has-arrows {
			width: calc(100% + 30px);
		}
		&.lsx-testimonial-block {
			max-width: 60%;
			width: 60%;
			margin-left: auto;
			margin-right: auto;
			&.wide {
				max-width: 80%;
				width: 80%;
				margin-left: auto;
				margin-right: auto;
			}
			&.full {
				max-width: 100%;
				width: calc(100% + 30px);
				margin-left: -15px;
				margin-right: -15px;
			}
		}
	}

	.tab-pane &,
	.tab-pane-fake & {
		margin-left: -15px;
		margin-right: -15px;

		@include media(">=phone") {
			margin-left: auto;
			margin-right: auto;
			width: 100%;

			&.slick-has-arrows {
				width: calc(100% - 8rem);
			}
		}
	}

	.lsx-testimonials-slot.slick-slide {
		margin-left: 15px;
		margin-right: 15px;
	}

	.slick-dots {
		align-items: center;
		display: flex;
		flex-flow: row wrap;
		height: auto;
		justify-content: center;
		list-style: none;
		margin: 2rem 0 0;
		padding: 0;

		& > li {
			line-height: 1;
			padding: 5px;

			@include media(">=tablet") {
				padding: 0 7.5px;
			}

			& > button {
				background: transparent;
				border-style: solid;
				border-width: 1px;
				font: 0/0 a;
				height: 12px;
				transition: all 300ms ease-in-out;
				width: 4rem;

				@include media(">=tablet") {
					height: 6px;
				}
			}
		}
	}

	.slick-arrow {
		background: transparent;
		border-radius: 50%;
		border-style: solid;
		border-width: 2px;
		font: 0/0 a;
		height: 4rem;
		margin-top: calc((2rem - 17px) / 2);
		opacity: 1;
		padding: 0;
		position: absolute;
		text-shadow: none;
		top: 50%;
		transform: translateY(-50%);
		transition: border 300ms ease;
		width: 4rem;
		z-index: 3;

		&:before {
			display: block;
			font-family: "FontAwesome";
			font-size: 3rem;
			line-height: 1;
			position: absolute;
			text-rendering: auto;
			top: 47%;
			transform: translateY(-50%);
			transition: color 300ms ease;

			-webkit-font-smoothing: antialiased;
			-moz-osx-font-smoothing: grayscale;
		}

		&.slick-disabled {
			cursor: not-allowed;
		}

		&.slick-prev {
			left: -4rem;

			&:before {
				content: "\f104";
				left: 1.1rem;
			}
		}

		&.slick-next {
			right: -4rem;

			&:before {
				content: "\f105";
				left: 1.5rem;
			}
		}
	}
}

.gutenberg-compatible-template.using-gutenberg {
	.entry-content {
		.lsx-testimonial-block,
		.lsx-testimonials-shortcode {
			> .row {
				margin-left: auto;
				margin-right: auto;
			}
		}
	}
}

.post-type-archive-testimonial {
	.lsx-testimonials-container {
		&:last-of-type,
		&:only-of-type {
			.lsx-testimonials-slot {
				margin-bottom: 0;
			}
		}
	}

	.lsx-testimonials-slot {
		margin: 0 0 8.5rem;
		text-align: center;

		.lsx-testimonials-title {
			margin-bottom: 5px;
		}

		.lsx-testimonials-content {
			margin-top: calc(25px + 1.2rem);
			border-color: #dadddf;
			color: #4a4a4a;
			@include media(">=tablet") {
				margin-top: calc(30px + 1.2rem);
			}
		}
	}
}

@include customizer-testimonials-body-colours(
	#f6f6f6,
	#dadddf,
	#4a4a4a,
	#418ad0,
	#f7ae00,
	#919191
);
