@import 'patterns';
@import 'color-picker';
@import 'background-preview';

.ct-background {
	&.active {
		.ct-background-modal {
			opacity: 1;
			visibility: visible;
			transform: scale3d(1, 1, 1);
		}
	}
}

.ct-image-tab,
.ct-patterns-tab {
	overflow-y: scroll;
}


.ct-background-modal {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 420px;
	max-height: 455px;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 15px 15px rgba(0, 0, 0, 0.1);

	position: absolute;
	z-index: 3;
	top: 50px;
	left: 0;
	opacity: 0;
	visibility: hidden;
	transform: scale3d(0.95, 0.95, 1);
	transition: opacity 0.1s ease, visibility 0.1s ease, transform 0.1s ease-out;

	> div {
		flex: 1;
		padding-bottom: 25px;

		> * {
			padding-left: 20px;
			padding-right: 20px;

			&:not(:last-child) {
				padding-bottom: 25px;
				border-bottom: 1px dashed #eee;
			}
		}
	}

	&:before {
		position: absolute;
		content: '';
		top: -6px;
		right: 27px;
		width: 0;
		height: 0;
		border-style: solid;
		border-width: 0 6px 7px 6px;
		border-color: transparent transparent #ffffff transparent;
	}
}

.ct-background-type {
	flex: 0 0 42px;
	display: flex;
	margin: 0;
	overflow-x: hidden;

	li {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 100%;
		margin: 0;
		cursor: pointer;
		font-weight: 500;
		box-sizing: border-box;
		border-bottom: 1px solid #eee;

		&:not(:last-child) {
			border-right: 1px solid #eee;
		}

		&:not(.active) {
			color: rgba(68, 68, 68, 0.7);

			&:hover {
				color: rgba(68, 68, 68, 1);
			}
		}

		&.active {
			position: relative;
			
			&:after {
				position: absolute;
				content: '';
				left: -1px;
				bottom: -1px;
				width: calc(100% + 2px);
				height: 2px;
				background: #0e8ecc;
			}
		}
	}
}