$jobCardContentVerticalPadding: 20px;
$jobCardContentVerticalPaddingSmall: 10px;
$jobCardContentHorizontalPadding: 20px !default;

/* Custom UI Cards Images */
.ui.card,
.ui.cards {
	> .image,
	> .card > .image {
		display: block;
		width: 100%;
		background: $whiteColor;

		.card-image-clipper {
			position: relative;
			overflow: hidden;
			width: 100%;
			height: 100%;
		}
		.card-image-helper{
			height: 0;
			padding-bottom: 66.6666%;
			overflow: hidden;
			display: table;
			width: 100%;
		}
		img {
			display: block;
			width: 100%;
			height: auto;
			border-radius: inherit;
			position: absolute;
			left: 0;
			right: auto;
			top: 50%;
			-webkit-transform: translateY(-50%);
			transform: translateY(-50%);

			&.card-blurry-bg {
				position: absolute;
				top: 0;
				right: 0;
				bottom: 0;
				left: 0;
				width: 100%;
				height: 100%;
				z-index: 0;
				transform: scale(1.1);
				-webkit-filter: blur(20px);
				filter: blur(20px);
				opacity: .6;
			}
		}
		.card-image-icons {
			position: absolute;
			height: 1.4em;

			&.top {
				top: -0.7em;
				width: calc(100% - 2em);
				margin: 0 1em;
			}

			&.bottom {
				bottom: -0.7em;
				width: calc(100% - 0.4em);
				margin: 0 0.2em;
			}
		}
	}
}

/* Custom UI Cards Pusher */
.ui.card,
.ui.cards > .card {
	&:hover {
		.card-pusher-master {
			-webkit-transform: translateY(2.5em);
			transform: translateY(2.5em);
		}
		.card-pusher-slave {
			-webkit-transform: translateY(2.5em);
			transform: translateY(2.5em);
		}
	}
	@include big-tablet {
		.card-pusher-master {
			-webkit-transform: translateY(2.5em);
			transform: translateY(2.5em);
		}
		.card-pusher-slave {
			-webkit-transform: translateY(2.5em);
			transform: translateY(2.5em);
		}
	}
	.card-pusher-master {
		margin-top: -2.5em;
		padding: 0.5em 0.75em;
		height: 2.5em;
		max-height: 2.5em;
		display: flex;
		-webkit-transition: transform 0.15s;
		transition: transform 0.15s;
	}
	.card-pusher-slave {
		-webkit-transition: transform 0.15s;
		transition: transform 0.15s;
	}
	.card-pusher-cover {
		z-index: 1;
		background: $whiteColor;
	}
}

/* Custom UI Cards Stars */
.ui.cards > .card > .content,
.ui.card > .content {
	.wpj-star-rating-static {
		font-size: 1.2em;
		line-height: 1.5rem;
		display: inline-block;

		.star.icon {
			color: #F2B827;
			cursor: auto;
			opacity: 1;
			margin: 0;
			width: 0.8em;
			&:hover {
				color: #F2B827;
			}
		}
	}
	.wpj-star-rating-static-single {
		line-height: 1.5rem;

		.star.icon {
			color: #F2B827;
			cursor: auto;
			opacity: 1;
			margin: 0;
			width: 0.8em;
			width: 0.9em;
			font-size: 1.3em;

			&:hover {
				color: #F2B827;
			}
		}

		.wpj-star-text-style {
			color: #F2B827;
		}
	}
	.card-job-price {
		font-size: 1.2em;
		font-weight: 700;
		color: $mainColor;

		.small-job {
			text-transform: uppercase;
			font-size: 0.714rem;
			vertical-align: middle;
		}
	}
	.card-old-icon {
		width: 22px;
		display: inline-block;
		img {
			width: 100%;
			height: auto;
		}
	}
	.card-rating {
		float: none;
		flex: 1 0 auto;
		order: 1;
		text-align: right;
	}
	.card-username {
		float: none;
		flex: 0 1 auto;
		order: 0;
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
		padding-right: 0.3em;
		padding-left: 0;
	}
}

/* Custom UI Cards Other Styles */
.ui.card,
.ui.cards {
	> .job-card:not(.job-card-with-border):hover {
		@include card-shadow-big();
	}
	.list-header,
	.description,
	.header {
		word-break: break-word;
	}
	.list-header + .description {
		margin-top: 0.5em;
	}
	.ui.wpj-small.avatar.image{
		width: 1.5em;
		height: 1.5em;
	}
	.ui.wpj-big.avatar.image {
		width: 2.5em;
		height: 2.5em;
		margin-left: 0;
		margin-right: 0.5em;
	}
	> .extra.content,
	> .card > .extra.content {
		padding: .75em;
	}
	> .wpj-small.content,
	> .card > .wpj-small.content {
		padding: 0.75em 1em;
	}
	.avatar .avatar-badge {
		position: absolute;
		left: -0.42857142857em;
		bottom: 0;

		img {
			width: 1.28571428571em;
			height: 1.28571428571em;
			margin: 0;
			display: block;
		}
	}
	.video_thumbnail {
		&:hover {
			>.image:after {
				opacity: 0.7;
			}
		}
		> .image:after {
			content: "";
			display: block;
			position: absolute;
			background-image: url('../images/card/play_icon.png');
			width: 72px;
			height: 72px;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			z-index: 1;

			@include mobile {
				top: 45%;
			}
		}
	}
	.wpj-distance-label {
		position: absolute;
		top: -10px;
		right: 5px;
	}
}

/* Custom UI Cards List Grid */
.ui.list-grid {
	&.card .card-pusher-master,
	&.cards > .card .card-pusher-master {
		order: 2;
		margin: 0;
	}
	.ui.card .card-pusher-master,
	&.ui.cards > .card .card-pusher-master,
	.ui.card .card-pusher-slave,
	&.ui.cards > .card .card-pusher-slave
	.ui.card:hover .card-pusher-master,
	&.cards>.card:hover .card-pusher-master,
	.ui.card:hover .card-pusher-slave,
	&.cards>.card:hover .card-pusher-slave {
		-webkit-transform: none;
		transform: none;
	}
	&.cards > .card,
	&.four.cards > .card,
	&.one.cards > .card,
	&.three.cards > .card {
		width: calc(100% - 1em);
		margin: 0.5em;
		max-width: 100%;
	}
	&.three.cards {
		margin: -0.5em;
	}
	.visible-on-list {
		display: block !important;
		word-wrap: break-word;
	}
	.wpj-distance-label {
		top: initial;
	}
}

/* Custom UI Cards List Grid Cards */
.ui.list-grid.card,
.ui.list-grid.cards > .card {
	> .image {
		flex: none;
		height: auto;
		padding-bottom: 0;
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		width: 30%;

		@include tablet {
			width: 40%;
		}

		.card-image-icons.bottom {
			bottom: 0.6em;
		}
	}
	.list-70-right {
		margin-top: 0;
		margin-right: 0;
		margin-bottom: 0;
		margin-left: auto;
		width: 70%;

		@include tablet {
			width: 60%;
		}
	}
	.card-pusher-cover {
		order: 1;
		border-top: 0;
	}
	.card-pusher-master {
		order: 2;
	}
	> .extra {
		order: 3;
	}
	.list-header {
		font-weight: bold;
		font-size: 1.28571429em;
		margin-top: -0.21425em;
		line-height: 1.28571429em;
	}
}

/* Grid Style */
.job-card {
	background: $whiteColor;
	transition: box-shadow 0.2s ease-out;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	align-self: stretch;

	@include card-shadow();
	@include default-shape();

	&.job-card-with-border {
		box-shadow: none;
		border: 1px solid $borderColor;
	}

	&:not(.job-card-with-border):hover {
		@include card-shadow-big();
	}

	@include mobile {
		flex-grow: 1;
	}

	.wpj-carousel.owl-theme {
		height: 170px;

		&.owl-carousel.owl-loaded .owl-stage-outer {
			border-radius: 0;
		}

		&:hover {
			.owl-nav {
				[class*=owl-] {
					opacity: 1;
				}
				[class*=owl-].disabled {
					opacity: 0;
				}
			}
		}

		.owl-item {
			height: 170px;

			.bx-lazy-container {
				height: 170px;
			}

			.work-sample-caption {
				padding: 5px 10px;
			}
		}

		.owl-video-wrapper {
			height: 170px;
			cursor: pointer;

			.owl-video-play-icon {
				height: 30px;
				width: 30px;
				background-size: 30px 30px;
				right: 5px;
				top: 10px;
				left: auto;
				bottom: auto;
				margin-left: auto;
				margin-top: auto;
				border-radius: 50%;
				&:hover {
					transform: none;
				}
			}
		}

		.owl-nav {
			[class*=owl-] {
				padding: 0;
				width: auto;
				top: 79px;
				opacity: 0;
				height: 145px;
				margin: 0 7px;
				font-size: 20px;
				color: #000;
				text-shadow: none;

				&:hover {
					opacity: 1;
				}

				i {
					display: none;
				}
			}
		}
		.owl-next {
			&:before {
				border-radius: 15px 0 0 15px;
				padding: 3px 5px 3px 10px;
				background-color: $whiteColor;
				margin-right: -7px;
			}
		}
		.owl-prev {
			&:before {
				border-radius: 0 15px 15px 0;
				padding: 3px 10px 3px 5px;
				background-color: $whiteColor;
				margin-left: -7px;
			}
		}
	}

	.image {
		@include default-shape-top-only();

		position: relative;
		overflow: hidden;

		.card-image-clipper,
		.card-image-helper {
			height: 100%;

			img {
				height: 100%;
				width: 100%;
				object-fit: cover;
			}
		}

		.card-blurry-bg,
		.job-blurry-bg {
			position: absolute;
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
			width: 100%;
			height: 100%;
			z-index: 0;
			transform: scale(1.1);
			-webkit-filter: blur(20px);
			filter: blur(20px);
			opacity: .6;
		}

		.slide-img {
			display: block;

			img:not(.job-blurry-bg) {
				height: auto;
				width: 100%;
				object-fit: cover;
			}
		}
	}

	.job-featured {
		position: absolute;
		top: 15px;
		left: 20px;
		z-index: 9;

		i {
			font-size: 22px;
		}
	}

	.user-area {
		border-bottom: 1px solid $borderColor;
		padding: $jobCardContentVerticalPaddingSmall $jobCardContentHorizontalPadding;
		display: flex;
		align-items: center;

		@include small-desktop() {
			$jobCardContentHorizontalPadding: 15px;

			padding: $jobCardContentVerticalPaddingSmall $jobCardContentHorizontalPadding;
		}

		.user-avatar {
			position: relative;
			z-index: 9;
			margin-top: -24px;
			margin-right: 10px;

			@include small-desktop {
				margin-right: 10px;
			}

			.user-avatar-image {
				display: block;

				img {
					width: 65px;
					height: 65px;
					border-radius: 33px;
					border: 5px solid $whiteColor;

					@include small-desktop {
						width: 55px;
						height: 55px;
						border-width: 4px;
					}
				}
			}
		}

		.user-content {
			margin-right: 10px;

			.user-name {
				font-size: 16px;
				font-weight: 600;
				color: $mainColor;
				line-height: 1;
				word-break: break-all;
			}

			.user-level-label {
				font-size: 13px;
				color: $mainTextColor;
			}
		}

		.user-rating {
			margin-left: auto;
		}
	}

	.job-area {
		padding: $jobCardContentVerticalPadding $jobCardContentHorizontalPadding;

		@include small-desktop {
			padding: $jobCardContentVerticalPadding $jobCardContentHorizontalPadding;
		}

		.title {
			font-size: 16px;
			line-height: 24px;
			font-weight: 600;
			color: $headlinesColor;
		}

		.description {
			@include base-typography();

			display: none;
			color: $mainTextColor;
		}
	}

	.job-bottom-info {
		align-self: flex-end;
		margin-top: auto;
		display: flex;
		align-items: stretch;
		width: 100%;
		border-top: 1px solid $borderColor;
		min-height: 50px;

		.job-price-area {
			border-right: 1px solid $borderColor;
			display: flex;
			padding: $jobCardContentVerticalPaddingSmall $jobCardContentHorizontalPadding;
			flex-grow: 1;
			align-items: center;
		}

		.job-favorites {
			padding: $jobCardContentVerticalPaddingSmall;
			flex-shrink: 0;
			font-size: 22px;
			display: flex;
			align-items: center;

			i.red.icon {
				color: $redColor !important;
			}
		}

		.job-price {
			display: flex;
			align-items: center;
			flex-wrap: wrap;
			flex-grow: 1;

			.price-type {
				font-size: 12px;
				font-weight: 600;
				letter-spacing: 1px;
				color: $mainTextColor;
				text-transform: uppercase;
				flex-basis: 100%;
				line-height: 1;
			}

			.price {
				color: $mainColor;
				font-size: 18px;
				line-height: 24px;
				text-transform: uppercase;
				font-weight: 600;
				flex-basis: 100%;
				line-height: 1;
				margin-top: 3px;

				@include mobile {
					font-size: 16px;
				}
			}
		}

		.card-icons {
			display: flex;
			flex-grow: 1;
			justify-content: space-between;

			@include mobile {
				justify-content: space-around;
			}

			&.one-item {
				flex-grow: 0;
			}

			.job-instant-delivery,
			.job-lets-meet,
			.job-distance,
			.job-free-shipping {
				i {
					font-size: 22px;
					color: $mainColor;
					margin: 0;
				}

				img {
					height: 22px;
					width: 100%;
				}
			}
		}
	}
}

/* List Style - Slider */
.ui.cards.list-grid {
	.card.job-area {
		.description {
			display: block;
			margin-top: 5px;
		}
	}

	.job-card:not(.wpj-card-style-1):not(.wpj-card-style-2):not(.wpj-card-style-4) {
		display: grid;
		grid-template-columns: 30% minmax(min-content, auto);
		grid-template-rows: minmax(min-content, max-content) minmax(min-content, auto) minmax(min-content, max-content);

		.image {
			grid-column: 1/2;
			grid-row: 1/3;
			position: relative;
			top: auto;
			left: auto;
			bottom: auto;
			right: auto;
			width: auto;
			border-right: 1px solid $borderColor;
		}

		.user-area {
			grid-column: 2/3;
			grid-row: 1/2;

			@include breakpoint-down(xs) {
				display: block;
			}

			.user-avatar {
				margin-top: 0;

				.user-avatar-image img {
					margin : 0;
					border: 0;
				}
			}
		}

		.job-area {
			grid-column: 2/3;
			grid-row: 2/3;

			.list-header {
				@include headline-3();

				margin-bottom: 5px;
				margin-top: 0;
			}
		}

		.job-bottom-info {
			grid-column: 1/3;
			grid-row: 3/4;
		}

		.card-icons {
			justify-content: end;

			> div:not(:first-child) {
				margin-left: 20px;
			}
		}

		&.extra-slider-height {
			.wpj-carousel {
				height: 100%;

				.owl-item {
					height: 100%;

					.bx-lazy-container {
						height: 100%;
					}
				}
				.owl-video-wrapper {
					height: 100%;
				}
			}
		}

		.wpj-carousel.owl-theme {
			height: 100%;

			.owl-item {
				height: 100%;

				.bx-lazy-container {
					height: 100%;
				}
			}
			.owl-video-wrapper {
				height: 100%;
			}
			.owl-stage-outer {
				height: 100%;

				.owl-stage {
					height: 100%;
				}
			}
			.owl-nav [class*=owl-] {
				height: 180px;
			}
		}
	}

	.job-card.wpj-card-style-3 {
		.wpj-carousel.owl-theme {
			.owl-video-wrapper {
				.owl-video-play-icon {
					@include breakpoint-down(md) {
						top: auto;
						bottom: 14px;
						left: 18px;
						right: auto;
					}
				}
			}
		}
	}

	.job-card.wpj-card-style-4 {
		display: grid;
		grid-template-columns: 30% minmax(min-content, auto);
		grid-template-rows: minmax(min-content, max-content) minmax(min-content, auto) minmax(min-content, max-content);

		.image {
			grid-column: 1/2;
			grid-row: 1/5;
			position: relative;
			top: auto;
			left: auto;
			bottom: auto;
			right: auto;
			width: auto;

			.card-image-icons.bottom {
				bottom: unset;
			}
		}

		.list-70-right {
			@include tablet {
				width: 70%;
			}
		}

		.wpj-carousel.owl-theme {
			height: 100%;

			.owl-item {
				height: 100%;

				.bx-lazy-container {
					height: 100%;
				}
			}
			.owl-video-wrapper {
				height: 100%;

				.owl-video-play-icon {
					@include breakpoint-down(md) {
						top: auto;
						bottom: 5px;
						left: 4px;
						right: auto;
					}
				}
			}
			.owl-stage-outer {
				height: 100%;

				.owl-stage {
					height: 100%;
				}
			}
			.owl-nav [class*=owl-] {
				height: 180px;
			}
		}

		.content.wpj-small:not(.bottom-wrapper) {
			grid-column: 1/3;
			grid-row: 1/2;
			border-top: 0;
		}

		.cards-title {
			grid-column: 1/3;
			grid-row: 2/3;

			.list-header {
				font-weight: 700;
				margin-bottom: -20px;
				height: 60px;
				line-height: 16px;
			}
			.description {
				color: #303030;
				margin: 0 0.75em;
				font-size: 16px;
				line-height: 20px;
				font-weight: 400;
				height: 42px;
				overflow: hidden;
				padding-top: 0;
				word-wrap: break-word;
				display: block;
				text-align: left;
			}
		}
		.cards-rating {
			grid-column: 1/3;
			grid-row: 3/4;
		}
		.bottom-wrapper {
			grid-column: 1/3;
			grid-row: 4/5;
		}
	}
}

/* Four Grid Style */
.ui.four.cards:not(.list-grid) {
	.job-card {
		.user-area {
			padding: 20px 15px;

			.user-avatar {
				margin-top: -80px;
				margin-right: 0;
				margin-left: 0;

				.user-avatar-image {
					img {
						width: 40px;
						height: 40px;
						border: 4px solid $whiteColor;
					}
				}
			}
			.user-content {
				margin-right: 0;
				margin-left: -40px;

				.user-name {
					width: 130px;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}
			}
		}
	}
}

.ui.card {
	/* Simple & Rich */
	&.wpj-card-style-1,
	&.wpj-card-style-2,
	&.wpj-card-style-4 {
		.image {
			overflow: visible;
		}
	}

	/* Clean */
	&.wpj-card-style-4 {
		>.image .card-image-icons.bottom {
			bottom: auto;
			width: calc(100% - .4em);
			margin: auto;
			top: 10px;
			left: 10px;
			text-align: left;

			.icon {
				font-size: 14px;
				background-color: transparent;
				color: $whiteColor;
			}
		}
		.user-level-label {
			font-weight: bold;
		}
		.cards-title .list-header {
			color: #303030;
			margin: 0 0.75em;
			font-size: 16px;
			line-height: 20px;
			font-weight: 400;
			height: 42px;
			overflow: hidden;
			padding-top: 0;
			word-wrap: break-word;
			display: block;
			text-align: left;
		}
		.content {
			&.cards-rating {
				border: 0;
				padding: 0.5em 1em;
				position: relative;

				.cards-featured {
					position: absolute;
					right: 15px;
					bottom: 8px;
				}
			}

			&.bottom-wrapper {
				.upb_add_remove_links i.heart.icon {
					font-size: 16px;
					vertical-align: middcle;

					.red {
						color: #ff0000;
					}
					.grey {
						color: #c6c6c6;
					}
				}
				.card-job-price {
					flex-flow: row wrap;
					justify-content: flex-end;

					.display-price-card {
						font-size: 18px;
						line-height: 20px;
						font-weight: 400;
						color: #555555;
					}
					.small-job {
						align-self: center;
						margin-right: 5px;
						color: #555;
						font-size: 10px;
						text-transform: uppercase;
						font-weight: 400;
						line-height: 20px;
					}
				}
			}
		}
	}
}