// ------------------------------------------
// XTS TYPOGRAPHY
// ------------------------------------------

.xts-multiple-typography {

	// select {
	// 	display: none;
	// }

	.xts-typography-section {
		position: relative;
		margin-bottom: 20px;
		padding: 20px 8px 20px 20px;
		// max-width: 800px;
		border: 1px solid $xts-option-border-color;
		border-radius: $xts-option-border-radius;
		background: #FFF;
		animation: wd-fadeIn .6s ease both;
		// box-shadow: 0 1px 2px #EFEFEF;
	}

	.xts-typography-section {

		.xts-typography-custom-selector {
			margin-right: $xts-option-space;
			margin-bottom: $xts-option-space;
			max-width: 100%;
		}
	}

	.xts-typography-color-point {
		max-width: calc(50% - #{$xts-option-space});
		width: 100%;
	}
}

.xts-typography-section,
.xts-typography-color-container {
	display: flex;
	flex-wrap: wrap;
}

.xts-typography-responsive-controls {
	display: flex;
	align-items: flex-end;
	margin-bottom: $xts-option-space;
	max-width: calc(50% - #{$xts-option-space});
	width: 100%;

	> div {
		margin-right: $xts-option-space;

		&:last-child {
			margin-right: 0;
		}
	}

	.rtl & {

		> div {
			margin-right: 0;
			margin-left: $xts-option-space;

			&:last-child {
				margin-left: 0;
			}
		}
	}
}

.xts-typography-size-container {
	margin-right: $xts-option-space;

	.rtl & {
		margin-right: 0;
		margin-left: $xts-option-space;
	}
}

.xts-typography-color-container {
	width: 100%;
}

.xts-typography-color-point {

	&:first-child {
		margin-right: $xts-option-space;
	}

	.rtl & {

		&:first-child {
			margin-right: 0;
			margin-left: $xts-option-space;
		}
	}
}

.xts-typography-responsive-opener {
	width: 20px;
	height: $xts-option-input-height;
	font-size: 16px;
	cursor: pointer;
	transition: color .2s ease-in-out;

	&:hover {
		color: $xts-color-primary;
	}

	&:before {
		content: "\f345";
		font-family: dashicons;
		line-height: $xts-option-input-height;
	}

	.rtl & {

		&:before {
			content: "\f341";
		}
	}
}

div.xts-typography-font-container {
	display: flex;
	flex-grow: 1;
	flex-wrap: wrap;
	width: 100%;

	> * {
		margin-right: 12px !important;
		max-width: calc(50% - 12px) !important;
		width: 100% !important;
	}

	.xts-typography-family {
		margin-bottom: $xts-option-space;
	}

	.select2-container--xts {
		max-width: 100%;
	}

	.rtl & {

		> * {
			margin-right: 0 !important;
			margin-left: 12px !important;
		}
	}
}

.xts-typography-preview {
	margin-top: $xts-option-space;
	margin-right: 90px;
	margin-bottom: 0;
	padding: 15px;
	border: 1px solid $xts-option-border-color;
	border-radius: $xts-option-border-radius;

	.rtl & {
		margin-right: 0;
		margin-left: 90px;
	}
}

.xts-typography-control-desktop,
.xts-typography-control-tablet,
.xts-typography-control-mobile {

	label {

		&:before {
			display: inline-block;
			margin-right: 3px;
			color: #BFBFBF;
			vertical-align: middle;
			font-weight: 400;
			font-family: "dashicons";
		}
	}

	.rtl & {

		label {

			&:before {
				margin-right: 0;
				margin-left: 3px;
			}
		}
	}
}

.xts-typography-control-desktop {

	label {

		&:before {
			content: "\f472";
		}
	}
}

.xts-typography-control-tablet {

	label {

		&:before {
			content: "\f471";
		}
	}
}

.xts-typography-control-mobile {

	label {

		&:before {
			content: "\f470";
		}
	}
}

.xts-typography-btn-remove {
	position: absolute;
	right: 20px;
	bottom: 20px;

	.rtl & {
		right: auto;
		left: 20px;
	}
}

// ------------------------------------------
// XTS CUSTOM FONT
// ------------------------------------------

.xts-custom-fonts-section {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	// margin-bottom: 30px;
	margin-bottom: $xts-option-space * 2;
	margin-bottom: 20px;
	padding: 20px 8px 8px 8px;
	// max-width: 800px;
	border: 1px solid $xts-option-border-color;
	border-radius: $xts-option-border-radius;
	background: #FFF;
	animation: wd-fadeIn .6s ease both;
	// box-shadow: 0 1px 2px #EFEFEF;

	.xts-inline-btn {
		position: absolute;
		right: 20px;
		// top: 20px;
		bottom: 20px;
	}

	.rtl & {

		.xts-inline-btn {
			right: auto;
			left: 20px;
		}
	}
}

.xts-custom-fonts-title,
.xts-custom-fonts-label {
	margin-top: 0;
}

.xts-custom-fonts-title {
	flex-basis: 100%;
	margin-bottom: $xts-option-space * 2;
}

.xts-custom-fonts-label {
	margin-bottom: 5px;
}

.xts-custom-fonts-title,
.xts-custom-fonts-field {
	margin-right: $xts-option-space;
	margin-left: $xts-option-space;
}

.xts-custom-fonts-field {
	flex-basis: calc(50% - 24px);
	margin-bottom: $xts-option-space;

	input[type="text"],
	select {
		max-width: 100% !important;
		width: 100% !important;
	}

	.xts-upload-preview {
		margin-bottom: $xts-option-space;

		> img {
			display: none;
		}
	}

	.xts-custom-fonts-title {
		margin-bottom: 5px;
	}
}

// ------------------------------------------
// ADVANCED TYPOGRAPHY
// ------------------------------------------

.xts-typography-section {

	> select {

		&.xts-typography-selector {
			visibility: hidden; // NOTE FIX SELECT2 BEFORE LOAD
			height: 48px !important;
			opacity: 0;
		}
	}

	> .select2-container--xts {
		margin-right: $xts-option-space;
		max-width: 100% !important;
	}

	.rtl & {

		> .select2-container--xts {
			margin-right: 0;
			margin-left: $xts-option-space;
		}
	}
}

.wp-toolbar {

	.select2-container--xts {

		.select2-results {

			.select2-results__options[id*="dvanced_typography"] {
				max-height: 400px;
			}
		}
	}
}

// ------------------------------------------
// OTHER
// ------------------------------------------

.xts-custom_fonts-control,
.xts-typography-control {

	&:last-child {

		> div {
			border-bottom: none;
		}
	}
}