/**
 * #.# Styles
 *
 * CSS for both Frontend+Backend.
 */

/* Info Box */

.uagb-ifb-content > svg * {
	-webkit-transition: all 0.2s;
	-o-transition: all 0.2s;
	transition: all 0.2s;
}

.uagb-ifb-content > svg,
.uagb-ifb-content {
	display: inline-block;
}

.uagb-ifb-content > svg {
	vertical-align: middle;
	width: inherit;
	height: inherit;
	font-style: initial;
}

.uagb-ifb-content .uagb-ifb-icon-wrap svg {
	box-sizing: content-box;
	width: inherit;
	height: inherit;
}

.uagb-ifb-button-wrapper:empty {
	display: none;
}

div.uagb-ifb-button-wrapper a.uagb-infobox-cta-link,
div.uagb-ifb-cta a.uagb-infobox-cta-link,
.entry .entry-content a.uagb-infobox-cta-link,
a.uagb-infobox-link-wrap,
.entry .entry-content a.uagb-infobox-link-wrap {
	text-decoration: none;
	align-items: center;
}

.uagb-infobox-icon-left-title.uagb-infobox-image-valign-middle .uagb-ifb-title-wrap,
.uagb-infobox-icon-right-title.uagb-infobox-image-valign-middle .uagb-ifb-title-wrap,
.uagb-infobox-image-valign-middle .uagb-ifb-icon-wrap,
.uagb-infobox-image-valign-middle .uagb-ifb-image-content,
.uagb-infobox-icon-left.uagb-infobox-image-valign-middle .uagb-ifb-content,
.uagb-infobox-icon-right.uagb-infobox-image-valign-middle .uagb-ifb-content {
	-ms-flex-item-align: center;
	-webkit-align-self: center;
	align-self: center;
}

.uagb-infobox-icon-left-title.uagb-infobox-image-valign-top .uagb-ifb-title-wrap,
.uagb-infobox-icon-right-title.uagb-infobox-image-valign-top .uagb-ifb-title-wrap,
.uagb-infobox-image-valign-top .uagb-ifb-icon-wrap,
.uagb-infobox-image-valign-top .uagb-ifb-image-content,
.uagb-infobox-icon-left.uagb-infobox-image-valign-top .uagb-ifb-content,
.uagb-infobox-icon-right.uagb-infobox-image-valign-top .uagb-ifb-content {
	-webkit-align-self: self-start;
	align-self: self-start;
}

.uagb-infobox-left {
	justify-content: flex-start;
	text-align: left;
	-webkit-box-pack: start;
	-ms-flex-pack: start;
	-webkit-justify-content: flex-start;
	-moz-box-pack: start;
}

.uagb-infobox-center {
	justify-content: center;
	text-align: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	-webkit-justify-content: center;
	-moz-box-pack: center;
}

.uagb-infobox-right {
	justify-content: flex-end;
	text-align: right;
	-webkit-box-pack: end;
	-ms-flex-pack: end;
	-webkit-justify-content: flex-end;
	-moz-box-pack: end;
}

.uagb-infobox-icon-above-title.uagb-infobox__content-wrap,
.uagb-infobox-icon-below-title.uagb-infobox__content-wrap {
	display: block;
	width: 100%;
}

/* Left/Right of Title */
.uagb-infobox-icon-left-title .uagb-ifb-content > svg,
.uagb-infobox-icon-left .uagb-ifb-content > svg {
	margin-right: 10px;
}

.uagb-infobox-icon-right-title .uagb-ifb-content > svg,
.uagb-infobox-icon-right .uagb-ifb-content > svg {
	margin-left: 10px;
}

/* Left/Right */
.uagb-infobox-icon-left.uagb-infobox__content-wrap,
.uagb-infobox-icon-right.uagb-infobox__content-wrap,
.uagb-infobox-icon-left-title .uagb-ifb-left-title-image,
.uagb-infobox-icon-right-title .uagb-ifb-right-title-image {
	display: -webkit-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: -moz-box;
	display: flex;
	-js-display: flex;
}

.uagb-infobox-icon-left-title .uagb-ifb-left-title-image .uagb-ifb-image-content,
.uagb-infobox-icon-right-title .uagb-ifb-right-title-image .uagb-ifb-image-content,
.uagb-infobox-icon-left .uagb-ifb-image-content,
.uagb-infobox-icon-right .uagb-ifb-image-content {
	flex-shrink: 0;
	line-height: 0;
}

.uagb-infobox-icon-left-title .uagb-ifb-left-title-image .uagb-ifb-title-wrap,
.uagb-infobox-icon-right-title .uagb-ifb-right-title-image .uagb-ifb-title-wrap,
.uagb-infobox-icon-left .uagb-ifb-content,
.uagb-infobox-icon-right .uagb-ifb-content {
	flex-grow: 1;
}

.uagb-infobox-icon-right.uagb-infobox__content-wrap,
.uagb-infobox-icon-right-title .uagb-ifb-right-title-image {
	-webkit-box-pack: end;
	-ms-flex-pack: end;
	-webkit-justify-content: flex-end;
	-moz-box-pack: end;
	justify-content: flex-end;
}

/* Infobox image css */
.uagb-ifb-content img {
	position: relative;
	display: inline-block;
	line-height: 0;
	width: auto;
	height: auto !important;
	max-width: 100%;
	border-radius: inherit;
	-webkit-box-sizing: content-box;
	-moz-box-sizing: content-box;
	-webkit-border-radius: inherit;
}

/* Info box complete box link css */
.uagb-infobox-module-link {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 4;
	width: 100%;
	height: 100%;
}

.uagb-edit-mode .uagb-infobox-module-link {
	z-index: 2;
}

.uagb-infobox-link-icon-after {
	margin-right: 0;
	margin-left: 5px;
}

.uagb-infobox-link-icon-before {
	margin-right: 5px;
	margin-left: 0;
}

.uagb-infobox-link-icon {
	-webkit-transition: all 200ms linear;
	transition: all 200ms linear;
}

.uagb-infobox__content-wrap {
	box-sizing: border-box;
	position: relative;
	width: 100%;
	word-break: break-word;
	z-index: 1;
}

.uagb-ifb-separator {
	display: inline-block;
	margin: 0;
	border-top-color: #333;
	border-top-style: solid;
	border-top-width: 2px;
	line-height: 0;
}

.uagb-ifb-button-wrapper {
	line-height: 1;

	&.uagb-ifb-button-type-text {
		.uagb-infobox-cta-link {
			&.wp-block-button__link {
				background-color: unset;
				border: none;
			}
			&.wp-block-button__link:hover {
				background-color: unset;
				border-color: unset;
			}
		}
	}
	.uagb-infobox-cta-link {
		cursor: pointer;

		&.wp-block-button__link {
			width: auto;
		}
	}

	.wp-block-button__link svg,
	.ast-outline-button svg {
		fill: currentColor;
	}
}

.uagb-infobox__content-wrap a {
	-webkit-box-shadow: none;
	box-shadow: none;
	text-decoration: none;
}

.uagb-ifb-title-wrap {
	width: 100%;
}

.uagb-ifb-title {
	margin-block-start: 0;
}

.uagb-ifb-title-wrap .uagb-ifb-title-prefix {
	display: block;
	padding: 0;
	margin: 0;
}

.uagb-infobox__content-wrap.uagb-infobox__content-wrap {
	position: relative;
}

.uagb-ifb-content {
	width: 100%;
}

.uagb-infobox__content-wrap.uagb-infobox,
.uagb-ifb-content,
.uagb-ifb-title-wrap,
.uagb-ifb-title-prefix *,
svg.dashicon.dashicons-upload {
	z-index: 1;
}

a.uagb-infobox-link-wrap {
	color: inherit;
}

.uagb-ifb-content p:empty {
	display: none;
}

.uagb-infobox__content-wrap .uagb-ifb-content {
	img {
		display: inline-block;
		max-width: 100%;
	}

	svg {
		display: inline-block;
	}
}

.uagb-infobox__content-wrap .uagb-ifb-icon-wrap,
.uagb-infobox-icon-left .uagb-ifb-image-content,
.uagb-infobox-icon-right .uagb-ifb-image-content {
	box-sizing: content-box;
}

.uagb-infobox-cta-link > svg {
	vertical-align: middle;
	width: 15px;
	height: 15px;
	font-size: 15px;
}

.uagb-infobox-cta-link {
	display: inline-flex;
}

.block-editor-page #wpwrap .uagb-infobox-cta-link svg,
.uagb-infobox-cta-link svg {
	font-style: normal;
}

/* Left/Right of Title */
.uagb-infobox-icon-left-title .uagb-ifb-icon-wrap,
.uagb-infobox-icon-left .uagb-ifb-icon-wrap {
	margin-right: 10px;
	line-height: 0;
}

.uagb-infobox-icon-right-title .uagb-ifb-icon-wrap,
.uagb-infobox-icon-right .uagb-ifb-icon-wrap {
	margin-left: 10px;
	line-height: 0;
}

html[dir="rtl"] {
	/* Left/Right of Title */
	.uagb-infobox-icon-left-title .uagb-ifb-icon-wrap,
	.uagb-infobox-icon-left .uagb-ifb-icon-wrap {
		margin-left: 10px;
		line-height: 0;
	}

	.uagb-infobox-icon-right-title .uagb-ifb-icon-wrap,
	.uagb-infobox-icon-right .uagb-ifb-icon-wrap {
		margin-right: 10px;
		line-height: 0;
	}

	.uagb-infobox-left {
		justify-content: flex-end;
		text-align: right;
		-webkit-box-pack: end;
		-ms-flex-pack: end;
		-webkit-justify-content: flex-end;
		-moz-box-pack: end;
	}

	.uagb-infobox-right {
		justify-content: flex-start;
		text-align: left;
		-webkit-box-pack: start;
		-ms-flex-pack: start;
		-webkit-justify-content: flex-start;
		-moz-box-pack: start;
	}

}

/* Left/Right */
.uagb-infobox-icon-left .uagb-ifb-left-right-wrap,
.uagb-infobox-icon-right .uagb-ifb-left-right-wrap,
.uagb-infobox-icon-left-title .uagb-ifb-left-title-image,
.uagb-infobox-icon-right-title .uagb-ifb-right-title-image {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
}

.uagb-infobox-icon-right .uagb-ifb-left-right-wrap,
.uagb-infobox-icon-right-title .uagb-ifb-right-title-image {
	-webkit-box-pack: end;
	-ms-flex-pack: end;
	-webkit-justify-content: flex-end;
	-moz-box-pack: end;
	justify-content: flex-end;
}

a.uagb-infbox__link-to-all {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	box-shadow: none;
	text-decoration: none;
	-webkit-box-shadow: none;
}

@media only screen and ( max-width: 976px ) {
	.uagb-infobox-stacked-tablet.uagb-infobox__content-wrap .uagb-ifb-image-content {
		padding: 0;
		margin-bottom: 20px;
	}

	.uagb-infobox-stacked-tablet.uagb-reverse-order-tablet.uagb-infobox__content-wrap {
		display: -webkit-inline-box;
		display: -ms-inline-flexbox;
		display: -webkit-inline-flex;
		display: -moz-inline-box;
		display: inline-flex;
		flex-direction: column-reverse;
		-js-display: inline-flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: reverse;
		-ms-flex-direction: column-reverse;
		-webkit-flex-direction: column-reverse;
		-moz-box-orient: vertical;
		-moz-box-direction: reverse;
	}

	.uagb-infobox-stacked-tablet.uagb-infobox__content-wrap .uagb-ifb-content,
	.uagb-infobox-stacked-tablet.uagb-infobox__content-wrap .uagb-ifb-icon-wrap,
	.uagb-infobox-stacked-tablet.uagb-infobox__content-wrap .uagb-ifb-image-content {
		display: block;
		width: 100%;
		text-align: center;
	}

	.uagb-infobox-stacked-tablet.uagb-infobox__content-wrap .uagb-ifb-icon-wrap,
	.uagb-infobox-stacked-tablet.uagb-infobox__content-wrap .uagb-ifb-image-content {
		margin-right: 0;
		margin-left: 0;
	}

	.uagb-infobox-stacked-tablet.uagb-infobox__content-wrap {
		display: inline-block;
	}

	.uagb-infobox-icon-left-title.uagb-infobox-stacked-tablet,
	.uagb-infobox-icon-left.uagb-infobox-stacked-tablet {
		.uagb-ifb-image-content,
		.uagb-ifb-icon-wrap {
			margin-right: 0;
		}
	}

	.uagb-infobox-icon-right-title.uagb-infobox-stacked-tablet,
	.uagb-infobox-icon-right.uagb-infobox-stacked-tablet {
		.uagb-ifb-image-content,
		.uagb-ifb-icon-wrap {
			margin-left: 0;
		}
	}

	.uagb-infobox-icon-left-title .uagb-ifb-separator {
		margin: 10px 0;
	}
}

@media screen and ( max-width: 767px ) {
	.uagb-infobox-stacked-mobile.uagb-infobox__content-wrap {
		display: inline-block;

		.uagb-ifb-image-content,
		.uagb-ifb-icon-wrap {
			padding: 0;
			margin-bottom: 20px;
			margin-right: 0;
			margin-left: 0;
		}

		&.uagb-reverse-order-mobile {
			display: -webkit-inline-box;
			display: -ms-inline-flexbox;
			display: -webkit-inline-flex;
			display: -moz-inline-box;
			display: inline-flex;
			flex-direction: column-reverse;
			-js-display: inline-flex;
			-webkit-box-orient: vertical;
			-webkit-box-direction: reverse;
			-ms-flex-direction: column-reverse;
			-webkit-flex-direction: column-reverse;
			-moz-box-orient: vertical;
			-moz-box-direction: reverse;
		}

		.uagb-ifb-image-content,
		.uagb-ifb-icon-wrap,
		.uagb-ifb-content {
			display: block;
			width: 100%;
			text-align: center;
		}
	}

	.uagb-infobox-icon-left-title.uagb-infobox-stacked-mobile,
	.uagb-infobox-icon-left.uagb-infobox-stacked-mobile {
		.uagb-ifb-image-content,
		.uagb-ifb-icon-wrap {
			margin-right: 0;
		}
	}

	.uagb-infobox-icon-right-title.uagb-infobox-stacked-mobile,
	.uagb-infobox-icon-right.uagb-infobox-stacked-mobile {
		.uagb-ifb-image-content,
		.uagb-ifb-icon-wrap {
			margin-left: 0;
		}
	}

	.uagb-infobox-icon-left-title .uagb-ifb-separator {
		margin: 10px 0;
	}
}

.uagb-ifb-icon svg {
	width: inherit;
	height: inherit;
	vertical-align: middle;
}

/* For Backword */
.uagb-ifb-button-icon {
	height: 15px;
	width: 15px;
	font-size: 15px;
	vertical-align: middle;

	svg {
		height: inherit;
		width: inherit;
		display: inline-block;
	}

	&.uagb-ifb-align-icon-after {
		float: right;
	}
}

.uagb-ifb-cta-button {
	display: inline-block;
}

.uagb-disable-link {
	pointer-events: none;
}

@media only screen and (min-width: 977px) {
	.uagb-infobox-margin-wrapper {
		display: flex;
	}
}

.uagb-ifb-content .uagb-ifb-desc p:last-child {
	margin-bottom: 0;
}
