/* Change default indent to Cherry Team Members Grid System */
.cherry-team.team-wrap {
	.cherry-team-row {
		margin-left: ($grid-gutter-width / -2);
		margin-right: ($grid-gutter-width / -2);

		[class*="col_"] {
			padding-left: ($grid-gutter-width / 2);
			padding-right: ($grid-gutter-width / 2);
			padding-bottom: $grid-gutter-width * 1.325;
		}
	}
	&.team-collapse-cols{
		[class*="col_"] {
			padding-bottom: 0;
		}
	}
	&.team-collapse-rows {
		.cherry-team-row {
			margin-left: 0;
			margin-right: 0;
		}
	}
	&.team-collapse-cols {
		.cherry-team-row [class*="col_"] {
			padding-left: 0;
			padding-right: 0;
		}
	}
}

/* Customization Style Cherry Team Members*/
.cherry-team.team-wrap .team-listing {
	text-align: center;
	padding: 0;
	align-items: stretch;

	.team-listing {
		&_photo {
			padding: 0;

			img {
				vertical-align: top;
				display: block;
				border-radius: 0;
				overflow: hidden;
			}
			&__wrap {
				position: relative;
				z-index: 10;
				margin: 0 0 22px;
				overflow: hidden;

				&:hover {
					.team-listing_photo__overflow,
					a {
						transform: translateY(0);
						opacity: 1;
					}
				}
			}
			&__overflow {
				position: absolute;
				width: 100%;
				height: 100%;
				top: 0;
				left: 0;
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				padding: 20px;
				opacity: 0;

				transform: translateY(250px);
				transition: .3s all;

				a {
					transform: translateY(100px);
					transition: .3s all;
					transition-delay: 50ms;
					opacity: 0;
				}
			}
		}
		&_name {
			margin-bottom: 0;
		}
		&_position {
			@include font-size(1);
			display: block;
		}
		&_desc {
			margin-top: 9px;
		}
	}
}

/* Grid-boxes template style */
$transition-time: cubic-bezier(0.600, -0.280, 0.735, 0.045);

.cherry-team.team-wrap.template-grid-boxes .team-listing {
	.team-listing {
		&_wrap {
			height: 100%;
		}

		&_photo {
			padding: 0;
		}

		&_content {
			display: flex;
			flex-direction: column;
			justify-content: center;
			transition: all 300ms ease-in;
			background-color: transparent;
			z-index: 1;
			opacity: 1;
			overflow: hidden;

			> * {
				transform: translateY(300%);
				transition: .3s $transition-time;
				opacity: 0;
			}

			> *:nth-child(1) {
				transition-delay: 0.2s;
			}
			> *:nth-child(2) {
				transition-delay: 0.15s;
			}
			> *:nth-child(3) {
				transition-delay: 0.1s;
			}
			> *:nth-child(4) {
				transition-delay: 0.05s;
			}

			&:before {
				content: "";
				position: absolute;
				left: 0;
				right: 0;
				top: 100%;
				bottom: 0;
				display: inline-block;
				z-index: -1;
				transition: .3s $transition-time;
				transition-delay: .25s;
			}

			&:hover {
				&:before {
					top: 0;
					transition: .300s cubic-bezier(0.780, 0.030, 0.000, 1.000);
					transition-delay: 0s;
				}

				> * {
					transform: translateY(0);
					transition: .45s cubic-bezier(0.640, 0.280, 0.280, 1.185);
					opacity: 1;
				}

				> *:nth-child(1) {
					transition-delay: 0.1s;
				}
				> *:nth-child(2) {
					transition-delay: 0.15s;
				}
				> *:nth-child(3) {
					transition-delay: 0.2s;
				}
				> *:nth-child(4) {
					transition-delay: 0.25s;
				}
			}
		}
		&_image:empty + .team-listing_content {
			position: static;
			.team-listing_position {
				margin-top: 0;
			}
			> * {
				opacity: 1;
				transform: translateY(0);
			}
			&:before {
				top: 0;
			}
		}
	}
}

/* Team socials */
.cherry-team.team-wrap .team-socials {
	@include grid-indent(15px, 'margin');
	padding: 5px 0 0 0;

	&_item {
		margin-top: 0;
		margin-bottom: 0;
	}
	&_link {
		width: auto;
		height: auto;
		color: $color__grey;
	}
	&_icon {
		font-size: 14px;
	}
	&_label {
		bottom: 60px;
	}
}
.team-socials_icon.fa {
	line-height: 1;
	height: auto;
}

/* Filters and loaders */
.team-container {
	.cherry-team-filter {
		text-align: center;
		margin-bottom: 40px;
		padding-bottom: 0;
		text-align: center;
		@include grid-indent(17.5px, margin);

		&_item {
			margin: 0;
		}

		&_link {
			@include font-size(1);
			font-weight: 700;
			border: none;
			padding: 5px 0;
		}
	}
	.team-more-btn {
		text-align: center;
		.ajax-more-btn {
			margin-top: 15px;
		}
	}

	.team-loader {
		/*rtl:ignore*/
		transform: translateX(-50%);
	}

	.team-ajax-pager {
		margin-top: 10px;
	}

	.nav-links {
		text-align: center;

		.page-numbers.current {
			pointer-events: none;
		}
	}
}

/* Team headings */
.team-heading {
	&_super_title,
	&_title,
	&_subtitle {
		text-align: center;
		margin-bottom: 35px;
		& + .cherry-team.team-wrap,
		& + .cherry-team-filter {
			margin-top: 67px;
		}
	}
}

/* Single team page */
.team-single-item {
	padding: 0;
	display: flex;

	.team-photo {
		float: none;
		padding: 0;
		text-align: center;
		margin-bottom: 40px;

		@include media-breakpoint-up(lg) {
			flex-basis: 360px;
			min-width: 360px;
			margin-bottom: 0;
			margin-right: $grid-gutter-width;
		}
	}

	.team-content-wrap {
		flex-grow: 1;
	}

	.team-name {
		margin: 0 0 1px;
	}
	.team-meta {
		float: none;
		margin-top: 10px;
		padding: 0;
	}
	.team-meta-location,
	.team-meta-phone,
	.team-meta-email {
		&:not(:empty) {
			margin-bottom: 11px;
		}
		a {
			text-decoration: underline;
		}
		i {
			font-size: 32px;
			display: inline-block;
			vertical-align: baseline;
			margin-right: 20px;
			position: relative;
			top: 1px;

			&.ui-1_email-84 {
				top: 3px;
			}
		}
	}
	.team-meta-title {
		padding-right: 5px;
	}
	.team-meta_item {
		display: inline;

		&:before {
			display: none;
		}
	}

	.team-content {
		margin-top: 10px;
	}
}

/* Team skills */
.team-skills {
	&_item {
		padding-bottom: 0;
		position: relative;
		& + .team-skills_item {
			margin-top: 30px;
		}
	}
	&_label {
		text-align: left;
		margin-bottom: 10px;
		padding-left: 65px;
	}
	&_bar {
		height: auto;
		background-color: rgba($color__dark, 0.1);
	}
	&_line {
		height: 19px;

		&:before {
			content: attr(data-width) '%';
			position: absolute;
			top: 0;
			left: 0;
		}
	}
}
