/* Trascriviamo – scheda servizio: riquadro in pagina + barra fissa in basso (1.100.x, proposta B con le modifiche del 09/10) */

/* il riquadro non è più agganciato: scorre con la pagina e mostra tutti i campi */
body.tr-cfg-bar.tr-product-layout .woocommerce div.product div.summary,
body.tr-cfg-bar.tr-product-layout div.product .summary {
	position: static !important; max-height: none !important; overflow: visible !important; display: block !important; padding-bottom: 22px !important;
	/* !important: le regole di product.css per admin-bar + ricerca ripiegata hanno specificità più alta */
}
body.tr-cfg-bar.tr-product-layout div.product .summary > form.cart { display: block; padding-bottom: 0; }
body.tr-cfg-bar.tr-product-layout div.product .summary > form.cart > .wapf { overflow: visible; max-height: none; margin: 0; padding: 0 0 6px; }
body.tr-cfg-bar.tr-product-layout div.product .summary > form.cart > .tr-summary { box-shadow: none; margin-top: 10px; padding-top: 14px; }
body.tr-cfg-bar.tr-product-layout div.product .summary .tr-config-intro { display: none; }
body.tr-cfg-bar.tr-product-layout div.product .summary .tr-config-head { margin-bottom: 6px; }
body.tr-cfg-bar { padding-bottom: 120px; } /* spazio per la barra in fondo alla pagina */

/* 1) formula selezionata: sfondo colorato al posto del bordo */
body.tr-cfg-bar .tr-plan.is-selected,
body.tr-cfg-bar.tr-cards-v2 .tr-plan.is-selected {
	background: #e6f4f5; border: 2px solid #bfdfe2; box-shadow: none;
}
body.tr-cfg-bar .tr-plan.is-selected .tr-plan__price { border-color: #bfdfe2; }

/* 2) barra: riga 1 totale + pulsante; riga 2 badge pagamento + badge Feedaty (sotto il pulsante) */
.tr-cbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
	background: #fff; border-top: 1px solid var(--tr-line, #e5e7eb);
	box-shadow: 0 -12px 34px rgba(17, 24, 39, .14);
	transition: opacity .2s, transform .2s;
}
.tr-cbar[hidden] { display: none; }
.tr-cbar--away { opacity: 0; pointer-events: none; transform: translateY(14px); }
.tr-cbar__in {
	display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 34px; row-gap: 8px;
	align-items: center; justify-content: center; width: min(1180px, 100%); margin: 0 auto; padding: 12px 24px 12px;
}
.tr-cbar__l { grid-column: 1; grid-row: 1; min-width: 0; line-height: 1.1; }
.tr-cbar__kicker { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tr-ink-3, #6b7280); margin-bottom: 2px; }
.tr-cbar__total { display: inline; font-size: 1.55rem; font-weight: 800; color: var(--tr-blue, #1d5fa8); font-variant-numeric: tabular-nums; }
.tr-cbar__total:empty { display: none; }
.tr-cbar__sub { display: inline; margin-left: 6px; font-size: .8rem; color: var(--tr-ink-3, #6b7280); }
.tr-cbar--empty .tr-cbar__sub { display: block; margin: 0; font-size: 1rem; font-weight: 700; color: var(--tr-ink, #1b2430); }
.tr-cbar__det { color: var(--tr-teal, #0d7d88); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.tr-cbar__det:hover { color: #0a6570; }
.tr-cbar__r { grid-column: 2; grid-row: 1; display: flex; justify-content: center; }
.woocommerce .tr-cbar .button.tr-cbar__btn, .tr-cbar .button.tr-cbar__btn {
	flex: 0 0 auto; min-height: 46px; margin: 0; padding: 0 34px; font-size: 14px; letter-spacing: .7px; white-space: nowrap;
}
.tr-cbar--empty .button.tr-cbar__btn { background: var(--tr-teal, #0d7d88); }
.tr-cbar--empty .button.tr-cbar__btn:hover { background: #0a6570; }
/* riga 2 */
.tr-cbar__note { grid-column: 1; grid-row: 2; display: inline-flex; align-items: center; /* niente gap: il testo e lo span sarebbero due elementi flex (doppio spazio) */ padding: 6px 12px 6px 10px; border-radius: 8px; background: #eef8f9; color: #0b4f56; font-size: .82rem; font-weight: 600; white-space: nowrap; justify-self: start; }
.tr-cbar__note::before {
	content: ""; width: 16px; height: 16px; margin-right: 8px; border-radius: 50%; flex: 0 0 auto; background-color: var(--tr-teal, #0d7d88); background-size: 10px 10px; background-position: center; background-repeat: no-repeat;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6L9 17l-5-5'/></svg>");
}
.tr-cbar__nx { display: contents; } /* lo span si fonde col testo: un solo spazio prima di "dei documenti" */
.tr-cbar__proof { grid-column: 2; grid-row: 2; display: flex; justify-content: center; min-height: 20px; }
.tr-cbar__proof .tr-cta-proof { margin: 0; }

@media (max-width: 880px) {
	.tr-cbar__in { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
	.tr-cbar__l { line-height: 1.05; }
	.tr-cbar__kicker { font-size: .64rem; margin-bottom: 1px; }
	.tr-cbar__total { font-size: 1.25rem; }
	.tr-cbar__sub { display: block; margin: 1px 0 0; font-size: .7rem; line-height: 1.25; }
	.tr-cbar--empty .tr-cbar__sub { font-size: .9rem; }
	.tr-cbar__r { justify-content: flex-end; }
	.woocommerce .tr-cbar .button.tr-cbar__btn, .tr-cbar .button.tr-cbar__btn { padding: 0 18px; font-size: 12px; min-height: 42px; }
	.tr-cbar__note { font-size: .7rem; white-space: normal; padding: 4px 9px 4px 8px; line-height: 1.25; }
	.tr-cbar__proof { justify-content: flex-end; }
	.tr-cbar__proof .tr-cta-proof { font-size: .7rem; white-space: nowrap; }
	.tr-cbar__proof .tr-cta-proof .tr-cta-proof__stars { font-size: .8rem; }
	body.tr-cfg-bar { padding-bottom: 112px; }
}
@media (max-width: 600px) {
	/* telefono: due righe compatte — totale + pulsante; badge pagamento + stelle Feedaty */
	.tr-cbar__in { column-gap: 10px; row-gap: 5px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
	.tr-cbar__kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .6rem; }
	.tr-cbar__total { font-size: 1.2rem; }
	.tr-cbar__sub { display: inline; margin-left: 5px; font-size: .68rem; }
	.tr-cbar__paren, .tr-cbar__nx, .tr-cbar__pn { display: none; }
	.tr-cbar--empty .tr-cbar__sub { display: block; margin: 0; font-size: .86rem; }
	.woocommerce .tr-cbar .button.tr-cbar__btn, .tr-cbar .button.tr-cbar__btn { padding: 0 16px; font-size: 11.5px; min-height: 40px; }
	.tr-cbar__note { font-size: .66rem; white-space: nowrap; padding: 3px 8px 3px 7px; }
	.tr-cbar__note::before { width: 13px; height: 13px; margin-right: 6px; background-size: 8px 8px; }
	.tr-cbar__proof .tr-cta-proof { font-size: .68rem; gap: 5px; }
	body.tr-cfg-bar { padding-bottom: 96px; }
}
