.tm-grid-wrapper {
	.tm-filter-button-group {
		padding-bottom: 45px;

		.container {
			padding-left: 0;
			padding-right: 0;
		}

		&.right {
			text-align: right;
		}

		&.center {
			text-align: center;
		}

		&.show-filter-counter {
			padding-top: 25px;
		}
	}

	.tm-filter-button-group-inner {
		margin-left: -15px;
		margin-right: -15px;
	}

	&.filter-style-01 {
		.btn-filter {
			position: relative;
			display: inline-block;
			padding: 0 5px;
			margin: 5px 17px;
			border-bottom: 2px solid transparent;

			&:hover {
				.filter-counter {
					visibility: visible;
					opacity: 1;
					transform: translate(-50%, -100%);
				}
			}

			&.current {
				border-color: currentColor;
			}
		}

		.filter-text {
			font-size: 18px;
			font-weight: 500;
		}

		.filter-counter {
			@extend %transit;
			position: absolute;
			top: 0;
			left: 50%;
			visibility: hidden;
			margin: 0 auto;
			min-width: 34px;
			height: 24px;
			line-height: 24px;
			border-radius: 3px;
			font-size: 12px;
			background-color: #4d4c4d;
			color: #fff;
			text-align: center;
			opacity: 0;
			transform: translate(-50%, -50%);

			&:before {
				position: absolute;
				right: 0;
				bottom: -4px;
				left: 0;
				display: block;
				margin: 0 auto;
				width: 0;
				height: 0;
				border-top: 4px solid #4d4c4d;
				border-right: 4px solid transparent;
				border-left: 4px solid transparent;
				content: "";
			}
		}
	}
}

.modern-grid {
	display: grid;
}

.grid-width-2 {
	grid-column: span 2;
}

.grid-height-2 {
	grid-row: span 2;
}

.tm-grid-loader {
	display: none;
	margin: 0;

	.sk-wrap {
		margin: 0 auto;
	}
}

.tm-grid-pagination {
	padding-top: 40px;
}

.tm-grid-loadmore-btn {
	min-width: 180px;
}

.tm-grid-messages {
	margin: 50px 0;
	text-align: center;
}

.tm-grid {
	.grid-item {
		min-width: 0;
		min-height: 0;
	}
}

.page-has-animation:not(.compose-mode) {
	.tm-grid {
		&.has-animation {
			.grid-item {
				opacity: 0;
			}
		}

		&.fade-in {
			.animate {
				animation: fadeIn .95s ease forwards;
			}
		}

		&.move-up {
			.animate {
				transform: translateY(100px);
				animation: moveVertical .65s ease forwards;
			}
		}

		&.move-down {
			.animate {
				transform: translateY(-100px);
				animation: moveVertical .65s ease forwards;
			}
		}

		&.move-left {
			.animate {
				transform: translateX(100px);
				animation: moveHorizontal .65s ease forwards;
			}
		}

		&.move-right {
			.animate {
				transform: translateX(-100px);
				animation: moveHorizontal .65s ease forwards;
			}
		}

		&.scale-up {
			.animate {
				transform: scale(.6);
				animation: scaleUp .65s ease-in-out forwards;
			}
		}

		&.pop-up {
			perspective: 1300px;

			.animate {
				transform: scale(.4);
				animation: popUp .8s ease-in forwards;
				transform-style: preserve-3d;
			}
		}
	}
}

@include media-breakpoint-down(sm) {
	.tm-grid-wrapper {
		.tm-filter-button-group-inner {
			display: block;
		}
	}

	.grid-width-2 {
		grid-column: span 1;
	}

	.grid-height-2 {
		grid-row: span 1;
	}
}
