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

@import "../../common";

@mixin tab-vertical-wrap {
	border: 1px solid lightgrey;
	border-top-left-radius: 5px;
	padding: 10px 15px;
	border-right: 0;
	display: flex;
	align-items: center;
	position: relative;
	cursor: pointer;
	&.active {
		color: #000000;
	}
}

.wp-block-ub-tabbed-content {
	margin-top: 30px;
	margin-bottom: 30px;
	&-holder {
		.blocks-rich-text__tinymce.mce-content-body {
			font-size: 14px;
		}
		&.vertical-holder {
			display: flex;
		}
	}
	&-tab-holder {
		position: relative;
		&.vertical-tab-width {
			position: relative;
			width: 21%;
		}
	}
	&-tabs-title {
		display: flex;
		overflow-x: hidden;
		&:hover,
		&:focus {
			overflow-x: auto;
		}
	}

	&-tabs-content {
		border: 1px solid lightgrey;
		padding: 25px;
		&.vertical-content-width {
			width: 79%;
		}
	}
	&-tab-title {
		word-break: initial;
		&-wrap {
			border: 1px solid lightgrey;
			border-top-right-radius: 5px;
			border-top-left-radius: 5px;
			padding: 10px 15px;
			border-bottom: 0;
			margin-right: 5px;
			display: flex;
			align-items: center;
			position: relative;
			cursor: pointer;
			&.active {
				color: white;
			}
		}
		&-vertical-wrap {
			@include tab-vertical-wrap();
		}
	}
}

@media (max-width: 699px) {
	.ub-tabbed-content-mobile-accordion {
		padding: 0;
		border: none;
		> .wp-block-ub-tabbed-content-tab-content-wrap {
			border: 1px solid lightgray;
			padding: 20px;
			&.active {
				border-color: darkgray;
			}
		}
	}
	.wp-block-ub-tabbed-content {
		&-tab-title-mobile-vertical-wrap {
			@include tab-vertical-wrap();
		}
		&-tabs-content {
			&.vertical-content-width-mobile {
				width: 79%;
			}
			&.horizontal-content-width-mobile {
				width: 100;
			}
		}
		&-tab-holder {
			&.vertical-tab-width-mobile {
				width: 21%;
			}
			&.horizontal-tab-width-mobile {
				width: 100%;
			}
		}
		&-tabs-title-mobile {
			&-vertical-tab {
				display: initial;
			}
			&-horizontal-tab {
				display: flex;
			}
		}
		&-holder.wp-block-ub-tabbed-content {
			&-horizontal-holder-mobile {
				display: block;
				> .wp-block-ub-tabbed-content-tabs-content {
					width: 100%;
				}
			}
			&-vertical-holder-mobile {
				display: flex;
			}
		}
	}
}
@media (min-width: 700px) and (max-width: 899px) {
	.ub-tabbed-content-tablet-accordion {
		padding: 0;
		border: none;
		> .wp-block-ub-tabbed-content-tab-content-wrap {
			border: 1px solid lightgray;
			padding: 20px;
			&.active {
				border-color: darkgray;
			}
		}
	}
	.wp-block-ub-tabbed-content {
		&-tab-title-tablet-vertical-wrap {
			@include tab-vertical-wrap();
		}
		&-tabs-content {
			&.vertical-content-width-tablet {
				width: 79%;
			}
			&.horizontal-content-width-tablet {
				width: 100%;
			}
		}
		&-tab-holder {
			&.vertical-tab-width-tablet {
				width: 21%;
			}
			&.horizontal-tab-width-tablet {
				width: 100%;
			}
		}
		&-tabs-title-tablet {
			&-vertical-tab {
				display: initial;
			}
			&-horizontal-tab {
				display: flex;
			}
		}
		&-holder.wp-block-ub-tabbed-content {
			&-horizontal-holder-tablet {
				display: block;
				> .wp-block-ub-tabbed-content-tabs-content {
					width: 100%;
				}
			}
			&-vertical-holder-tablet {
				display: flex;
			}
		}
	}
}

.wp-block-ub-tabbed-content-accordion-toggle {
	border: 1px solid lightgray;
	padding: 10px 15px;
	display: none;
	&.active {
		border-bottom: none;
	}
}

@media (max-width: 374.98px) {
	.wp-block-ub-tabbed-content {
		&-tab-title-wrap {
			padding: 10px 5px;
		}
		&-tabs-content {
			padding: 10px;
			p {
				margin: 0 0 10px 0;
			}
		}
		&-scroll-button-container > button {
			top: -30px;
		}
	}
}
