/*
 * Form preventivo (contatti, dove-siamo): avvicina i campi standard WM6 (markup Bootstrap 5: form-floating,
 * form-control, form-check) all'aspetto del vecchio form del tema, che usa Bootstrap 3.
 */

/* label sopra il campo, come nel vecchio form (form-floating la mette dopo l'input) */
.cforms .form-floating {
	display: flex;
	flex-direction: column-reverse;
	float: left;
	width: 100%;
}

.cforms .form-floating > label {
	float: none;
	width: 100%;
	margin-bottom: 5px;
}

.cforms .form-floating > label span {
	color: #c8d219;
	font-size: 12px;
}

/* niente placeholder: il testo è già nella label */
.cforms .form-control::placeholder {
	color: transparent;
}

.cforms .form-control,
.cforms .form-select {
	color: #132b43;
	width: 100%;
	height: auto;
	padding: 8px 12px 7px;
	margin-bottom: 10px;
	border: 1px solid #d1dbe1;
	border-radius: 0;
	background-color: #f3f5f7;
	box-shadow: none;
	font-size: 14px;
	line-height: 1.42857;
}

/* altezze e spaziature: input e select alti 40px, textarea 5 righe */
.cforms .form-control,
.cforms .form-select {
	height: 40px;
	margin-bottom: 15px;
}

.cforms textarea.form-control {
	height: 132px;
}

.cforms .form-select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #597586 50%), linear-gradient(135deg, #597586 50%, transparent 50%);
	background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 30px;
	cursor: pointer;
}

.cforms textarea.form-control {
	resize: none;
}

.cforms .form-control:focus,
.cforms .form-select:focus {
	border-color: #c8d219;
	outline: none;
	box-shadow: none;
}

/* checkbox */
.cforms .form-check {
	clear: both;
	min-height: 40px;
	margin: 10px 0;
	padding: 10px 0 0;
	line-height: 20px;
}

.cforms .form-check-input {
	float: none;
	width: auto;
	margin: 0 6px 0 0;
	padding: 0;
	vertical-align: middle;
	background: none;
	border: none;
}

.cforms .form-check-label {
	float: none;
	width: auto;
	display: inline;
}

/* messaggi di errore della validazione WM6 (Bootstrap 3 non ha d-none / d-block) */
.cforms .invalid-feedback {
	clear: both;
	color: #d90000;
	font-size: 12px;
	margin: -6px 0 8px;
}

.cforms .invalid-feedback.d-none,
.cforms .invalid-feedback[d-none] {
	display: none;
}

.cforms .invalid-feedback.d-block {
	display: block;
}

.cforms .is-invalid {
	border-color: #d90000;
}

/* alert "Correggi gli errori" sotto il bottone (form-processor, markup Bootstrap 5): in Bootstrap 3 .fade senza .in
   è trasparente e .alert non ha stile; la X di chiusura usa il JS di Bootstrap 5, che qui non c'è, quindi è nascosta */
.cforms .alert.fade {
	opacity: 1;
}

.cforms .alert-danger {
	clear: both;
	margin: 15px 0 0;
	padding: 10px 15px;
	color: #d90000;
	font-size: 13px;
	background: #fdeaea;
	border: 1px solid #f3b7b7;
}

.cforms .alert .btn-close {
	display: none;
}

/* bottone: ae() aggiunge .btn, che in Bootstrap 3 cambierebbe l'aspetto di .button */
.cforms .btn.button {
	float: right;
	margin-top: 10px;
	color: #fff;
	padding: 14px 20px;
	font-size: 14px;
	font-weight: 500;
	line-height: normal;
	background: #c8d219;
	border: none;
	border-radius: 3px;
	font-family: 'Raleway', sans-serif;
	white-space: normal;
}

.cforms .btn.button:hover {
	background: #454545;
	color: #fff;
}

/* badge del reCaptcha v3 (aggiunto da Google in fondo al body, fuori da .cforms): nascosto; visibility e non
   display: none, così il reCaptcha continua a funzionare */
.grecaptcha-badge {
	visibility: hidden;
}
