/* Thank-you page ("prenotazione ricevuta") + My Account order views.
   Colors and typography come from the Elementor kit globals, as apartment.css. */

.woocommerce-order,
.woocommerce-MyAccount-content {
	font-family: var(--e-global-typography-text-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-text-font-weight, 400);
	color: var(--e-global-color-text, #2C2C2C);
}

/* ---- "Prenotazione ricevuta" message with a green check badge ---- */

.woocommerce-order .woocommerce-thankyou-order-received {
	margin: 8px 0 32px;
	text-align: center;
	font-family: var(--e-global-typography-accent-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-accent-font-weight, 700);
	font-size: 1.6em;
	line-height: 1.35;
}

.woocommerce-order .woocommerce-thankyou-order-received::before {
	content: "";
	display: block;
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--e-global-color-85d5d2d, #227C26)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
		no-repeat center / 30px auto;
}

/* ---- Overview bar: booking number, date, total, payment method ---- */

.woocommerce-order ul.order_details.woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 40px;
	padding: 20px 8px;
	list-style: none;
	background: var(--e-global-color-secondary, #F5F1E4);
	border-radius: 6px;
}

.woocommerce-order ul.order_details.woocommerce-order-overview li {
	flex: 1 1 auto;
	float: none;
	margin: 6px 0;
	padding: 0 24px;
	border-right: 1px solid var(--e-global-color-e2ebdd4, #D3D3D3);
	font-size: .8em;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--e-global-color-0ae28a6, #6F6F6F);
}

.woocommerce-order ul.order_details.woocommerce-order-overview li:last-child {
	border-right: 0;
}

.woocommerce-order ul.order_details.woocommerce-order-overview li strong {
	display: block;
	margin-top: 4px;
	font-family: var(--e-global-typography-accent-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-accent-font-weight, 700);
	font-size: 1.4em;
	letter-spacing: 0;
	text-transform: none;
	overflow-wrap: anywhere;
	color: var(--e-global-color-text, #2C2C2C);
}

.woocommerce-order ul.order_details.woocommerce-order-overview li.order strong {
	color: var(--e-global-color-primary, #D9000D);
}

/* ---- Section headings with the brand red bar (as .title-line-badge) ---- */

.woocommerce-order h2,
.woocommerce-MyAccount-content h2 {
	position: relative;
	margin: 40px 0 20px;
	padding-bottom: 14px;
	font-family: var(--e-global-typography-accent-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-accent-font-weight, 700);
	font-size: 1.4em;
}

.woocommerce-order h2::after,
.woocommerce-MyAccount-content h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 48px;
	height: 5px;
	background: var(--e-global-color-primary, #D9000D);
}

/* ---- Booking details / booking history tables ---- */

.woocommerce-order table.shop_table,
.woocommerce-MyAccount-content table.shop_table {
	width: 100%;
	margin-bottom: 40px;
	border: 1px solid var(--e-global-color-e2ebdd4, #D3D3D3);
	border-radius: 6px;
	border-collapse: separate;
	border-spacing: 0;
}

.woocommerce-order table.shop_table th,
.woocommerce-order table.shop_table td,
.woocommerce-MyAccount-content table.shop_table th,
.woocommerce-MyAccount-content table.shop_table td {
	padding: 14px 18px;
	border: 0;
	border-bottom: 1px solid #E9E9E9;
	text-align: left;
	vertical-align: top;
}

.woocommerce-order table.shop_table thead th,
.woocommerce-MyAccount-content table.shop_table thead th {
	background: var(--e-global-color-secondary, #F5F1E4);
	border-bottom: 1px solid var(--e-global-color-e2ebdd4, #D3D3D3);
	font-family: var(--e-global-typography-accent-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-accent-font-weight, 700);
	font-size: .8em;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.woocommerce-order table.shop_table thead th:first-child,
.woocommerce-MyAccount-content table.shop_table thead th:first-child {
	border-top-left-radius: 6px;
}

.woocommerce-order table.shop_table thead th:last-child,
.woocommerce-MyAccount-content table.shop_table thead th:last-child {
	border-top-right-radius: 6px;
}

.woocommerce-order table.shop_table td.woocommerce-table__product-name a,
.woocommerce-MyAccount-content table.shop_table td.woocommerce-table__product-name a {
	font-family: var(--e-global-typography-accent-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-accent-font-weight, 700);
	color: var(--e-global-color-text, #2C2C2C);
	text-decoration: none;
}

/* Booking meta under the apartment name (Settimana, Persone, Ski pass...). */
.woocommerce-order .wc-item-meta,
.woocommerce-MyAccount-content .wc-item-meta {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: .85em;
	color: var(--e-global-color-0ae28a6, #6F6F6F);
}

.woocommerce-order .wc-item-meta li,
.woocommerce-MyAccount-content .wc-item-meta li {
	display: flex;
	gap: 5px;
	margin: 3px 0;
}

.woocommerce-order .wc-item-meta li p,
.woocommerce-MyAccount-content .wc-item-meta li p {
	display: inline;
	margin: 0;
}

/* Totals: bold rows, final total in brand red. */
.woocommerce-order table.shop_table tfoot th,
.woocommerce-order table.shop_table tfoot td,
.woocommerce-MyAccount-content table.shop_table tfoot th,
.woocommerce-MyAccount-content table.shop_table tfoot td {
	font-family: var(--e-global-typography-accent-font-family, "Open Sans"), sans-serif;
	font-weight: var(--e-global-typography-accent-font-weight, 700);
}

.woocommerce-order table.shop_table tfoot tr:last-child th,
.woocommerce-order table.shop_table tfoot tr:last-child td,
.woocommerce-MyAccount-content table.shop_table tfoot tr:last-child th,
.woocommerce-MyAccount-content table.shop_table tfoot tr:last-child td {
	border-bottom: 0;
	font-size: 1.1em;
}

.woocommerce-order table.shop_table tfoot tr:last-child td,
.woocommerce-MyAccount-content table.shop_table tfoot tr:last-child td {
	color: var(--e-global-color-primary, #D9000D);
}

/* ---- My Account: history actions, status, "Prenota di nuovo" ---- */

.woocommerce-MyAccount-content table.shop_table .button,
.woocommerce-MyAccount-content .order-again .button {
	margin: 0 6px 6px 0;
	padding: 8px 20px;
	background: var(--e-global-color-85d5d2d, #227C26);
	color: #FFFFFF;
	border-radius: 6px;
}

.woocommerce-MyAccount-content table.shop_table .button:hover,
.woocommerce-MyAccount-content .order-again .button:hover {
	background: var(--e-global-color-85d5d2d, #227C26);
	background: color-mix(in srgb, var(--e-global-color-85d5d2d, #227C26) 85%, #000);
	color: #FFFFFF;
}

/* "attualmente In lavorazione": no yellow highlighter on <mark>. */
.woocommerce-MyAccount-content mark {
	background: transparent;
	color: var(--e-global-color-primary, #D9000D);
	font-weight: var(--e-global-typography-accent-font-weight, 700);
}

/* ---- Customer / address card ---- */

.woocommerce-order .woocommerce-customer-details,
.woocommerce-MyAccount-content .woocommerce-customer-details {
	margin-bottom: 40px;
}

.woocommerce-order .woocommerce-customer-details address,
.woocommerce-MyAccount-content .woocommerce-customer-details address {
	padding: 20px 24px;
	background: var(--e-global-color-secondary, #F5F1E4);
	border: 0;
	border-radius: 6px;
	font-style: normal;
	line-height: 1.8;
}

/* ---- Booking updates (order notes) in the account area ---- */

.woocommerce-MyAccount-content ol.woocommerce-OrderUpdates {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-MyAccount-content .woocommerce-OrderUpdate {
	margin: 0 0 16px;
	padding: 16px 20px;
	background: var(--e-global-color-secondary, #F5F1E4);
	border-radius: 6px;
}

.woocommerce-MyAccount-content .woocommerce-OrderUpdate-meta {
	margin: 0 0 6px;
	font-size: .8em;
	color: var(--e-global-color-0ae28a6, #6F6F6F);
}

.woocommerce-MyAccount-content .woocommerce-OrderUpdate-description p {
	margin: 0;
}

/* ---- Mobile ---- */

@media (max-width: 767px) {
	.woocommerce-order ul.order_details.woocommerce-order-overview {
		display: block;
		padding: 8px 20px;
	}

	.woocommerce-order ul.order_details.woocommerce-order-overview li {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: 12px;
		margin: 0;
		padding: 12px 0;
		border-right: 0;
		border-bottom: 1px solid var(--e-global-color-e2ebdd4, #D3D3D3);
	}

	.woocommerce-order ul.order_details.woocommerce-order-overview li:last-child {
		border-bottom: 0;
	}

	.woocommerce-order ul.order_details.woocommerce-order-overview li strong {
		margin-top: 0;
	}

	.woocommerce-order table.shop_table th,
	.woocommerce-order table.shop_table td,
	.woocommerce-MyAccount-content table.shop_table th,
	.woocommerce-MyAccount-content table.shop_table td {
		padding: 10px 12px;
	}
}
