/* Preventivo personalizzato — chat, carrello, checkout (desktop + mobile) */

.vc-quote {
	flex: 0 0 auto;
	padding: 10px 12px 8px;
	background: #f0f2f5;
	border-top: 1px solid #d1d7db;
	min-height: 0;
	overflow: visible;
}

.vc-quote__card {
	background: #fff;
	border: 1px solid #d1d7db;
	border-radius: 12px;
	padding: 12px 14px 14px;
	box-shadow: 0 1px 2px rgba(17, 27, 33, 0.06);
}

.vc-quote__card.is-info {
	opacity: 0.92;
}

.vc-quote__card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.vc-quote__card-head strong {
	font-size: 0.95rem;
	color: #111b21;
}

.vc-quote__badge {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #e8f5e9;
	color: #1b5e20;
	font-size: 0.72rem;
	font-weight: 700;
}

.vc-quote__hint,
.vc-quote__expiry,
.vc-quote__note,
.vc-quote__form-intro {
	margin: 0 0 8px;
	font-size: 0.78rem;
	line-height: 1.4;
	color: #667781;
}

.vc-quote__expiry {
	margin-top: 8px;
	margin-bottom: 0;
	font-weight: 600;
}

.vc-quote-lines {
	display: grid;
	gap: 6px;
	margin-top: 8px;
}

.vc-quote-lines__row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	align-items: start;
	padding: 6px 0;
	border-bottom: 1px dashed #e0e4e8;
	font-size: 0.88rem;
}

.vc-quote-lines__row--totale {
	border-bottom: 0;
	padding-top: 8px;
	font-weight: 700;
	color: #0445af;
}

.vc-quote-lines__row--note {
	grid-template-columns: 1fr;
}

.vc-quote-lines__label {
	color: #111b21;
}

.vc-quote-lines__value {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.vc-quote-lines__row--note .vc-quote-lines__value {
	text-align: left;
	white-space: normal;
	color: #667781;
	font-size: 0.82rem;
}

.vc-wa-bubble .vc-quote-bubble-actions {
	margin-top: 10px;
}

.vc-quote-bubble-cta,
.vc-quote-bubble-cta--link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	border: 0;
	border-radius: 10px;
	background: #0445af;
	color: #fff !important;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	box-sizing: border-box;
}

.vc-quote-bubble-cta:hover,
.vc-quote-bubble-cta:focus-visible,
.vc-quote-bubble-cta--link:hover,
.vc-quote-bubble-cta--link:focus-visible {
	filter: brightness(1.08);
	color: #fff !important;
	outline: none;
}

.vc-quote-bubble-cta:disabled {
	opacity: 0.65;
	cursor: wait;
}

.vc-wa-bubble .vc-quote__status {
	margin: 6px 0 0;
}

.vc-quote__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.vc-quote__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.65rem 1rem;
	border-radius: 12px;
	border: none;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none !important;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

.vc-quote__btn--primary {
	background: linear-gradient(135deg, #0445af 0%, #0356c9 55%, #04b8d8 100%);
	color: #fff !important;
	width: 100%;
}

.vc-quote__btn--secondary {
	background: #fff;
	color: #0445af !important;
	border: 1.5px solid #0445af;
	width: 100%;
}

.vc-quote__btn--ghost {
	background: transparent;
	color: #c62828 !important;
	border: 1px solid #ffcdd2;
	width: 100%;
}

.vc-quote__btn:disabled {
	opacity: 0.65;
	cursor: wait;
}

.vc-quote__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin-top: 8px;
	padding: 0.65rem 1rem;
	border-radius: 12px;
	border: 1.5px dashed #0445af;
	background: #fff;
	color: #0445af;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
}

.vc-quote__drawer {
	margin-top: 8px;
}

.vc-quote__drawer-sum {
	list-style: none;
	cursor: pointer;
}

.vc-quote__drawer-sum::-webkit-details-marker {
	display: none;
}

.vc-quote__form {
	margin-top: 8px;
	padding: 12px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #d1d7db;
}

.vc-quote__form-title {
	display: block;
	margin: 0 0 8px;
	font-size: 0.95rem;
	color: #111b21;
}

.vc-quote__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 10px;
	font-size: 0.82rem;
	font-weight: 600;
	color: #111b21;
}

.vc-quote__field input,
.vc-quote__field textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #d1d7db;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 400;
	color: #111b21;
	background: #fff;
	box-sizing: border-box;
}

.vc-quote__field textarea {
	min-height: 84px;
	resize: vertical;
}

.vc-quote__status {
	margin: 8px 0 0;
	font-size: 0.82rem;
	color: #667781;
}

.vc-quote__status.is-error {
	color: #c62828;
}

.vc-quote__status.is-success {
	color: #2e7d32;
}

/* Carrello / checkout */
.woocommerce-cart .vc-quote-lines,
.woocommerce-checkout .vc-quote-lines,
.woocommerce-order .vc-quote-lines {
	margin-top: 8px;
	max-width: 420px;
}

.woocommerce-cart .vc-vendor-quote-item .quantity,
.woocommerce-checkout .vc-vendor-quote-item .quantity {
	display: none !important;
}

.widget_shopping_cart .vc-quote-lines,
.astra-cart-drawer .vc-quote-lines,
.widget_shopping_cart .variation,
.astra-cart-drawer .variation,
.ast-site-header-cart .variation,
.ast-site-header-cart .vc-quote-lines {
	display: none !important;
}

.widget_shopping_cart .mini_cart_item,
.astra-cart-drawer .mini_cart_item,
.ast-site-header-cart .mini_cart_item {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: flex-start !important;
	gap: 8px !important;
	writing-mode: horizontal-tb !important;
	white-space: normal !important;
	word-break: break-word !important;
}

.woocommerce-checkout .vc-vendor-quote-item .variation,
.woocommerce-cart .widget_shopping_cart .variation {
	display: grid;
	gap: 4px;
	margin-top: 8px;
}

.woocommerce-checkout .vc-vendor-quote-item .variation dt,
.woocommerce-checkout .vc-vendor-quote-item .variation dd {
	display: inline;
	margin: 0;
	float: none;
	font-size: 0.84rem;
}

.woocommerce-checkout .vc-vendor-quote-item .variation p {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	margin: 0;
	padding: 4px 0;
	border-bottom: 1px dashed #e0e4e8;
}

@media (min-width: 782px) {
	.vc-quote {
		padding: 12px 16px 10px;
	}

	.vc-quote__btn--primary,
	.vc-quote__btn--secondary,
	.vc-quote__btn--ghost {
		width: auto;
		min-width: 220px;
	}

	.vc-quote__drawer-sum {
		display: block;
		margin: 0 0 8px;
		padding: 0;
		border: 0;
		background: transparent;
		font-size: 0.95rem;
		font-weight: 700;
		color: #111b21;
		cursor: default;
		pointer-events: none;
	}

	.vc-quote__form {
		display: block !important;
		max-width: 520px;
	}

	.vc-quote__form-actions .vc-quote__btn {
		width: auto;
	}
}

body.vc-page-vendor-store ul.products li.product {
	overflow: hidden !important;
}

body.vc-page-vendor-store ul.products li.product .astra-shop-summary-wrap {
	overflow: visible !important;
	padding-bottom: 0.55rem !important;
}

body.vc-page-vendor-store ul.products li.product .vc-loop-cta {
	display: flex !important;
	flex-direction: column !important;
	flex: 0 0 auto !important;
	gap: 0.4rem;
	width: calc(100% - 1.5rem) !important;
	margin: 0.55rem 0.75rem 0.75rem !important;
	box-sizing: border-box;
}

body.vc-page-vendor-store ul.products li.product .vc-loop-cta .button,
body.vc-page-vendor-store ul.products li.product .vc-loop-cta a.button,
body.vc-page-vendor-store ul.products li.product .vc-loop-cta .add_to_cart_button {
	width: 100% !important;
	margin: 0 !important;
	margin-top: 0 !important;
}

body.vc-page-vendor-store ul.products li.product .vc-store-quote {
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto !important;
	width: 100% !important;
	margin: 0 !important;
	min-height: 40px;
	padding: 0.55rem 0.65rem;
	border-radius: 8px;
	border: 0;
	background: #0445af !important;
	background-image: none !important;
	color: #fff !important;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-decoration: none !important;
	box-sizing: border-box;
	white-space: normal;
	position: relative;
	z-index: 3;
	visibility: visible !important;
	opacity: 1 !important;
}

body.vc-page-vendor-store ul.products li.product .vc-store-quote:hover,
body.vc-page-vendor-store ul.products li.product .vc-store-quote:focus-visible {
	filter: brightness(1.08);
	color: #fff !important;
	outline: none;
}

body.vc-page-vendor-store ul.products li.product .vc-store-quote.is-busy {
	opacity: 0.65;
	pointer-events: none;
}

@media (min-width: 782px) {
	body.vc-page-vendor-store.woocommerce ul.products,
	body.vc-page-enhancer.vc-page-vendor-store ul.products {
		align-items: stretch !important;
	}

	body.vc-page-vendor-store.woocommerce ul.products li.product,
	body.vc-page-enhancer.vc-page-vendor-store ul.products li.product {
		height: 100% !important;
		align-self: stretch !important;
		display: flex !important;
		flex-direction: column !important;
	}

	body.vc-page-vendor-store ul.products li.product .astra-shop-summary-wrap {
		display: flex !important;
		flex-direction: column !important;
		flex: 1 1 auto !important;
		overflow: visible !important;
		padding-bottom: 0.75rem !important;
	}

	body.vc-page-vendor-store ul.products li.product .woocommerce-loop-product__title {
		min-height: 3.9em !important;
	}

	body.vc-page-vendor-store ul.products li.product .vc-loop-cta {
		display: flex !important;
		flex-direction: column !important;
		flex-shrink: 0 !important;
		width: calc(100% - 1.5rem) !important;
		min-height: 92px !important;
		margin: 0.55rem 0.75rem 0 !important;
		margin-top: auto !important;
		overflow: visible !important;
	}

	body.vc-page-vendor-store ul.products li.product .vc-loop-cta .button,
	body.vc-page-vendor-store ul.products li.product .vc-loop-cta a.button,
	body.vc-page-vendor-store ul.products li.product .vc-loop-cta .add_to_cart_button {
		margin-top: 0 !important;
		width: 100% !important;
	}

	body.vc-page-vendor-store ul.products li.product a.vc-store-quote {
		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;
		height: auto !important;
		max-height: none !important;
		flex-shrink: 0 !important;
		background: #0445af !important;
		background-image: none !important;
		color: #fff !important;
	}
}

/* Scheda prodotto P.IVA: al posto di «Scrivi al venditore» */
body.vc-product-vendor-store .wcfm_catalog_enquiry_button_wrapper,
body.vc-product-vendor-store a.wcfm_catalog_enquiry {
	display: none !important;
}

body.vc-product-vendor-store .vc-product-quote-wrap {
	margin: 1rem 0 0.35rem;
	padding: 0;
}

body.vc-product-vendor-store a.vc-product-quote {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin: 0 !important;
	padding: 0.85rem 1.15rem;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(135deg, #0445af 0%, #0356c9 55%, #04b8d8 100%) !important;
	background-image: linear-gradient(135deg, #0445af 0%, #0356c9 55%, #04b8d8 100%) !important;
	color: #fff !important;
	font-size: 1.02rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-decoration: none !important;
	box-sizing: border-box;
	box-shadow: 0 6px 18px rgba(4, 69, 175, 0.22);
}

body.vc-product-vendor-store a.vc-product-quote:hover,
body.vc-product-vendor-store a.vc-product-quote:focus-visible {
	filter: brightness(1.05);
	color: #fff !important;
	outline: none;
}

body.vc-product-vendor-store a.vc-product-quote.is-busy {
	opacity: 0.65;
	pointer-events: none;
}

@media (max-width: 781px) {
	body.vc-page-vendor-store ul.products li.product .vc-loop-cta {
		width: calc(100% - 1rem) !important;
		margin: 0.45rem 0.5rem 0.55rem !important;
		margin-top: auto !important;
		gap: 0.3rem;
	}

	body.vc-page-vendor-store ul.products li.product .vc-store-quote {
		width: 100% !important;
		margin: 0 !important;
		min-height: 36px;
		font-size: 0.72rem;
		padding: 0.4rem 0.45rem;
	}

	.vc-quote {
		padding-bottom: 8px;
	}

	.vc-quote__drawer-sum {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		min-height: 44px;
		padding: 10px 14px;
		border-radius: 12px;
		border: 1px solid #d1d7db;
		background: #fff;
		font-size: 0.92rem;
		font-weight: 700;
		color: #0445af;
		box-sizing: border-box;
	}

	.vc-quote__drawer-sum::after {
		content: "";
		flex: 0 0 10px;
		width: 10px;
		height: 10px;
		border-right: 2px solid #0445af;
		border-bottom: 2px solid #0445af;
		transform: rotate(45deg);
		margin-top: -4px;
	}

	.vc-quote__drawer[open] .vc-quote__drawer-sum {
		border-radius: 12px 12px 0 0;
		border-bottom: 0;
	}

	.vc-quote__drawer[open] .vc-quote__drawer-sum::after {
		transform: rotate(-135deg);
		margin-top: 2px;
	}

	.vc-quote__drawer[open] .vc-quote__form {
		margin-top: 0;
		border-top-left-radius: 0;
		border-top-right-radius: 0;
	}

	.woocommerce-cart .vc-quote-lines__row,
	.woocommerce-checkout .vc-quote-lines__row {
		font-size: 0.84rem;
	}

	.woocommerce-cart .vc-quote-lines__value,
	.woocommerce-checkout .vc-quote-lines__value {
		white-space: normal;
	}
}

.vc-quote-register {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 16px;
}

.vc-quote-register[hidden] {
	display: none !important;
}

.vc-quote-register__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 20, 48, 0.55);
}

.vc-quote-register__sheet {
	position: relative;
	z-index: 1;
	width: min(440px, 100%);
	background: #fff;
	border-radius: 16px 16px 12px 12px;
	padding: 22px 20px 20px;
	box-shadow: 0 12px 40px rgba(4, 69, 175, 0.22);
	box-sizing: border-box;
}

.vc-quote-register__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	color: #0445af;
	cursor: pointer;
}

.vc-quote-register__title {
	margin: 0 36px 10px 0;
	font-size: 1.15rem;
	color: #0445af;
}

.vc-quote-register__lead {
	margin: 0 0 16px;
	font-size: 0.95rem;
	line-height: 1.45;
	color: #1a334d;
}

.vc-quote-register__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.8rem 1rem;
	border-radius: 12px;
	background: #0445af;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	text-align: center;
}

.vc-quote-register__login {
	display: block;
	margin-top: 12px;
	text-align: center;
	color: #0445af;
	font-weight: 600;
}

@media (min-width: 782px) {
	.vc-quote-register {
		align-items: center;
	}
}
