// ------------------------------------------------------------------------------------------------
// XTS DASHBOARD
// ------------------------------------------------------------------------------------------------

// ------------------------------------------
// GENERAL STYLES
// ------------------------------------------

.xts-options {

	*,
	*:before,
	*:after {
		-webkit-box-sizing: border-box;
		-moz-box-sizing: border-box;
		box-sizing: border-box;
	}

	a {
		text-decoration: none;
	}

	img {
		max-width: 100%;
		height: auto;
		vertical-align: middle;
	}

	&.xts-dashboard {
		-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
		box-shadow: 0 1px 1px rgba(0,0,0,.04);

		.xts-fields-tabs {
			display: flex;
		}
	}

	// .xts-hidden {
	// 	display: none;
	// }

	.xts-fields-section {
		min-height: calc(100% - 48px);
	}

	.xts-active-section {
		animation: wd-fadeIn .6s ease both;
	}
}

// ------------------------------------------
// DASHBOARD HEADER
// ------------------------------------------

.xts-options-header {
	display: flex;
	align-items: center;
	padding: 25px 15px;
	border-bottom: 3px solid #464646;
	background-color: #131313;
}

.xts-options-theme-data {
	display: flex;
	align-items: baseline;
	margin-right: 35px;
	color: #FFF;

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

.xts-options-theme-name {
	position: relative;
	margin: 0;
	margin-right: 20px;
	padding-left: 70px;
	color: #FFF;
	font-size: 30px;
	line-height: 1;

	&:before {
		content: "";
		position: absolute;
		top: 50%;
		left: 5px;
		display: block;
		width: 50px;
		height: 50px;
		background-image: url(../images/theme-admin-icon.svg);
		background-size: 50px 50px;
		background-repeat: no-repeat;
		-webkit-transform: translateY(-50%);
		transform: translateY(-50%);
	}

	.rtl & {
		margin-right: 0;
		margin-left: 20px;
		padding-right: 70px;
		padding-left: 0;

		&:before {
			right: 5px;
			left: auto;
		}
	}
}

// ------------------------------------------
// NOTICE
// ------------------------------------------

.xts-options-message {
	margin-right: -20px;
	margin-left: -20px;
	padding: 8px 35px 8px 14px;
	border-bottom: 1px solid #E7E7E7;
	background-color: #DFF0D8;
	color: #468847;
}

.xts-notice {
	// margin-top: 20px;
	padding: 15px;
	border: none;
	border-radius: 4px;
	background-color: #F7F7F7;
	box-shadow: none;
	color: #FFF;

	&.xts-info {
		background-color: $woodmart-notice-info;
	}

	&.xts-success {
		background-color: $woodmart-notice-success;
	}

	&.xts-warning {
		background-color: $woodmart-notice-warning;
	}

	&.xts-error {
		background-color: $woodmart-notice-critical;
	}

	a {
		color: #FFF;

		&:hover {
			opacity: .8;
		}
	}
}

// ------------------------------------------
// SECTION
// ------------------------------------------

.xts-sections {
	display: flex;
	flex-grow: 1;
	flex-direction: column;
	justify-content: flex-start;
	padding: 0 20px 0 20px;
	background: #FFF;
}

.xts-section-icon {

	img {
		display: block;
	}
}

.xts-section-title {
	position: relative;
	margin-right: -20px;
	margin-bottom: 30px;
	margin-left: -20px;
	padding-top: 18px;
	padding-right: 20px;
    padding-bottom: 18px;
	padding-left: 20px;
	border-bottom: 1px solid $xts-option-border-color;
	background-color: #F3F3F3;

	h3 {
		position: relative;
		margin: 0;
		text-transform: uppercase;
		font-size: 18px;
	}
}

// ------------------------------------------
// FIELD
// ------------------------------------------

.xts-fields-wrapper {
	display: flex;
	flex-wrap: wrap;
	margin-right: -15px;
	margin-left: -15px;
}

.xts-field {
	position: relative;
	display: flex;
	flex-grow: 1;
	flex-basis: 100%;
	margin-bottom: -1px; // NOTE HIDE BORDER BOTTOM IN FIRST FIELD
	padding-right: 15px;
	padding-left: 15px;

	// margin-bottom: 30px;

	// &:not(:last-child) {
	// 	// margin-bottom: 30px;

	// 	> div {
	// 		// padding-bottom: 30px;
	// 		border-bottom: 1px solid $xts-option-border-color;
	// 	}
	// }

	// > div {
	// 	// padding-bottom: 30px;
	// 	border-bottom: 1px solid $xts-option-border-color;
	// }

	label {
		display: flex;
		align-items: center;
		margin-bottom: 5px;
		// padding-bottom: 5px;
		color: #333;
		font-weight: 600;
		font-size: 14px;
		cursor: default;
	}

	.hide {
		display: none;
	}

	.xts-field-description {
		display: block;
		margin-top: $xts-option-space;
		margin-bottom: 0;
		font-weight: 400;
	}

	&.xts-notice-control {
		margin-bottom: 0;

		.xts-option-control {
			border: none;
		}
	}

	// &:not(:first-child) {
	// 	margin-top: 30px;
	// }
}

.xts-dashboard {
	
	.xts-field {
		margin-bottom: 30px;
	
		&:not(:last-child) {
	
			> div {
				border-bottom: 1px solid $xts-option-border-color;
			}
		}
	}

	.xts-group-title {
		margin-top: -31px;
	}
}

.xts-option-title {
	flex: 1 0 30%;
	padding-right: 20px;
	padding-bottom: 30px;

	.xts-custom_fonts-control &,
	.xts-advanced_typography-field & {
		display: none;
	}

	.rtl & {
		padding-right: 0;
		padding-left: 20px;
	}
}

.xts-option-control {
	flex: 0 1 100%;
	padding-bottom: 30px;

	> div:not(:first-child) {
		margin-top: $xts-option-space;
	}
}

// ------------------------------------------
// FIELDS GROUP
// ------------------------------------------

.xts-group-title,
.xts-fields-group {
	flex-basis: 100%;
}

.xts-group-title {
	position: relative;
	display: flex;
	flex-grow: 1;
	flex-basis: 100%;
	margin-right: -5px;
	margin-bottom: 30px;
	margin-left: -5px;
	padding: 18px 20px 18px 20px;
	border-top: 1px solid;
	border-bottom: 1px solid;
	border-color: $xts-option-border-color;
	background-color: #F3F3F3;
	color: #23282D;
	text-transform: uppercase;
	font-weight: 600;
	font-size: 18px;

}

// .xts-fields-group {

// 	&:not(:last-child) {
// 		margin-bottom: 30px;
// 	}
// }

// ------------------------------------------
// SAVE SETTINGS
// ------------------------------------------

.xts-options-actions {
	position: sticky;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
	// margin-top: 20px;
	margin-right: -20px;
	margin-left: -20px;
	padding: 6px 20px;
	border-top: 1px solid $xts-option-border-color;
	background-color: #EEE;

	button {

		&:not(:last-child) {
			margin-right: $xts-option-space / 2;
		}
	}

	.rtl & {

		button {

			&:not(:last-child) {
				margin-right: 0;
				margin-left: $xts-option-space / 2;
			}
		}
	}
}

.xts-reset-options-btn {
	border: 1px solid #CCC !important;
	background: #F7F7F7;
	line-height: 1;
}

@mixin R-MD-UP__helpers {

	.xts-link-color-field {

		.xts-option-control {
			display: flex;
		}

		.xts-option-with-label {
			margin-top: 0 !important;
			margin-right: 20px;

			> span {
				display: block;
				margin-bottom: 5px;
			}
		}
	}
}

@mixin R-MD-DOWN__helpers {

	.xts-field {
		flex-wrap: wrap;

		div.xts-option-title {
			margin-bottom: 20px;
			padding-bottom: 0;
			width: 100%;
			border-bottom: 0;
		}
	}
}