/**
 * Contact Form Style Sheet
 * Caracal Development Framework
 *
 * Copyright (c) 2016. by Way2CU, http://way2cu.com
 * Authors: Mladen Mijatov
 */

form[data-dynamic='1'] {
	position: relative;
}

form[data-dynamic='1'] div.overlay {
	display: block;
	width: 100%;
	height: 100%;

	visibility: hidden;
	opacity: 0;

	position: absolute;
	left: 0px;
	top: 0px;

	background-color: white;
	background-color: rgba(255, 255, 255, 0.8);
	background-image: url(../images/loading.gif);
	background-position: center center;
	background-repeat: no-repeat;

	transition: all 0.5s;
}

form[data-dynamic='1'] div.overlay.visible {
	visibility: visible;
	opacity: 1;
}

form input[pattern] + small.placeholder {
	display: block;
	position: relative;
	line-height: 0;
}

form input[pattern] + small.placeholder:before {
	position: absolute;
	top: calc(-1em - 5px);
	left: 10px;
	width: 0;
	height: 0;
	content: '';
	opacity: 0;
	pointer-events: none;

	border: 8px solid transparent;
	border-bottom-color: #303030;

	line-height: 0;
	transition: all 0.3s;
}

form input[pattern] + small.placeholder:after {
	position: absolute;
	top: -1em;
	left: 0;
	width: max-content;
	max-width: 300px;
	opacity: 0;
	pointer-events: none;

	content: attr(data-content);
	padding: 0.3em 0.5em;

	border: 1px solid currentColor;
	border-radius: 5px;
	background-color: white;

	color: #303030;
	font-size: 1rem;
	line-height: normal;

	transition: all 0.3s;
}

html[dir=rtl] form input[pattern] + small.placeholder:before {
	left: auto;
	right: 10px;
}

html[dir=rtl] form input[pattern] + small.placeholder:after {
	left: auto;
	right: 0;
}

form input[pattern]:focus:invalid + small.placeholder:before {
	top: -5px;
	opacity: 1;
}

form input[pattern]:focus:invalid + small.placeholder:after {
	top: 10px;
	opacity: 1;
}
