@mixin webkit-scrollbar()
{
	&::-webkit-scrollbar {
		width: 0.5rem;
		background-color: rgba(var(--bs-body-bg-rgb), 0.1);
		-webkit-box-shadow:none;
	}
	 
	&::-webkit-scrollbar-track {
		-webkit-box-shadow: inset 0 0 1px rgba(var(--bs-body-color-rgb),0.05);
	}
	 
	&::-webkit-scrollbar-thumb {
	  background-color: rgba(var(--bs-body-color-rgb), 0.15);
	  outline: 1px solid slategrey;
	}
}

@mixin disabled-element() {
	pointer-events:none;
	position:relative;

	&::after {
		content:"Non-editable area";
		position:absolute;
		left:0px;
		top:0px;
		width:100%;
		height:100%;
		padding-top:5px;
		font-weight:600;
		font-size:12px;
		text-align:center;
		background:rgba(252, 252, 252, 0.85);
		border:1px dashed #999;
		overflow:hidden;
		display: flex;		
		align-items: center;
		justify-content: center;
	}
}

body
{
	scrollbar-color: rgba(var(--bs-body-color-rgb), 0.1) #fff;
	scrollbar-width: thin;
	@include webkit-scrollbar();
}


[data-vvveb-disabled] {
	@include disabled-element();
}

//disable edit on all content except on edit-exception
[data-vvveb-disabled-area] { 

	& *:not([data-vvveb-edit-exception]) {
		@include disabled-element();
	}
}

/*
Prevents iframe mouse events that prevents clicking on the component  
 */
[data-component-lottie] > svg,
[data-component-oembed] iframe,
[data-component-oembed] > div,
[data-component-video] > iframe,
[data-component-maps] > iframe,
[data-component-twitter] > iframe,
[data-component-iframe] > iframe,
[data-component-openstreetmap] > iframe {
	pointer-events:none;
}

[contenteditable="true"] {
	outline:none;
	
	&:focus-visible {
		outline:none;
	}
}

.is-dragged {
	pointer-events:none;
	opacity:0.15;
	position:relative;
	/*
	&:after {
		position: absolute;
		width: 100%;
		height: 100%;
		left: 0;
		background: rgba(255,255,0,0.1);
		content: " ";
		top: 0;
	}*/
}

.vvveb-hidden {
	display:none !important;;
}


@mixin col-empty-highlight {

	> [class*="col-"], 
	> .col {
		&:empty {
			background:var(--bs-tertiary-bg);
			min-height:200px;
			outline:1px solid var(--bs-border-color);
			outline-offset: -0.5rem;
			margin:0.5rem;
			display:flex;
			
			&:after {
				content:'Drag elements here';
				font-size:85%;
				color:var(--bs-secondary);
				display:block;
			    vertical-align: middle;
				display: flex;
				align-self: center;
				margin: auto;
			}
		}
	}	
	
}

@mixin col-hover {

	> [class*="col-"], 
	> .col {
		outline:1px dashed rgba(var(--bs-success-rgb), 0.35);
		outline-offset: -2px;
	}	
}


section {
	.container, .container-fluid {
		div > .row,
		> .row  {
			@include col-empty-highlight;
		}
	}
}

section:hover { 
	.container, .container-fluid {
		div > .row, > .row  {
			@include col-hover;
		}
	}
}

.row:hover {
	@include col-hover;
}
