@use "variables";

.placements-builder {
	position: relative;
	height: variables.$panel-placement-height;
	width: 100%;
	// padding: 34px 25px;
	padding: 25px 25px;
	box-sizing: border-box;
	border-top: 1px solid #ddd;
	transition: margin-bottom 0.2s ease;
}

.horizontal-rows {
	margin: 0;
}

.builder-row {
	position: relative;
	z-index: 1;
	margin: 0 0 20px 0;

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

	&:hover {
		.ct-row-actions {
			opacity: 1;
			visibility: visible;
		}

		.row-inner {
			border-color: transparent;
			box-shadow: 0px 0px 0px 2px var(--ui-accent-color);
		}
	}
}

.row-inner {
	display: flex;
	position: relative;
	z-index: 2;
	border-radius: 4px;
	background: #f7f7f7;
	border: 1px dashed #ccc;
	box-sizing: border-box;
	box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0);
	transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

// row actions
.ct-row-actions {
	display: flex;
	align-items: center;
	position: absolute;
	z-index: 1;
	top: 3px;
	left: -2px;
	height: 28px;
	font-size: 10px;
	font-weight: 600;
	line-height: normal;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	padding: 0 13px 4px 13px;
	background: var(--ui-accent-color);
	border-radius: 4px 4px 0 0;
	transform: translateY(-100%);

	opacity: 0;
	visibility: hidden;
	transition: color 0.15s ease, opacity 0.1s ease, visibility 0.1s ease;

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

	&:before {
		width: 14px;
		height: 14px;
		margin-right: 7px;
		font-family: dashicons;
		content: '\f111';
		font-size: 14px;
		font-weight: normal;
		font-style: normal;
	}
}

.ct-builder-dragging {
	.ct-row-actions {
		display: none;
	}
}
