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

@import "../../common";
.wp-block-ub-content-toggle {
	margin: 20px 0 20px 0;
	max-width: 100%;
}

.wp-block-ub-content-toggle-accordion {
	.ub-content-initialized {
		opacity: 0;
		position: absolute;
	}
	position: relative;
	border: 1px solid lightsalmon;
	margin-bottom: 10px;
	&.no-border {
		border: 0 !important;
	}
	.wp-block-ub-content-toggle-accordion-content-wrap {
		> .alignright {
			float: right;
			margin-inline-start: 2em;
			margin-inline-end: 0;
		}

		> .alignleft {
			float: left;
			margin-inline-start: 0;
			margin-inline-end: 2em;
		}

		> .aligncenter {
			margin-inline-start: auto;
			margin-inline-end: auto;
		}
	}
	.wp-block-ub-content-toggle-accordion-title {
		padding: 10px 10px 10px 25px;
		margin: 0;
		display: block;
	}
	&-content {
		padding: 25px;
	}
	&-controls-top {
		position: absolute;
		top: -10px;
		left: 0;
		right: 0;
		justify-content: center;
		display: flex;
		opacity: 0;
		transition: 0.5s opacity ease-in-out;
		> span {
			display: inline-block;
			margin: 0 3px;
		}
	}
	&-controls-bottom {
		position: absolute;
		bottom: -10px;
		left: 0;
		right: 0;
		justify-content: center;
		display: flex;
		opacity: 0;
		transition: 0.5s opacity ease-in-out;
		> span {
			display: inline-block;
			margin: 0 3px;
		}
	}
	&-title-wrap {
		display: flex;
		align-items: center;
		background: lightsalmon;
		cursor: pointer;
		> *:first-child {
			flex-grow: 1;
		}
		.wp-block-ub-content-toggle-accordion-toggle-wrap {
			position: relative;
			display: flex;
			justify-content: center;
			align-items: center;

			&.left {
				order: -1;
			}
			&.right {
				order: 0;
			}
			.wp-block-ub-content-toggle-accordion-toggle-location {
				position: absolute;
				left: 0;
				right: 0;
				top: 150%;
				opacity: 0;
				transition: 0.5s opacity ease-in-out;
				text-align: center;
				color: #191e23;
			}
		}
		.wp-block-ub-content-toggle-accordion-state-indicator {
			display: block;
			margin: 0 10px;
			transition: 0.5s all;
			transform: rotate(0deg);
			color: inherit;
			&.open {
				transform: rotate(90deg);
			}
		}
	}
	&-content-wrap {
		box-sizing: border-box;
		padding: 13px 4%;
		overflow: hidden;
		&.ub-hiding {
			height: 0;
			padding-top: 0;
			padding-bottom: 0;
			margin-top: 0;
			margin-bottom: 0;
		}
	}

	&:hover {
		.wp-block-ub-content-toggle-accordion-controls-top,
		.wp-block-ub-content-toggle-accordion-controls-bottom,
		.wp-block-ub-content-toggle-accordion-toggle-location {
			opacity: 1 !important;
		}
	}
}

@media (max-width: 479.98px) {
	.wp-block-ub-content-toggle-accordion
		.wp-block-ub-content-toggle-accordion-title {
		padding: 10px;
	}
}

@media (max-width: 374.98px) {
	.wp-block-ub-content-toggle-accordion
		.wp-block-ub-content-toggle-accordion-title {
		padding: 10px 0 10px 10px;
	}
	.wp-block-ub-content-toggle-accordion-content-wrap p {
		margin: 15px 0 10px;
	}
}

.wp-block-ub-chevron-down {
	box-sizing: border-box;
	position: relative;
	display: block;
	transform: scale(var(--ggs, 1));
	width: 22px;
	height: 22px;
	border: 2px solid transparent;
	border-radius: 100px;
	&::after {
		content: "";
		display: block;
		box-sizing: border-box;
		position: absolute;
		width: 10px;
		height: 10px;
		border-bottom: 2px solid;
		border-right: 2px solid;
		transform: rotate(-45deg);
		left: 4px;
		top: 2px;
	}
}

.wp-block-ub-math-plus,
.wp-block-ub-math-plus::after {
	display: block;
	box-sizing: border-box;
	background: currentColor;
	border-radius: 10px;
}

.wp-block-ub-math-plus {
	margin-top: -2px;
	position: relative;
	transform: scale(var(--ggs, 1));
	width: 16px;
	height: 2px;
	&.open {
		background-color: transparent;
	}
	&::after {
		content: "";
		position: absolute;
		width: 2px;
		height: 16px;
		top: -7px;
		left: 7px;
	}
	& + .wp-block-ub-content-toggle-accordion-toggle-location {
		margin-top: 60px;
	}
}
