.medizin-grid-filter {
	padding-bottom: 61px;

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

.medizin-grid-wrapper {
	.medizin-grid-filter-buttons {
		margin-left: -15px;
		margin-right: -15px;
	}

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

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

			&.current {
				border-color: currentColor;

				.filter-text {
					font-weight: 500;
				}
			}
		}

		.filter-text {
			font-size: 12px;
			font-weight: 500;
			line-height: 1.34;
			text-transform: uppercase;
			letter-spacing: 1.38px;
		}

		.filter-counter {
			@extend %NormalTransition;
			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: #111;
			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 #111;
				border-right: 4px solid transparent;
				border-left: 4px solid transparent;
				content: "";
			}
		}
	}
}

.medizin-grid-loader {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	color: #111;
	background: rgba(255, 255, 255, .3);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;

	&.show {
		pointer-events: auto;
		z-index: 2;
		opacity: 1;
		visibility: visible;
	}

	.sk-wrap {
		margin: 0 auto;
	}

	.sk-circle {
		width: 80px;
		height: 80px;
	}
}

.medizin-infinite-loader {
	display: none;
	margin: 0;

	.sk-wrap {
		margin: 0 auto;
	}

	&.show {
		display: inline-block;
	}
}

.medizin-grid-pagination {
	padding-top: 50px;
	text-align: center;

	.pagination-wrapper {
		display: inline-block;
	}

	.page-pagination {
		display: inline-block;
	}

	.navigation-buttons {
		display: flex;
		align-items: center;
		color: #111;

		.nav-line {
			width: 150px;
			height: 1px;
			flex-shrink: 0;
			background: currentColor;
			margin: 0 30px;
		}

		.nav-link {
			@extend %NormalTransition;
			user-select: none;
			cursor: pointer;
			font-size: 34px;
			line-height: 1.2;
			font-weight: 500;
		}

		.disabled {
			opacity: .5;
			cursor: not-allowed;
		}
	}
}

.medizin-load-more-button.tm-button {
	min-width: 250px;

	&.style-border {
		border-color: #eee;

		&:hover {
			border-color: transparent;
		}
	}
}

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

.medizin-grid-sorting {
	margin-bottom: 10px;

	.result-count {
		margin: 0 0 20px;
		color: #7e7e7e;

		.count {
			font-weight: 500;
			color: #333;
		}
	}

	.ordering {
		text-align: right;
		margin: 0 0 20px;

		.medizin-fake-select-wrap {
			width: 260px;
		}

		.medizin-fake-select-current {
			.label {

				&:before {
					@extend %FontAwesomeRegular;
					content: '\f036';
					vertical-align: middle;
					font-size: 16px;
				}
			}
		}
	}
}

.medizin-grid-metro {
	.grid-item-height {
		.medizin-box,
		.medizin-image {
			height: 100%;
		}

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

// Fake layout. Improvement better display on page load.
.lazy-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-gap: 30px;

	.grid-sizer {
		display: none;
	}

	&.loaded {
		display: block;

		.grid-sizer {
			display: block;
		}
	}
}

@include media-breakpoint-down(sm) {
	.medizin-grid-wrapper {
		.medizin-grid-filter-buttons {
			display: block;
		}
	}

	.medizin-grid-sorting {
		text-align: left;

		.ordering {
			text-align: left;
		}
	}
}
