/**
 * #.# Styles
 *
 * CSS for both Frontend+Backend.
 */

.wp-block-uagb-testimonial.uagb-slick-carousel ul.slick-dots {
	margin-bottom: 20px;
}

.uagb-testimonial__wrap {
	box-sizing: border-box;
}

.uagb-testimonial__wrap,
.uagb-testimonial__wrap * {
	transition: all 0.2s;
}

.uagb-icon-wrap .uagb-icon {
	display: inline-block;
}

.uagb-tm__image-content img {
	height: auto !important;
}

.uagb-tm__image,
.uagb-testimonial__wrap,
.uagb-tm__content,
.uagb-tm__text-wrap {
	position: relative;
}

.uagb-tm__imgicon-style-circle .uagb-tm__image img {
	border-radius: 100%;
}

.uagb-tm__imgicon-style-square .uagb-tm__image img {
	border-radius: 0%;
}

.uagb-tm__image img,
.slick-slide .uagb-tm__image img {
	display: inline-block;
	box-sizing: content-box;
}

.uagb-tm__content {
	overflow: hidden;
	text-align: center;
	word-break: break-word;
	border-radius: inherit;
	display: grid;
}

.uagb-tm__image-position-left .uagb-tm__content,
.uagb-tm__image-position-right .uagb-tm__content {
	display: flex;
}

.uagb-tm__meta-inner {
	display: inline;
	width: 100%;
	line-height: 1;
}

.uagb-tm__image-position-bottom .uagb-tm__image-content,
.uagb-tm__image-position-bottom .uagb-testimonial-details {
	display: table-cell;
	vertical-align: middle;
}

.uagb-tm__image-position-bottom .uagb-tm__image-content {
	padding-right: 10px;
}

.uagb-tm__author-name,
.uagb-tm__company {
	display: block;
}

.uagb-tm__image-aligned-middle .uagb-tm__image-content {
	align-self: center;
}

.uagb-tm__author-name {
	font-size: 30px;
	line-height: 16px;
}

.uagb-tm__company {
	font-size: 15px;
	font-style: normal;
	line-height: 16px;
	color: #888;
}

.uagb-tm__overlay {
	height: 100%;
	width: 100%;
	top: 0;
	left: 0;
	position: absolute;
	background: transparent;
}

.uagb-tm__items {
	visibility: hidden;
}

.uagb-tm__items.slick-initialized {
	visibility: visible;
}

.uagb-tm__image-position-top .uagb-tm__image-content {
	display: flex;
	justify-content: center;
}

/* Slick CSS */
.uagb-slick-carousel {
	&.uagb-tm__arrow-outside .slick-next {
		right: -45px;
	}

	&.uagb-tm__arrow-inside {
		.slick-prev {
			left: 25px;
			z-index: 1;
		}

		.slick-next {
			right: 25px;
		}
	}
}

[dir="rtl"] {
	.uagb-tm__arrow-inside {
		&.uagb-slick-carousel {
			.slick-prev {
				left: auto;
				right: 25px;
			}

			.slick-next {
				left: 25px;
				right: auto;
			}
		}
	}

	.uagb-tm__arrow-outside {
		&.uagb-slick-carousel {
			.slick-prev {
				right: auto;
				left: -45px;
			}

			.slick-next {
				left: auto;
				right: -45px;
			}
		}
	}
}

@media ( min-width: 1025px ) {
	.wp-block-uagb-testimonial.uagb-post__carousel_notset {
		.slick-slide:last-child .uagb-testimonial__wrap {
			padding-right: 0;
		}

		.slick-slide:first-child .uagb-testimonial__wrap {
			padding-left: 0;
		}

		.uagb-testimonial__wrap {
			margin-bottom: 0;
		}
	}
}

@media ( max-width: 976px ) {
	.wp-block-uagb-testimonial.uagb-post__carousel_notset-tablet {
		.uagb-testimonial__wrap {
			margin-bottom: 0;
		}

		.slick-slide:last-child .uagb-testimonial__wrap {
			padding-right: 0;
		}

		.slick-slide:first-child .uagb-testimonial__wrap {
			padding-left: 0;
		}
	}

	.uagb-tm-stacked-tablet {
		&.uagb-tm__image-position-bottom {
			.uagb-tm__image-content,
			.uagb-testimonial-details {
				display: block;
				vertical-align: middle;
			}
		}

		&.uagb-tm__image-position-left,
		&.uagb-tm__image-position-right {
			.uagb-tm__content {
				display: block;
			}
		}

		&.uagb-tm__image-position-right {
			&.uagb-tm-reverse-order-tablet .uagb-tm__content {
				display: inline-flex;
				flex-direction: column-reverse;
			}
		}

		&.uagb-tm__image-aligned-top {
			.uagb-tm__image-content {
				display: inline-flex;
				align-self: center;
			}
		}
	}

	.uagb-slick-carousel {
		&.uagb-tm__arrow-outside {
			.slick-prev {
				left: -10px;
				z-index: 1;
			}

			.slick-next {
				right: -10px;
			}
		}
	}

	[dir="rtl"] {
		.uagb-slick-carousel {
			&.uagb-tm__arrow-outside {
				.slick-prev {
					left: auto;
					right: 15px;
				}

				.slick-next {
					left: 15px;
					right: auto;
				}
			}
		}
	}
}

@media ( max-width: 768px ) {
	.wp-block-uagb-testimonial.uagb-post__carousel_notset-mobile {
		.uagb-testimonial__wrap {
			margin-bottom: 0;
		}

		.slick-slide:last-child .uagb-testimonial__wrap {
			padding-right: 0;
		}

		.slick-slide:first-child .uagb-testimonial__wrap {
			padding-left: 0;
		}
	}

	.uagb-tm-stacked-mobile {
		&.uagb-tm__image-position-bottom {
			.uagb-tm__image-content,
			.uagb-testimonial-details {
				display: block;
				vertical-align: middle;
			}
		}

		&.uagb-tm__image-position-left,
		&.uagb-tm__image-position-right {
			.uagb-tm__content {
				display: block;
			}
		}

		&.uagb-tm__image-position-right {
			&.uagb-tm-reverse-order-mobile .uagb-tm__content {
				display: inline-flex;
				flex-direction: column-reverse;
			}
		}

		&.uagb-tm__image-aligned-top {
			.uagb-tm__image-content {
				display: inline-flex;
				align-self: center;
			}
		}
	}
}

.entry-content {
	.wp-block-uagb-testimonial
	.is-carousel {
		ul.slick-dots {
			padding: unset; // To resolve an issue of dots are not in center on front-end, unseting padding of ul of slick-dots.
		}
	}
}
