/* Skin checkout Libermoto (prima passata, da rifinire dal vivo).
 * Colori del tema: verde #43d941, blu #243676. Tipografia ereditata (Poppins).
 * Tutto scoped a .woocommerce-checkout per non toccare il resto del sito. */

/* Checkout/carrello "puliti": via TUTTO l'header del tema (logo tagliato, ricerca, Contattaci). */
body.woocommerce-checkout .site-header,
body.woocommerce-cart .site-header { display: none !important; }

/* Via il widget flottante "Contattaci" (Chaty): si sovrappone al riepilogo */
body.woocommerce-checkout div[id*="chaty"],
body.woocommerce-checkout div[class*="chaty"],
body.woocommerce-cart div[id*="chaty"],
body.woocommerce-cart div[class*="chaty"] { display: none !important; }

/* Pagina di pagamento: fascia blu scuro di 200px in cima al contenuto, con il logo.
   L'URL è relativo alla radice: lo stesso file esiste sia sulla copia sia sul sito vero. */
body.woocommerce-checkout #content { position: relative; }
body.woocommerce-checkout #content::before {
	content: "";
	display: block;
	height: 120px;
	background: #243676 url('/wp-content/uploads/2025/06/logo.svg') no-repeat;
	background-position: clamp(16px, 4vw, 60px) center;
	background-size: auto 64px;
	margin: 0 calc(-1 * clamp(16px, 4vw, 60px)) 24px;
}

/* Titolo sopra il modulo di pagamento */
body.woocommerce-checkout .lmb-pay-title {
	max-width: 860px; margin: 0 auto 16px; color: #243676; font-weight: 800; font-size: 1.7em; line-height: 1.2;
}

/* Via il box newsletter in fondo */
body.woocommerce-checkout .newsletter,
body.woocommerce-cart .newsletter { display: none !important; }

/* Bordino laterale: il contenuto non tocca più i bordi */
body.woocommerce-checkout #content,
body.woocommerce-cart #content {
	padding-left: clamp(16px, 4vw, 60px);
	padding-right: clamp(16px, 4vw, 60px);
	box-sizing: border-box;
}
/* Evita che i blocchi "alignwide" sfondino il padding laterale */
body.woocommerce-checkout .entry-content .alignwide,
body.woocommerce-cart .entry-content .alignwide { margin-left: 0; margin-right: 0; max-width: 100%; }

/* ---- Larghezza contenuta e centrata (non più a tutta pagina) ---- */
body.woocommerce-checkout .entry-content,
body.woocommerce-cart .entry-content { max-width: 860px; margin-left: auto; margin-right: auto; }

/* ---- Riepilogo ordine come RIQUADRO (non tabella): titolo in alto, elenco dettagli,
       Totale in basso. La tabella Woo è convertita in blocchi impilati -> ok anche da mobile. ---- */
body.woocommerce-checkout .shop_table,
body.woocommerce-checkout .shop_table thead,
body.woocommerce-checkout .shop_table tbody,
body.woocommerce-checkout .shop_table tfoot,
body.woocommerce-checkout .shop_table tr,
body.woocommerce-checkout .shop_table th,
body.woocommerce-checkout .shop_table td {
	display: block; width: auto; border: 0; padding: 0; text-align: left; white-space: normal;
}
body.woocommerce-checkout .shop_table {
	font: inherit; font-size: 1.12em;
	background: #e9f0fb; /* azzurrino */
	border: 1px solid #d3ddf0; border-radius: 16px; overflow: hidden;
}
/* Via colonna Qta e Prezzo; titolo del riquadro "Riepilogo del tour" */
body.woocommerce-checkout .shop_table .product-quantity,
body.woocommerce-checkout .shop_table thead .product-total,
body.woocommerce-checkout .shop_table tbody .product-total,
body.woocommerce-checkout .shop_table tbody tr td:last-child { display: none !important; }
body.woocommerce-checkout .shop_table thead .product-name { font-size: 0; }
body.woocommerce-checkout .shop_table thead .product-name::before {
	content: "Riepilogo del tour"; display: block;
	background: #243676; color: #fff; font-size: 1.4rem; font-weight: 700; padding: 30px 22px;
}
/* Nome tour + elenco dettagli (etichetta in grassetto, valore normale) */
body.woocommerce-checkout .shop_table tbody .product-name { padding: 18px 22px 6px; font-weight: 400 !important; font-size: 1.28rem; }
body.woocommerce-checkout .wc-item-meta { margin: 8px 0 0; padding: 0 22px 16px; list-style: none !important; font-weight: 400; }
body.woocommerce-checkout .wc-item-meta li { padding: 11px 0; border-bottom: 1px solid #d3ddf0; list-style: none !important; line-height: 1.4; }
body.woocommerce-checkout .wc-item-meta li:first-child { border-top: 1px solid #d3ddf0; } /* separa dal nome del tour */
/* Etichetta E valore (dopo i ":") stessa dimensione */
body.woocommerce-checkout .wc-item-meta li,
body.woocommerce-checkout .wc-item-meta li strong,
body.woocommerce-checkout .wc-item-meta li p,
body.woocommerce-checkout .wc-item-meta li a { font-size: 1.15rem !important; }
/* Email: testo normale (non cliccabile, niente colore/sottolineatura da link) e intera a capo */
body.woocommerce-checkout .wc-item-meta a {
	white-space: nowrap; color: inherit; text-decoration: none; pointer-events: none; cursor: text;
}
body.woocommerce-checkout .wc-item-meta li::marker { content: none !important; }
body.woocommerce-checkout .wc-item-meta li::before { content: none !important; display: none !important; }
body.woocommerce-checkout .wc-item-meta li:last-child { border-bottom: 0; }
body.woocommerce-checkout .wc-item-meta strong { font-weight: 700; margin-right: 6px; }
body.woocommerce-checkout .wc-item-meta p { display: inline; margin: 0; }
/* Piede: SOLO l'ultima riga (il Totale), grigia e rinominata; le altre (Subtotale) nascoste */
body.woocommerce-checkout .shop_table tfoot tr { display: none; }
body.woocommerce-checkout .shop_table tfoot tr:last-child {
	display: block; background: #f5f6f5; padding: 18px 22px;
	font-weight: 400; color: #243676; border: 0 !important;
}
body.woocommerce-checkout .shop_table tfoot tr:last-child th,
body.woocommerce-checkout .shop_table tfoot tr:last-child td {
	display: inline; padding: 0; margin: 0; background: none; border: 0 !important; font-size: 1.4rem;
}
body.woocommerce-checkout .shop_table tfoot tr:last-child td { margin-left: 6px; font-weight: 800; } /* importo dopo il testo, in grassetto */
/* Rinomina "Totale:" -> "Totale da pagare ora:" (grande come il titolo, NON in grassetto) */
body.woocommerce-checkout .shop_table tfoot tr:last-child th { font-size: 0; }
body.woocommerce-checkout .shop_table tfoot tr:last-child th::before {
	content: "Totale da pagare ora:"; font-size: 1.4rem; font-weight: 400;
}

/* ---- Blocco metodi di pagamento ---- */
body.woocommerce-checkout #payment { background: #f5f6f5; border-radius: 16px; padding: 20px; margin-top: 0; }
/* Stacca meglio il riquadro ordine dai metodi di pagamento */
body.woocommerce-checkout .shop_table { margin-bottom: 40px; } /* spazio legato alla tabella, prima dei metodi */
body.woocommerce-checkout #payment,
body.woocommerce-checkout #payment label,
body.woocommerce-checkout #payment p { font-family: inherit; }
body.woocommerce-checkout ul.wc_payment_methods { list-style: none !important; margin: 0 0 16px; padding: 0; }
body.woocommerce-checkout ul.wc_payment_methods li {
	list-style: none !important; margin: 0 0 10px; padding: 14px 16px;
	background: #fff; border: 1.5px solid #e3e5e3; border-radius: 12px;
}
body.woocommerce-checkout ul.wc_payment_methods li::before,
body.woocommerce-checkout ul.wc_payment_methods li::marker { content: none !important; }
body.woocommerce-checkout ul.wc_payment_methods li > label {
	display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; cursor: pointer;
}
body.woocommerce-checkout ul.wc_payment_methods li input[type="radio"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
body.woocommerce-checkout ul.wc_payment_methods li:has(input:checked) { border-color: #43d941; background: rgba(67,217,65,.06); }
body.woocommerce-checkout .payment_box { background: #fff; border-radius: 10px; margin-top: 10px; color: #444; }
body.woocommerce-checkout .payment_box::before { display: none; } /* via la freccetta squadrata del tema */

.lmb-checkout__head { max-width: 1100px; margin: 0 auto 18px; }
.lmb-checkout__title { color: #243676; font-weight: 800; font-size: 1.9em; line-height: 1.15; margin: 0 0 4px; }
.lmb-checkout__note { color: #777; margin: 0; }

/* Campi */
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .select2-container .select2-selection {
	border: 2px solid #e3e5e3;
	border-radius: 12px;
	padding: 12px 14px;
	font: inherit;
	min-height: 0;
}
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea:focus {
	outline: none;
	border-color: #43d941;
}
.woocommerce-checkout label { font-weight: 600; }

/* Riepilogo ordine */
.woocommerce-checkout .woocommerce-checkout-review-order {
	background: #f5f6f5;
	border-radius: 16px;
	padding: 20px;
}
.woocommerce-checkout .cart-subtotal,
.woocommerce-checkout .order-total { font-weight: 700; }

/* Pulsante "Effettua ordine" con lo stile del tema (verde a pillola) */
.woocommerce-checkout #place_order {
	background: #43d941;
	color: #111;
	border: 0;
	border-radius: 999px;
	padding: 14px 30px;
	margin-top: 18px; /* spazio dal testo privacy (anche in landscape) */
	font-weight: 700;
	font-size: 1.05em;
	cursor: pointer;
	transition: background .15s;
}
.woocommerce-checkout #place_order:hover { background: #6de16c; }

/* ================= Pagina "ordine ricevuto" (conferma) =================
   Scoped a body.woocommerce-order-received: NON tocca la pagina di pagamento. */

/* 0) "Grazie. Il tuo ordine è stato ricevuto." grande come i titoli di sezione ("Dettagli ordine"). */
body.woocommerce-order-received .woocommerce-thankyou-order-received {
	font-size: 1.9em;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 18px;
}

/* 1) Riepilogo iniziale (Numero ordine/Data/Email/Totale/Metodo): via i puntini,
      font e dimensioni uniformati al riquadro dettagli sotto. */
body.woocommerce-order-received ul.woocommerce-order-overview {
	list-style: none !important;
	margin: 0 0 28px;
	padding: 0;
	border: 0;
}
body.woocommerce-order-received ul.woocommerce-order-overview li {
	list-style: none !important;
	float: none;
	width: auto;
	border: 0;
	border-bottom: 1px solid #e3e5e3;
	padding: 11px 0;
	margin: 0;
	font-size: 1.15rem !important;
	text-transform: none;
	line-height: 1.4;
	color: inherit;
}
body.woocommerce-order-received ul.woocommerce-order-overview li:last-child { border-bottom: 0; }
body.woocommerce-order-received ul.woocommerce-order-overview li strong {
	font-size: 1.15rem !important;
	text-transform: none;
	font-weight: 700;
	display: inline;
	margin-left: 6px;
}
body.woocommerce-order-received ul.woocommerce-order-overview li::marker,
body.woocommerce-order-received ul.woocommerce-order-overview li::before {
	content: none !important;
	display: none !important;
}

/* 2) Via l'ultima riga (grigia: "Totale da pagare ora: Carta di credito o debito"):
      fuorviante sulla conferma. Totale e metodo di pagamento sono già nel riepilogo iniziale. */
body.woocommerce-order-received .shop_table tfoot { display: none !important; }

/* 3) Indirizzo di fatturazione: in linea con gli altri elementi (piena larghezza + stesso riquadro/typo). */
body.woocommerce-order-received .woocommerce-customer-details { max-width: 100%; margin-top: 4px; }
body.woocommerce-order-received .woocommerce-customer-details .col2-set,
body.woocommerce-order-received .woocommerce-customer-details .woocommerce-columns { width: 100%; }
body.woocommerce-order-received .woocommerce-customer-details .col-1,
body.woocommerce-order-received .woocommerce-customer-details .col-2,
body.woocommerce-order-received .woocommerce-customer-details .woocommerce-column {
	width: 100%; float: none; max-width: 100%; padding: 0;
}
body.woocommerce-order-received .woocommerce-customer-details > h2,
body.woocommerce-order-received .woocommerce-customer-details .woocommerce-column__title {
	color: #243676; font-size: 1.4rem; font-weight: 700; margin: 0 0 12px;
}
body.woocommerce-order-received .woocommerce-customer-details address {
	border: 1px solid #d3ddf0;
	border-radius: 16px;
	padding: 18px 22px;
	font-size: 1.15rem;
	line-height: 1.7;
	font-style: normal;
	background: #fff;
	width: 100%;
	box-sizing: border-box;
}

/* 4) Note della conferma: ricontatto 24h (riquadro verde) + dati fatturazione modificabili (nota grigia). */
/* Conferma ordine: riga del ricontatto, testo normale senza riquadro. */
.lmb-thankyou-quando {
	max-width: 860px; margin: 0 auto 18px;
	font-size: 1.08rem; line-height: 1.5; color: #333;
}
/* Conferma ordine: avvertenza sul contratto. Arancione, non rosso: deve fermare
   l'occhio senza sembrare un errore o un pagamento rifiutato. */
.lmb-thankyou-avviso {
	max-width: 860px; margin: 0 auto 28px;
	background: #fff6e8;
	border: 1px solid #f0c07a;
	border-left: 5px solid #e8942e;
	border-radius: 14px;
	padding: 16px 22px;
	box-sizing: border-box;
}
.lmb-thankyou-avviso p { margin: 0; font-size: 1.05rem; line-height: 1.5; color: #6b4310; }
.lmb-billing-note { margin: 12px 0 0; font-size: 1.02rem; color: #777; font-style: italic; }

/* ---- Mobile: più larghezza nella parte pagamenti (via il box esterno = un solo bordo) ---- */
@media ( max-width: 600px ) {
	body.woocommerce-checkout #payment { padding: 0; background: transparent; }
	body.woocommerce-checkout ul.wc_payment_methods li { padding: 12px 12px; }
	body.woocommerce-checkout .payment_box { padding: 8px 6px; }
	/* Pulsante pagamento: largo, testo centrato, con spazio sopra (dalla privacy) */
	body.woocommerce-checkout #place_order { margin-top: 20px; }
	body.woocommerce-checkout .woocommerce-privacy-policy-text { margin-bottom: 6px; }
}
