/* Video Tiles widget (umea-child) */

.avt-grid {
	display: grid;
	grid-template-columns: repeat(var(--avt-columns, 6), minmax(0, 1fr));
	column-gap: var(--avt-col-gap, 30px);
	row-gap: var(--avt-row-gap, 30px);
}

@media (max-width: 1024px) {
	.avt-grid {
		--avt-columns: 3;
		--avt-col-gap: 20px;
		--avt-row-gap: 20px;
	}
}

@media (max-width: 767px) {
	.avt-grid {
		--avt-columns: 2;
		--avt-col-gap: 12px;
		--avt-row-gap: 12px;
	}
}

.avt-tile {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: var(--avt-ratio, 1 / 1);
	background-color: #ece9e4;
	color: inherit;
	text-decoration: none;
	isolation: isolate;
}

/* Fallback for very old browsers without aspect-ratio. */
@supports not (aspect-ratio: 1 / 1) {
	.avt-tile::before {
		content: "";
		display: block;
		padding-top: 100%;
	}
}

.avt-tile:hover,
.avt-tile:focus {
	color: inherit;
	text-decoration: none;
}

.avt-tile:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.avt-tile__media {
	position: absolute;
	inset: 0;
	display: block;
	transition: transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
	will-change: transform;
}

.avt-tile__poster,
.avt-tile__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: center;
}

/* The video sits on top of the image and fades in once it is really playing. */
.avt-tile__video {
	opacity: 0;
	transition: opacity 0.5s ease;
	pointer-events: none;
	background: transparent;
}

.avt-tile.is-playing .avt-tile__video {
	opacity: 1;
}

.avt-tile--video-failed .avt-tile__video,
.avt-grid--video-off .avt-tile__video {
	display: none;
}

.avt-tile__overlay {
	position: absolute;
	inset: 0;
	display: block;
	pointer-events: none;
	transition: background-color 0.4s ease;
}

.avt-tile__label {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	padding: 30px 30px 30px 33px;
	pointer-events: none;
}

.avt-tile__title {
	margin: 0;
	padding: 0;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
	color: #000;
	transition: color 0.3s ease;
}

/* Label positions */
.avt-label-top-right .avt-tile__label {
	justify-content: flex-end;
	text-align: right;
}

.avt-label-center .avt-tile__label {
	align-items: center;
	justify-content: center;
	text-align: center;
}

.avt-label-bottom-left .avt-tile__label {
	align-items: flex-end;
}

.avt-label-bottom-right .avt-tile__label {
	align-items: flex-end;
	justify-content: flex-end;
	text-align: right;
}

/* Hover zoom */
.avt-hover-zoom-yes .avt-tile:hover .avt-tile__media {
	transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
	.avt-tile__media,
	.avt-tile__video {
		transition: none;
	}

	.avt-hover-zoom-yes .avt-tile:hover .avt-tile__media {
		transform: none;
	}
}
