@import "../../../../../../css/_mixins.scss";
@import "../../../../../../css/_trx_addons.vars.scss";
@import "../../../../../../css/_trx_addons.colors.scss";

.trx-addons-image-accordion {
	display: flex;
	height: 50vh;

	h1,h2,h3,h4,h5,h6 {
		// font-family: inherit;
		letter-spacing: 0;
		margin: 0;
	}
}

.trx-addons-image-accordion .trx-addons-image-accordion-img {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	-o-object-fit: cover;
	object-fit: cover;
	height: 100%;
	width: 100%;
}

.trx-addons-image-accordion-button-wrap * {
	transition: none;
}

.trx-addons-image-accordion-button {
	@include inline-flex;
	vertical-align: top;
	transition: all 0.25s linear 0s;

	&.trx-addons-button-icon-before .trx-addons-button-icon {
		margin-right: 10px;
	}
	&.trx-addons-button-icon-after .trx-addons-button-icon {
		margin-left: 10px;
	}
}

.trx-addons-image-accordion-item {
	cursor: pointer;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: #fff;
	position: relative;
	flex: 1;
	text-decoration: none;
	transition: flex .4s;
	overflow: hidden;
}

.trx-addons-image-accordion-item:last-child {
	margin-right: 0 !important;
}

.trx-addons-image-accordion-active {
	cursor: default;
}

.trx-addons-image-accordion-overlay {
	background-color: rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	transition: background-color .4s;
}

.trx-addons-image-accordion-button-wrap {
	transform: translate3d(0, 60px, 0);
}

.trx-addons-image-accordion-overlay .trx-addons-image-accordion-content-wrap {
	z-index: 1;
}

.trx-addons-image-accordion-content-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	visibility: hidden;
}

.trx-addons-image-accordion-content-wrap p:last-child {
	margin-bottom: 0;
}

.trx-addons-image-accordion-content-wrap > * {
	visibility: hidden;
	opacity: 0;
	transform-style: preserve-3d;
}

.trx-addons-image-accordion-title {
	color: #fff;
	transform: translate3d(0, -60px, 0);
}

.trx-addons-image-accordion-description {
	color: #fff;
	transform: translate3d(0, 60px, 0);
}

.trx-addons-image-accordion-content-active {
	visibility: visible;
}

.trx-addons-image-accordion-content-active * {
	opacity: 1;
	visibility: visible;
	transform: none !important;
	transition: all .3s .3s;
}

.trx-addons-image-accordion-on-hover .trx-addons-image-accordion-item:hover {
	flex: 3;
}

.trx-addons-image-accordion-on-hover .trx-addons-image-accordion-item:hover .trx-addons-image-accordion-content-wrap * {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: all .3s .3s;
}

.trx-addons-image-accordion-orientation-horizontal .trx-addons-image-accordion {
	flex-direction: column;
}

.trx-addons-image-accordion-orientation-horizontal .trx-addons-image-accordion a:hover .trx-addons-image-accordion-overlay {
	background-color: transparent;
}

.trx-addons-image-accordion-orientation-horizontal .trx-addons-image-accordion-item {
	margin-right: 0 !important;
}

@media (max-width: 1024px) {
	.trx-addons-image-accordion-stack-on-tablet .trx-addons-image-accordion {
		flex-direction: column;
	}

	.trx-addons-image-accordion-stack-on-tablet .trx-addons-image-accordion a:hover .trx-addons-image-accordion-overlay {
		background-color: transparent;
	}

	.trx-addons-image-accordion-stack-on-tablet .trx-addons-image-accordion-item {
		margin-right: 0 !important;
	}
}

@media only screen and (max-width: 767px) {
	.trx-addons-image-accordion-stack-on-mobile .trx-addons-image-accordion {
		flex-direction: column;
	}

	.trx-addons-image-accordion-stack-on-mobile .trx-addons-image-accordion a:hover .trx-addons-image-accordion-overlay {
		background-color: transparent;
	}

	.trx-addons-image-accordion-stack-on-mobile .trx-addons-image-accordion-item {
		margin-right: 0 !important;
	}
}