/*--------------------------------------------------------------
# Featured Media
--------------------------------------------------------------*/

/*--------------------------------------------------------------
## Gallery
--------------------------------------------------------------*/

.flext-post-gallery {
	position: relative;
}

.flext-post-gallery img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.flext-post-gallery .total-images {
	background: #fff;
	border-radius: 2px;
	color: #333;
	display: inline-block;
	font-size: 1.1rem;
	min-width: 20px;
	padding: 0 0.5rem;
	position: absolute;
	right: 2.5rem;
	text-align: center;
	top: 2.5rem;
	z-index: 20;
}

.flext-post-gallery .total-images::after {
	border: 2px solid #fff;
	border-width: 0 2px 2px 0;
	border-radius: 2px;
	bottom: -4px;
	content: "";
	left: 4px;
	position: absolute;
	right: -4px;
	top: 4px;
}

.flext-post-gallery .more-items {
	align-items: center;
	background: rgba(0, 0, 0, 0.5);
	bottom: 0;
	content: "";
	color: #fff;
	display: flex;
	font-size: 5rem;
	justify-content: center;
	left: 0;
	letter-spacing: 0.3rem;
	position: absolute;
	right: 0;
	transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	text-align: center;
	top: 0;
	z-index: 5;
}

.flext-post-gallery .more-items:hover {
	background: rgba(0, 0, 0, 0.25);
}

/* Gallery Masonry */

.flext-gallery-masonry {
	display: grid;
	grid-template-columns: repeat(1, minmax(10rem, 1fr));
	gap: 1rem;
	grid-auto-rows: 0;
}

.flext-gallery-masonry .flext-gallery-item::after {
	background: rgba(0, 0, 0, 0.15);
	bottom: 0;
	content: "";
	left: 0;
	opacity: 0;
	position: absolute;
	right: 0;
	transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	top: 0;
}

.flext-gallery-masonry .flext-gallery-item:hover::after {
	opacity: 1;
}

/*--------------------------------------------------------------
## Slider
--------------------------------------------------------------*/

.flext-gallery-slider {
	height: 100%;
	width: 100%;
}

.flext-gallery-slider .flext-slide {
	display: block;
	height: auto;
	overflow: hidden;
}

.flext-gallery-slider .flext-button-disabled {
	pointer-events: initial;
}

/*--------------------------------------------------------------
## Image Rollover
--------------------------------------------------------------*/

.flext-featured-image-rollover {
	bottom: 0;
	left: 0;
	opacity: 0;
	position: absolute;
	right: 0;
	top: 0;
	transition: opacity 0.3s ease-out;
}

.flext-featured-image-rollover:hover {
	opacity: 1;
}

/*--------------------------------------------------------------
## Audio & Video
--------------------------------------------------------------*/

:root {
	--flext-aspect-ratio: calc(9 / 16);
}

.flext-aspect-ratio-4-3 {
	--flext-aspect-ratio: calc(3 / 4);
}

.flext-post-video,
.flext-post-audio {
	height: 100%;
	overflow: hidden;
	padding: 0;
	position: relative;
	width: 100%;
}

.flext-featured-media > iframe,
.flext-featured-media > video {
	border: none;
	left: 50%;
	max-height: none;
	max-width: none;
	min-height: 100%;
	min-width: 100%;
	position: absolute;
	top: 50%;
	transform: translate3d(-50%, -50%, 0);
}

.flext-post-video > video {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.flext-featured-media .flext-media-link {
	align-items: center;
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.flext-featured-media .flext-media-link img {
	cursor: pointer;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.8s ease-in-out;
	width: 100%;
	z-index: 2;
}

.flext-post-video.flext-media-active img {
	opacity: 0;
}

.flext-featured-media .flext-media-button {
	align-items: center;
	background: #000;
	border-radius: 50%;
	color: #fff;
	display: flex;
	font-size: 3rem;
	justify-content: center;
	height: 6rem;
	overflow: initial;
	position: absolute;
	text-align: center;
	transition: opacity 0.3s;
	width: 6rem;
	z-index: 9;
}

.flext-featured-media .flext-media-button i {
	align-items: center;
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
	z-index: 4;
}

@keyframes flext-ripple {

	0% {
		transform: scale(1);
	}

	75% {
		transform: scale(1.5);
		opacity: 1;
	}

	100% {
		transform: scale(1.75);
		opacity: 0;
	}
}

.flext-featured-media .flext-media-button::before,
.flext-featured-media .flext-media-button::after {
	animation: flext-ripple 1s linear 0.2s infinite;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 50%;
	bottom: 0;
	content: "";
	height: 100%;
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	width: 100%;
	z-index: 1;
}

.flext-featured-media .flext-media-button::after {
	animation: flext-ripple 1s linear 1.5s infinite;
}

.flext-media-loading .flext-media-button i {
	animation: flext-spin 2s infinite linear;
}

.flext-media-loading .flext-media-button i::before {
	content: "\e91f";
}

.flext-post-video.flext-is-playing .flext-media-button {
	opacity: 0;
}

.flext-featured-media.flext-media-loading .flext-media-button::before,
.flext-featured-media.flext-media-loading .flext-media-button::after,
.flext-featured-media.flext-media-loading .flext-media-button i::after,
.flext-post-audio.flext-is-playing .flext-media-button i::before {
	display: none;
}

.flext-post-audio.flext-media-active.flext-is-muted .flext-media-button i::before {
	content: "\e918";
	display: inline-block;
}

.flext-post-audio .flext-media-button span {
	display: none;
}

@keyframes flext-sound-wave {

	0% {
		opacity: 0.35;
		height: 0.3rem;
	}

	100% {
		opacity: 1;
		height: 2rem;
	}
}

.flext-post-audio .flext-sound-wave-icon {
	display: none;
}

.flext-post-audio.flext-is-playing .flext-sound-wave-icon {
	align-items: center;
	display: flex;
	justify-content: center;
	position: absolute;
	text-align: center;
	z-index: 9;
}

.flext-post-audio.flext-is-playing.flext-is-muted .flext-sound-wave-icon {
	display: none;
}

.flext-post-audio.flext-is-playing .flext-sound-wave-icon span {
	animation: flext-sound-wave 0ms -800ms linear infinite alternate;
	background: #fff;
	display: inline-block;
	height: 0.2rem;
	margin: 0 0.15rem;
	width: 0.2rem;
}

.flext-post-audio.flext-is-muted .flext-sound-wave-icon span {
	animation: none;
}

.flext-post-audio .flext-sound-wave-icon span:nth-child(1) {
	animation-duration: 474ms;
}

.flext-post-audio .flext-sound-wave-icon span:nth-child(2) {
	animation-duration: 433ms;
}

.flext-post-audio .flext-sound-wave-icon span:nth-child(3) {
	animation-duration: 407ms;
}

.flext-post-audio .flext-sound-wave-icon span:nth-child(4) {
	animation-duration: 458ms;
}

.flext-media-controls {
	bottom: 2rem;
	display: flex;
	flex-direction: column;
	opacity: 0;
	padding: 0;
	position: absolute;
	right: 2rem;
	text-align: right;
	transform: translateX(100%);
	transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	visibility: hidden;
	z-index: 999;
}

.flext-media-active:hover .flext-media-controls {
	opacity: 1;
	transform: translateX(0);
	visibility: visible;
}

.flext-media-controls button {
	background-color: rgba(0, 0, 0, 0.7);
	border-radius: 0.4rem;
	color: #fff;
	cursor: pointer;
	height: 3.4rem;
	line-height: 1.5;
	margin: 0.4rem 0 0 0;
	transition: background-color 0.3s;
	width: 3.4rem;
}

.flext-media-controls button:hover {
	background-color: rgba(0, 0, 0, 0.4);
}

.flext-featured-media.flext-is-playing .flext-play-button i::before {
	content: "\e905";
}

.flext-featured-media.flext-is-muted .flext-volume-button i::before {
	content: "\e918";
}

/*--------------------------------------------------------------
## Lightbox
--------------------------------------------------------------*/

.flext-lightbox-audio .flext-lightbox-container,
.flext-lightbox-video .flext-lightbox-container,
.flext-lightbox-iframe .flext-lightbox-container {
	padding: 3rem;
}

.flext-lightbox-audio .flext-lightbox-content,
.flext-lightbox-video .flext-lightbox-content,
.flext-lightbox-iframe .flext-lightbox-content {
	align-items: center;
	background: none;
	display: flex;
	height: 100%;
	max-height: 100%;
	max-width: 100%;
	overflow: hidden;
	width: auto;
}

.flext-lightbox-audio .flext-lightbox-content,
.flext-media-soundcloud .flext-lightbox-content {
	width: 100%;
}

.flext-lightbox .flext-lightbox-content.flext-is-loading::before {
	animation: flext-spin 0.9s infinite linear;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	border-top-color: transparent;
	box-sizing: border-box;
	content: "";
	display: inline-block;
	height: 4rem;
	left: 50%;
	margin: -2rem auto auto -2rem;
	position: absolute;
	top: 50%;
	width: 4rem;
	z-index: -1;
}

.flext-lightbox-audio audio,
.flext-lightbox-video video,
.flext-lightbox-iframe iframe {
	display: block;
	margin: auto;
	max-height: 100%;
	max-width: 100%;
}

.flext-lightbox-audio audio,
.flext-media-soundcloud iframe {
	width: 100%;
}

.flext-media-soundcloud iframe {
	height: 100%;
}

@media (min-width: 1024px) {

	/*--------------------------------------------------------------
	## Gallery
	--------------------------------------------------------------*/

	.flext-gallery-masonry {
		grid-template-columns: repeat(2, minmax(10rem, 1fr));
	}

	.flext-lightbox-audio .flext-lightbox-content,
	.flext-media-soundcloud .flext-lightbox-content {
		max-height: 78rem;
		max-width: 78rem;
	}
}
