/**
 * Motorica – Float-Label Formularfelder (environment-settings Pattern)
 * Focus-Akzent: Motorica-Orange #fa5700
 */

.motorica-form-float-scope .form-float label.float-label .btn {
	pointer-events: auto;
	margin-left: 0.25rem;
	vertical-align: middle;
}

.motorica-form-float-scope .motorica-field-group,
.motorica-form-float-scope .form-group.motorica-float-migrated,
.motorica-form-float-scope .mb-3.motorica-float-migrated,
.motorica-form-float-scope .mb-2.motorica-float-migrated,
.motorica-form-float-scope .mb-4.motorica-float-migrated {
	margin-bottom: 1.25rem;
	position: relative;
}

.motorica-form-float-scope .form-group.motorica-float-migrated > label:not(.float-label),
.motorica-form-float-scope .motorica-field-group > label:not(.float-label):not(.motorica-settings-toggle) {
	display: none;
}

.motorica-form-float-scope .motorica-field-group > label.motorica-settings-toggle {
	display: flex;
}

.motorica-form-float-scope .motorica-field-hint {
	background: #e0f2fe;
	color: #0c4a6e;
	border-radius: 6px;
	border-left: 3px solid #0ea5e9;
	font-size: 0.8125rem;
	line-height: 1.45;
	padding: 0.5rem 0.75rem;
	margin-top: 0.5rem;
}

.motorica-form-float-scope .motorica-field-info {
	background: #e0f2fe;
	color: #0c4a6e;
	border-radius: 6px;
	border-left: 3px solid #0ea5e9;
	font-size: 0.8125rem;
	line-height: 1.45;
	padding: 0.5rem 0.75rem;
	margin-top: 0.5rem;
}

.motorica-form-float-scope .motorica-field-required {
	color: #dc2626;
	font-weight: 700;
}

.motorica-form-float-scope .form-float {
	position: relative;
	width: 100%;
}

.motorica-form-float-scope .form-float .form-control,
.motorica-form-float-scope .form-float input[type="text"],
.motorica-form-float-scope .form-float input[type="email"],
.motorica-form-float-scope .form-float input[type="tel"],
.motorica-form-float-scope .form-float input[type="number"],
.motorica-form-float-scope .form-float input[type="date"],
.motorica-form-float-scope .form-float input[type="password"],
.motorica-form-float-scope .form-float select.form-control,
.motorica-form-float-scope .form-float textarea.form-control {
	display: block;
	width: 100%;
	padding: 1.25rem 0 0.6rem;
	font-size: 1rem;
	line-height: 1.4;
	color: #0f172a;
	background: transparent;
	border: none;
	border-bottom: 1.5px solid #e2e8f0;
	border-radius: 0;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	min-height: 3.5rem;
}

.motorica-form-float-scope .form-float textarea.form-control {
	min-height: 7rem;
	resize: vertical;
	padding-top: 1.5rem;
}

.motorica-form-float-scope .form-float--textarea label.float-label {
	top: 1.25rem;
	transform: translateY(0);
}

.motorica-form-float-scope .form-float--textarea textarea:focus ~ label.float-label,
.motorica-form-float-scope .form-float--textarea textarea:not(:placeholder-shown) ~ label.float-label {
	top: 0.15rem;
	font-size: 0.7rem;
}

.motorica-form-float-scope .form-float .form-control::placeholder,
.motorica-form-float-scope .form-float input::placeholder,
.motorica-form-float-scope .form-float textarea::placeholder {
	color: transparent;
}

.motorica-form-float-scope .form-float .form-control:focus,
.motorica-form-float-scope .form-float input:focus,
.motorica-form-float-scope .form-float select.form-control:focus,
.motorica-form-float-scope .form-float textarea:focus {
	outline: none;
	border-bottom-color: #fa5700;
	box-shadow: 0 1.5px 0 0 #fa5700;
}

.motorica-form-float-scope .form-float label.float-label {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	padding: 0;
	padding-right: 3rem;
	font-size: 1rem;
	font-weight: 500;
	color: #94a3b8;
	pointer-events: none;
	transition: top 0.2s ease, transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.motorica-form-float-scope .motorica-field-group:not(:has(.motorica-field-help-slot)) .form-float label.float-label {
	padding-right: 0;
}

.motorica-form-float-scope .form-float input:focus ~ label.float-label,
.motorica-form-float-scope .form-float input:not(:placeholder-shown) ~ label.float-label,
.motorica-form-float-scope .form-float input.has-value ~ label.float-label,
.motorica-form-float-scope .form-float input[type="date"]:valid ~ label.float-label,
.motorica-form-float-scope .form-float input[type="time"]:valid ~ label.float-label,
.motorica-form-float-scope .form-float input[type="datetime-local"]:valid ~ label.float-label,
.motorica-form-float-scope .form-float select:focus ~ label.float-label,
.motorica-form-float-scope .form-float select.has-value ~ label.float-label,
.motorica-form-float-scope .form-float--select-native select.form-control ~ label.float-label,
.motorica-form-float-scope .form-float textarea:focus ~ label.float-label,
.motorica-form-float-scope .form-float textarea:not(:placeholder-shown) ~ label.float-label {
	top: -0.35rem;
	transform: translateY(0);
	font-size: 0.7rem;
	color: #475569;
}

.motorica-form-float-scope .form-float input:focus ~ label.float-label,
.motorica-form-float-scope .form-float select:focus ~ label.float-label,
.motorica-form-float-scope .form-float textarea:focus ~ label.float-label {
	color: #fa5700;
}

.motorica-form-float-scope .form-float select.form-control {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0 top 50%;
	padding-right: 1.5rem;
	height: auto !important;
	color: #0f172a !important;
	-webkit-text-fill-color: #0f172a;
}

.motorica-form-float-scope .form-float .motorica-settings-input-mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 0.92rem;
	letter-spacing: 0.03em;
}

.motorica-form-float-scope .form-float .motorica-settings-readonly {
	background-color: #f8fafc;
	cursor: not-allowed;
}

.motorica-form-float-scope .was-validated .form-float .form-control:invalid,
.motorica-form-float-scope .was-validated .form-float input:invalid,
.motorica-form-float-scope .was-validated .form-float select:invalid,
.motorica-form-float-scope .was-validated .form-float textarea:invalid {
	border-bottom-color: #dc2626;
	box-shadow: 0 1.5px 0 0 #dc2626;
}

.motorica-form-float-scope .was-validated .form-float .form-control:invalid ~ label.float-label,
.motorica-form-float-scope .was-validated .form-float input:invalid ~ label.float-label,
.motorica-form-float-scope .was-validated .form-float select:invalid ~ label.float-label {
	color: #dc2626;
}

.motorica-form-float-scope .motorica-typeahead-wrap .form-float,
.motorica-form-float-scope .motorica-map-picker-wrap .form-float {
	position: relative;
}

.motorica-form-float-scope .motorica-settings-section-title {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #64748b;
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--motorica-primary, #ff6600);
	display: inline-block;
	min-width: 10rem;
}

.motorica-form-float-scope .motorica-settings-section {
	margin-top: 0.5rem;
	margin-bottom: 0.25rem;
}

.motorica-form-float-scope .motorica-settings-section + .motorica-settings-section {
	margin-top: 1.5rem;
	padding-top: 0.25rem;
}

.motorica-form-float-scope .form-float--select2 {
	position: relative;
	min-height: 3.5rem;
}

.motorica-form-float-scope .motorica-field-sublabel {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.8125rem;
	line-height: 1.35;
	color: #64748b;
}

.motorica-form-float-scope .motorica-field-group--has-help {
	display: block;
	position: relative;
	padding-right: 3.25rem;
}

.motorica-form-float-scope .motorica-field-group--has-help > .form-float,
.motorica-form-float-scope .motorica-field-group--has-help > .motorica-typeahead-wrap {
	width: 100%;
	min-width: 0;
}

.motorica-form-float-scope .motorica-field-group--has-help > .motorica-field-hint,
.motorica-form-float-scope .motorica-field-group--has-help > .motorica-field-sublabel,
.motorica-form-float-scope .motorica-field-group--has-help > .form-text,
.motorica-form-float-scope .motorica-field-group--has-help > .invalid-feedback {
	flex: 1 1 100%;
	min-width: 0;
}

.motorica-form-float-scope .form-float--calendar-picker .calendar-picker-input {
	padding-right: 0;
}

.motorica-form-float-scope .was-validated .form-float--select2.is-invalid .select2-container--motorica-float .select2-selection--single,
.motorica-form-float-scope .was-validated .form-float--select2.is-invalid .select2-container--motorica-float .select2-selection--multiple {
	border-bottom-color: #dc2626;
	box-shadow: 0 1.5px 0 0 #dc2626;
}

@media (max-width: 767.98px) {
	.motorica-form-float-scope .form-float .form-control,
	.motorica-form-float-scope .form-float input,
	.motorica-form-float-scope .form-float select.form-control {
		font-size: 16px;
		min-height: 3.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.motorica-form-float-scope .form-float .form-control,
	.motorica-form-float-scope .form-float input,
	.motorica-form-float-scope .form-float select,
	.motorica-form-float-scope .form-float textarea,
	.motorica-form-float-scope .form-float label.float-label {
		transition: none;
	}
}
