.float-label {
	position: relative;
	display: grid;
	gap: 0.5em;
}

.float-label > * {
	box-sizing: border-box;
	width:  100%;
}

.float-label > .field,
.float-label > .field ~ label,
.float-label > select,
.float-label > input,
.float-label > textarea,
.float-label > textarea ~ label,
.float-label > input ~ label {
/*	padding: .75rem .75rem;*/
	padding: .75rem 1rem;
	font-size: inherit;
    line-height: inherit;
    margin-top: 0; /*textarea has top margin*/
}
.float-label > select.field {
/*	padding: .75rem .5rem;*/
	padding: .75rem .75rem;
}

.float-label > .field {
	background-color:white;
}

.float-label > .field ~ label,
.float-label > textarea ~ label,
.float-label > input ~ label {
	pointer-events: none;
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: fit-content;
	margin-bottom: 0; /* Override default `<label>` margin */
	

	color: #999;
	border: 1px solid transparent;
	border-radius: .25rem;
	transition: all .1s ease-in-out;
}

.float-label > input::-webkit-input-placeholder {
	color: transparent;
}

.float-label > input:-ms-input-placeholder {
	color: transparent;
}

.float-label > input::-ms-input-placeholder {
	color: transparent;
}

.float-label > input::-moz-placeholder {
	color: transparent;
}

.float-label > textarea::placeholder,
.float-label > input::placeholder {
	color: transparent;
}
.float-label > .field:not(:empty),
/*.float-label > .field,*/
.float-label > textarea:not(:placeholder-shown),
.float-label > input:not(:placeholder-shown) {
	padding-top: calc(.75rem + .75rem * (2 / 3));
	padding-bottom: calc(.75rem / 3);
}
.float-label > .field:not(:empty) ~ label,
/*.float-label > .field ~ label,*/
.float-label > textarea:not(:placeholder-shown) ~ label,
.float-label > input:not(:placeholder-shown) ~ label {
	padding-top: calc(.75rem / 3);
	padding-bottom: calc(.75rem / 3);
	font-size: 12px;
	color: #999;
}
/*.float-label > input[type=date]:not(:placeholder-shown) {
	padding-top: calc(.55rem + .75rem * (2 / 3));
}*/
@-moz-document url-prefix() { 
	.float-label > input[type=date]:not(:placeholder-shown) {
		padding-top: calc(.75rem + .75rem * (2 / 3));
	}
}

.float-label.icon > input {
	background-repeat: no-repeat;
	background-position: 5px center;
	padding-left:  35px;
}
.float-label.icon > input ~ label {
	padding-left:  35px;
}

.float-label.icon.phone > input {
	background-image: url('icons/phone.svg');
}
.float-label.icon.name > input {
	background-image: url('icons/name.svg');
}
.float-label.icon.lock > input {
	background-image: url('icons/lock.svg');
}
.float-label.icon.geo > input {
	background-image: url('icons/geo.svg');
}
.float-label.icon.date > input {
	background-image: url('icons/date.svg');
}
.float-label.icon.plus > input {
	background-image: url('icons/plus.svg');
}
.float-label.icon.mail > input {
	background-image: url('icons/mail.svg');
}
.float-label.icon.org > input {
	background-image: url('icons/org.svg');
}
.float-label.icon.child > input {
	background-image: url('icons/child.svg');
}




.float-field-help {
	--gauge: 1px;
	--size: 30px;
	margin-top:0.25rem;
	margin-left:calc(1rem + var(--gauge));
	margin-right:calc(var(--gauge) + var(--size) + 0.5em);
	color: gray; 
	font-size: 12px
}
.float-label {
	--gauge: 1px;
	--size: 30px;
}
.float-label > .field {
	cursor: default;
	border-radius: var(--radius);
	display: block;
	transition: border-color 0.5s;
	min-width: 15ch;
	
	font-style: italic;
	font-family: monospace;
}
.float-label > select.field {
	font-family: inherit;
	font-style: normal;
}
.float-label > .field[contenteditable] {
	min-height: 4rem;
}



.float-label > .field,
.float-label > .field ~ label {
	/*margin-left:calc(-0.75rem - var(--gauge));
	margin-right:calc(-0.75rem - var(--gauge));
	width:calc(100% + 2 * (0.75rem + var(--gauge)));*/
}
.float-label > .field:focus {
	outline: none;
	border-style:solid;
	border-color: currentColor;
}
.float-label.success,
.float-label.error,
.float-label.process,
.float-label.submit {
	grid-template-columns: 1fr auto;
}
.float-label.success > .field {
	border-color: var(--success);
}
.float-label.process > .field {
	border-color: var(--black);
/*	border-style: dashed;*/
}
.float-label.error > .field {
	border-color: var(--danger)
}
.float-label .status > *:focus-visible {
	color:black!important;
}
.float-label .status > * {
	
	display: grid; align-items:center; justify-content: center;
}
.float-label .status {
	cursor: pointer;
	border:solid 1px color-mix(in srgb, currentColor 10%, transparent);
	border-radius: var(--size);
	width:var(--size);
	height:var(--size);
	display: grid; 
}
.float-label .status > *  {
	grid-row: 1 / 1;
	grid-column: 1 / 1;
	transition: none;
	display: none;
}

.float-label.error .status .error {
	display: grid;
}
.float-label.process .status .process {
	display: grid;
	animation-name: float_label_rotation;
	animation-duration: 1s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
}
.float-label.success .status .success {	
	display: grid;
}
.float-label.submit .status .submit {	
	display: grid;
}


.float-label [disabled] {
	opacity:0.5;
	cursor: default;
}
@keyframes float_label_rotation {
	0% {
		transform:rotate(0deg);
	}
	100% {
		transform:rotate(360deg);
	}
}

.float-label .field, 
.float-label input, 
.float-label select, 
.float-label textarea {
	border: 1px solid var(--border-color);
	border-radius: 30px;
}
.float-label > .field ~ label,
.float-label > input ~ label {
	color: #999;
}

@media (max-width: 575px) {
	.float-label > .field,
	.float-label > .field ~ label,
	.float-label > select,
	.float-label > input,
	.float-label > textarea,
	.float-label > textarea ~ label,
	.float-label > input ~ label {
		padding-left: 0.5em;
		padding-right: 0.5em;
	}
}