/* ===== Master-detail split ===== */
.active-orders-body {
	display: flex;
	height: 100%;
	min-height: 0;
	flex-grow: 1;
}
/* Wide (landscape tablet / desktop): list beside detail. */
@media (min-width: 900px) {
	.active-orders-body { flex-direction: row; }
	.active-orders-body .active-orders-list { flex: 0 0 34%; max-width: 34%; border-right: 1px solid var(--lumo-contrast-10pct); }
	.active-orders-body .active-orders-detail { flex: 1 1 auto; }
}
/* Narrow / portrait: list on top, detail below. */
@media (max-width: 899px) {
	.active-orders-body { flex-direction: column; }
	/* A definite basis, not auto. The grid inside is setSizeFull, so it is
	   height:100% of this pane; with flex-basis auto the pane sizes to its
	   content and the two resolve each other to zero, which hides the order
	   list entirely on a phone. A max-height cannot fix that - a maximum never
	   grants height. In the row layout above this doesn't arise, because the
	   pane is stretched to the container's full height. */
	.active-orders-body .active-orders-list { flex: 0 0 38%; border-bottom: 1px solid var(--lumo-contrast-10pct); }
	.active-orders-body .active-orders-detail { flex: 1 1 auto; }
}
.active-orders-list {
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.active-orders-list .order-grid { flex: 1 1 auto; min-height: 0; }
.active-orders-detail {
	min-height: 0;
	overflow-y: auto;
	padding: 6px;
}
.active-orders-detail-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--lumo-secondary-text-color);
	font-style: italic;
}

/* ===== OrderDetailComponent styling, re-scoped from order-management.css ===== */
.active-orders-detail .button-wrapper:not(:last-child) { padding-right: 5px; }
.active-orders-detail .controls-wrapper { display: flex; flex-wrap: wrap; flex-shrink: 1; gap: 5px; }
.active-orders-detail .order-detail { display: flex; flex-direction: column; }
.active-orders-detail .order-detail .controls { display: flex; flex-wrap: wrap; justify-content: space-between; }
.active-orders-detail .order-detail .section-label { font-weight: 600; font-variant: small-caps; font-style: italic; }
.active-orders-detail .item-grid { display: inline-grid; grid-template-columns: 1fr auto auto auto auto auto auto; grid-auto-flow: row; height: fit-content; padding-left: 20px; }
.active-orders-detail .item-grid > * { display: flex; flex-direction: column; justify-content: center; padding-left: 5px; padding-right: 5px; }
.active-orders-detail .item-grid .actions { flex-direction: row; flex-wrap: wrap; }
.active-orders-detail .item-grid .grid-header { font-weight: 600; }
.active-orders-detail .item-grid .align-right { text-align: right; }
.active-orders-detail .discount-grid { display: inline-grid; grid-template-columns: 1fr auto auto auto auto; grid-auto-flow: row; height: fit-content; padding-left: 20px; }
.active-orders-detail .discount-grid > * { display: flex; flex-direction: column; justify-content: center; padding-left: 5px; padding-right: 5px; }
.active-orders-detail .discount-grid .grid-header { font-weight: 600; }
.active-orders-detail .discount-grid .align-right { text-align: right; }
.active-orders-detail .payment-grid { display: inline-grid; grid-template-columns: auto auto auto auto; grid-auto-flow: row; height: fit-content; padding-left: 20px; }
.active-orders-detail .payment-grid > * { display: flex; flex-direction: column; justify-content: center; padding-left: 5px; padding-right: 5px; }
.active-orders-detail .payment-grid .grid-header { font-weight: 600; }
.active-orders-detail .payment-grid .align-right { text-align: right; }
.active-orders-detail .totals { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.active-orders-detail .totals .label { font-weight: 600; text-align: right; padding-right: 5px; }
.active-orders-detail .totals .amount { font-weight: 600; text-align: right; padding-right: 10px; }
.active-orders-detail .totals .growler { width: 80px; text-align: center; padding-right: 10px; color: red; animation-duration: 400ms; animation-name: blink; animation-iteration-count: infinite; animation-direction: alternate; }
@keyframes blink { from { opacity: 1; font-weight: 1000; } to { opacity: 0.4; font-weight: 200; } }
.active-orders-detail .sales-summary-wrapper { display: flex; gap: 4px; }
