/** Transport cart presentation only. All metadata and form inputs stay intact. */

.ret-transport-cart-marker[hidden] {
	display: none !important;
}

/* Hide the native Woo quantity, not the booking's Number of vehicles answer.
   In a mixed cart, merchandise retains its editable quantity column. */
table.ret-cart-table--transport-only > thead > tr > .product-quantity,
table.ret-cart-table--transport-only > tbody > tr > .product-quantity,
table.ret-cart-table--transport-only > colgroup > .product-quantity {
	display: none !important;
}

table.ret-cart-table:not(.ret-cart-table--transport-only) > tbody > .ret-transport-cart-item > .product-quantity {
	visibility: hidden !important;
}

/* The original row contains only the title, image, prices and remove link.
   A separate row below holds BOTH the toggle and expandable panel. */
table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > td {
	vertical-align: middle !important;
	border-bottom: 0 !important;
	padding-top: .75rem;
	padding-bottom: .5rem;
}

table.ret-cart-table > tbody > tr.ret-cart-details-row,
table.ret-cart-table > tbody > tr.ret-cart-details-row > td.ret-cart-details-cell {
	background: transparent !important;
}

table.ret-cart-table > tbody > tr.ret-cart-details-row > td.ret-cart-details-cell {
	padding: 0 !important;
	border-top: 0 !important;
	border-bottom: 1px solid #e6e6e6;
	text-align: start !important;
}

table.ret-cart-table .ret-cart-details-cell::before,
table.ret-cart-table .ret-cart-details-cell::after,
table.ret-cart-table td.actions::before {
	content: none !important;
	display: none !important;
}

.ret-cart-details-offset {
	box-sizing: border-box;
	min-width: 0;
	padding-block: 0 1rem;
	padding-inline: var(--ret-cart-details-offset, 0px) .75rem;
}

.ret-cart-details {
	display: block;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	text-align: start;
}

table.ret-cart-table .ret-cart-details > summary.ret-cart-details__toggle {
	box-sizing: border-box;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	margin: 0 !important;
	padding: .5rem 1rem !important;
	border: 0 !important;
	border-radius: 0;
	background: #fafafa !important;
	color: #111 !important;
	box-shadow: none !important;
	font-family: inherit;
	font-size: .9rem;
	font-weight: 500;
	font-style: normal;
	line-height: 1.5;
	letter-spacing: normal;
	text-decoration: none !important;
	text-transform: none;
	list-style: none;
	cursor: pointer;
	user-select: none;
}

table.ret-cart-table .ret-cart-details__toggle::-webkit-details-marker {
	display: none;
}

table.ret-cart-table .ret-cart-details__toggle::marker {
	content: '';
}

table.ret-cart-table .ret-cart-details__toggle::before,
table.ret-cart-table .ret-cart-details__toggle::after {
	content: none !important;
	display: none !important;
}

table.ret-cart-table .ret-cart-details__toggle:focus-visible {
	outline: 2px solid #333;
	outline-offset: 3px;
}

.ret-cart-details__icon {
	display: inline-block;
	width: .9em;
	font-size: 1.1em;
	font-weight: 600;
	text-align: center;
}

table.ret-cart-table .ret-cart-details__panel {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
	margin: .5rem 0 0;
	padding: 0;
	border: 0;
	background: #cacaca;
	color: #111;
	font-size: .9rem;
	line-height: 1.55;
	text-align: start;
	white-space: normal;
	overflow: hidden;
	overflow-wrap: anywhere;
	/* Long answers must not renegotiate the table's column widths on opening. */
	contain: inline-size;
}

table.ret-cart-table .ret-cart-details:not([open]) > .ret-cart-details__panel {
	display: none;
}

table.ret-cart-table .ret-cart-details__panel .ret-cart-details__list {
	display: block !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	font-family: inherit;
	font-size: .9rem !important;
	line-height: 1.55 !important;
	list-style: none;
}

table.ret-cart-table .ret-cart-details__panel .ret-cart-details__line {
	box-sizing: border-box;
	display: block !important;
	float: none !important;
	clear: both;
	margin: 0 !important;
	padding: .5rem !important;
	border: 0;
	border-bottom: 1px dotted #e6e6e6;
	font-size: .9rem !important;
	line-height: 1.55 !important;
	white-space: normal !important;
	overflow-wrap: anywhere;
	list-style: none;
}

table.ret-cart-table .ret-cart-details__list:last-child > .ret-cart-details__line:last-child {
	border-bottom: 0;
}

table.ret-cart-table .ret-cart-details__line dt,
table.ret-cart-table .ret-cart-details__line dd {
	display: inline !important;
	float: none !important;
	clear: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	color: inherit;
	font-size: inherit !important;
	line-height: inherit !important;
	white-space: normal !important;
}

table.ret-cart-table .ret-cart-details__line dt {
	margin-inline-end: .35em !important;
	font-weight: 400;
}

table.ret-cart-table .ret-cart-details__line dd {
	font-weight: 600;
}

table.ret-cart-table .ret-cart-details__line p {
	display: inline;
	margin: 0 !important;
	padding: 0 !important;
	font-size: inherit !important;
	line-height: inherit !important;
}

table.ret-cart-table .ret-cart-details__line p + p::before {
	content: ' ';
}

/* Neutralize classic responsive "Product:" / "Subtotal:" labels on booking
   headers, keeping the photo, title and price in a single aligned strip. */
@media (max-width: 768px) {
	table.ret-cart-table,
	table.ret-cart-table > tbody {
		display: block !important;
		width: 100% !important;
	}

	table.ret-cart-table > thead {
		display: none !important;
	}

	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced {
		display: grid !important;
		grid-template-columns: 3.5rem minmax(0, 1fr) max-content 1.25rem;
		align-items: center;
		gap: .5rem;
		padding: .75rem 0 .5rem;
	}

	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > td {
		display: block !important;
		width: auto !important;
		min-width: 0;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		background: transparent !important;
		text-align: start !important;
	}

	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > td::before,
	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > td::after {
		content: none !important;
		display: none !important;
	}

	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > .product-thumbnail {
		grid-area: 1 / 1;
	}

	table.ret-cart-table .ret-cart-item--enhanced > .product-thumbnail img {
		display: block;
		width: auto;
		max-width: 3.5rem;
		max-height: 3.5rem;
		margin: 0;
	}

	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > .product-name {
		grid-area: 1 / 2;
		overflow-wrap: anywhere;
	}

	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > .product-price,
	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > .product-subtotal {
		grid-area: 1 / 3;
		text-align: end !important;
		white-space: nowrap;
	}

	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > .product-remove {
		grid-area: 1 / 4;
		text-align: end !important;
	}

	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > .product-remove a {
		position: static !important;
	}

	table.ret-cart-table > tbody > tr.ret-cart-item--enhanced > .product-quantity,
	table.ret-cart-table > tbody > tr.ret-cart-item--has-subtotal > .product-price {
		display: none !important;
	}

	table.ret-cart-table > tbody > tr.ret-cart-details-row,
	table.ret-cart-table > tbody > tr.ret-cart-details-row > td.ret-cart-details-cell {
		display: block !important;
		width: 100% !important;
	}

	table.ret-cart-table .ret-cart-details-offset {
		padding-inline: 0 !important;
	}

	table.ret-cart-table td.actions {
		display: block !important;
		width: 100% !important;
	}
}
