/**
 * CSS for your public-facing functionality
 */

.select2 .selection span.select2-selection {
	appearance: none;
	box-sizing: border-box;
	border-color: #6b7280;
	border-width: 1px;
	min-height: 42px !important;
	padding-top: 1px !important;
}

/* Custom validation colors override like #billing_cf_field label.error */

[id^='billing'] label.error {
	background-color: #a00 !important;
	font-size: small !important;
	padding-top: 4px;
}

[id^='billing'] input.error {
	border-color: #a00 !important;
}

#customCAPDiv {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 0.5rem;
	justify-content: flex-start;
}

#customCAPDiv #customCAP {
	width: 65%;
}

#customCAPDiv #customCAPBtn {
	width: 35%;
	padding: 0.5rem;
}

#billing_postcode_field label[for='billing_postcode'] {
	color: black;
}

.woocommerce form #billing_CAPList_field.form-row.woocommerce-invalid label,
.woocommerce form #billing_CAPList_field.form-row.label {
	color: #111820;
}

.hiddenToggledCAP {
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	position: absolute !important;
	z-index: -9999 !important;
	/* top: -9999px !important; */
}

#cf_omocodia_chkbox_field .optional {
	display: none;
}

#cf_omocodia_chkbox_field label.checkbox {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	font-size: 15px;
}

#billing_fiscal_code_ro::-webkit-inner-spin-button,
#billing_fiscal_code_ro::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
#billing_fiscal_code_ro {
	appearance: textfield;
	-moz-appearance: textfield;
}

#billing_eu_vat_numbe-description {
	padding: 4px 6px;
	font-size: small;
}

/* Fix WooCommerce Select2 misalignment */
.woocommerce-billing-fields .select2-container .select2-selection--single .select2-selection__rendered {
	height: unset;
	line-height: 1.5rem !important;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

/* Yith error field */
.woocommerce-input-wrapper .ywccp_error,
.woocommerce-input-wrapper span.field-error {
	display: none !important;
}

.woocommerce p#nuvei_go_back {
	display: none !important;
}

.woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text {
	line-height: 1.8;
}

.woocommerce-checkout .woocommerce-checkout-payment #namirial_checkout_field label.checkbox {
	text-align: left;
	line-height: 2;
}

.woocommerce-checkout .woocommerce-checkout-payment #namirial_checkout_field label.checkbox input#consenso_promozioni {
	min-width: 20px;
	min-height: 20px;
}

/*
 * ERP autofill overlay
 */

/* the overlay just covers the wrapped scope */
.checkout-fields-wrapper {
	position: relative;
}

.checkout-fields-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	z-index: 10;
	border-radius: 6px;
	align-items: flex-start;
	justify-content: flex-start;
	backdrop-filter: opacity(0.5);
	transition: opacity 0.3s ease;
}

.checkout-fields-overlay.hidden {
	opacity: 0;
	pointer-events: none;
}

.overlay-message {
	background: white;
	padding: 6px 12px;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	text-align: center;
	max-width: 280px;
}

/* ERP autofill notice */
.checkout-autofill-notice {
	display: none;
	margin-bottom: 1rem;
	padding: 12px 16px;
	border: 1px solid #d9e6f2;
	border-radius: 8px;
	background: #f4f8fc;
	color: #111820;
}

.checkout-autofill-notice.is-visible {
	display: block;
}

.checkout-autofill-notice__text {
	margin: 0;
	line-height: 1.5;
}

.checkout-autofill-notice__actions {
	margin: 0;
	line-height: 1.5;
}

.checkout-autofill-notice__edit {
	display: inline;
	padding: 0;
	border: 0;
	background: transparent;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.checkout-autofill-notice__edit:hover,
.checkout-autofill-notice__edit:focus {
	outline: none;
}

.checkout-autofill-notice__edit:focus-visible {
	outline: 2px solid #003e6b;
	outline-offset: 2px;
	border-radius: 2px;
}

.checkout-autofill-notice.is-manual-edit {
	color: #442e04;
	background: #ffecce;
	border: 1px solid #d79b00;
}

.form-row.is-user-modified label {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.form-row.is-user-modified label::after {
    content: "[modificato]";
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    margin-left: 10px;
    white-space: nowrap;
}

@media (min-width: 640px) {
	.overlay-message {
		max-width: 600px;
	}
}

.overlay-message p {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
}

.fiscal-fields-group {
	position: relative;
	z-index: 11;
}

.blocked-fields {
	position: relative;
	pointer-events: none; /* actual block = disabled on input fields */
	/* filter: blur(1px); */
	filter: opacity(0.3);
}

.blocked-fields.active {
	pointer-events: auto;
	filter: none;
}

.blocked-fields:not(.active) {
	padding-top: 3rem;
}

/* Prevent focus adn TAB navigation on locked fields */
.blocked-fields:not(.active) input,
.blocked-fields:not(.active) select,
.blocked-fields:not(.active) textarea,
.blocked-fields:not(.active) button {
	pointer-events: none;
	user-select: none;
}

#billing_piva_field,
#billing_cf_field {
	position: relative; /* for loader positioning */
}

#nam-cf-placeholder {
  width: 100%;
  clear: both;
}

/* Loader for AJAX call */
/* HTML: <div class="field-loader"></div> */
/* https://css-loaders.com/spinner/ */
.field-loader {
	position: absolute;
	right: 2%;
	top: 48%;
	width: 30px;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(farthest-side, #6b7280 94%, #0000) top/8px 8px no-repeat, conic-gradient(#0000 30%, #6b7280);
	mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
	-webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
	animation: l13 1s infinite linear;
}
@media (min-width: 1024px) {
	.field-loader {
		top: 39%;
		width: 40px;
	}
}
@keyframes l13 {
	100% {
		transform: rotate(1turn);
	}
}

h3.fiscal-fields-title,
h3.contact-fields-title {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #111820;
}

.optional-text {
	font-weight: normal;
}

.ws-locked {
	background-color: #f5f5f5 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
	opacity: 0.7;
}

.select2-container--disabled,
.select2-container.ws-locked {
	pointer-events: none !important;
	opacity: 0.7;
}

.select2-container.ws-locked .select2-selection {
	background-color: #f5f5f5 !important;
	cursor: not-allowed !important;
}

/* Custom WooCommerce warning notice type */
.woocommerce-warning {
	background-color: #FFECCE;
	color: #2F1E00;
	border-radius: .375rem !important;
	font-size: 16px !important;
	line-height: 1.5 !important;
	margin: 1rem auto !important;
	padding: 1rem 2rem 1rem 4rem !important;
	position: relative;
}

.woocommerce-warning::before {
	content: '';
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 492.308 492.308'%3E%3Cg%3E%3Crect x='236.308' y='213.652' width='19.692' height='191.124' fill='%232F1E00'/%3E%3C/g%3E%3Cg%3E%3Crect x='236.308' y='159.872' width='19.692' height='24.507' fill='%232F1E00'/%3E%3C/g%3E%3Cg%3E%3Cpath d='M486.823,422.837L283.073,23.75C275.486,8.885,261.679,0,246.159,0c-15.529,0-29.337,8.885-36.923,23.75L5.477,422.837c-7.894,15.471-7.192,34.24,1.827,48.981c7.856,12.827,20.981,20.49,35.096,20.49h407.51c14.125,0,27.24-7.663,35.096-20.49C494.025,457.077,494.727,438.308,486.823,422.837z M468.208,461.538c-4.308,7.038-10.981,11.077-18.298,11.077H42.4c-7.317,0-13.99-4.038-18.298-11.077c-5.471-8.942-5.885-20.337-1.086-29.74l203.76-399.087c4.163-8.154,11.404-13.019,19.385-13.019c7.971,0,15.212,4.865,19.375,13.019l203.75,399.087C474.092,441.202,473.679,452.596,468.208,461.538z' fill='%232F1E00'/%3E%3C/g%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
	width: 20px;
	height: 20px;
	display: inline-block;
	position: absolute;
	left: 1.5em;
	top: 50%;
	transform: translateY(-50%);
}