/* OS Property - shared form styles. Relies on Bootstrap 5 / Joomla 5-6 CSS variables with safe fallbacks
   so it follows the active template, light and dark colour schemes. */
.osp-form {
	--osp-danger: var(--bs-danger, var(--danger, #dc3545));
	--osp-border: var(--bs-border-color, currentColor);
	max-width: 100%;
	color: inherit;
}
.osp-form [hidden] {
	display: none !important;
}
.osp-form .form-control,
.osp-form .form-select,
.osp-form textarea,
.osp-form select {
	max-width: 100%;
	box-sizing: border-box;
}
.osp-form textarea {
	min-height: 5rem;
	resize: vertical;
}
.osp-form .osp-field {
	margin-bottom: .75rem;
}
.osp-form-inline .osp-field input,
.osp-form-inline .osp-field select,
.osp-form-inline .osp-field textarea {
	width: 100%;
}
.osp-form .osp-captcha {
	max-width: 100%;
	overflow-x: auto;
	margin-bottom: .75rem;
}
.osp-form .osp-consent {
	margin-bottom: .75rem;
}
.osp-form .osp-consent-label {
	display: block;
	cursor: pointer;
}
.osp-form .osp-consent-label input[type="checkbox"] {
	margin-right: .35rem;
	vertical-align: middle;
}
.osp-form .osp-consent .alert {
	margin: .5rem 0 0;
	color: inherit;
	background-color: transparent;
	border: 1px solid var(--osp-border);
}
.osp-form .osp-field-error,
.osp-form input.is-invalid,
.osp-form textarea.is-invalid,
.osp-form select.is-invalid {
	border-color: var(--osp-danger) !important;
}
.osp-form .osp-error-message {
	display: block;
	width: 100%;
	margin-top: .25rem;
	font-size: .875em;
	color: var(--osp-danger);
}
.osp-form .osp-actions {
	margin-top: .5rem;
}
.osp-form .osp-submitting {
	opacity: .65;
	cursor: wait;
}
@media (max-width: 767.98px) {
	.osp-form.form-horizontal .control-label,
	.osp-form.form-horizontal .form-label {
		float: none;
		width: auto !important;
		text-align: left;
		padding-top: 0;
	}
	.osp-form.form-horizontal .controls {
		margin-left: 0;
	}
	.osp-form .form-control,
	.osp-form .form-select {
		width: 100%;
	}
}
