/**
 * PizzaTier — Pizza Orders admin screens
 *
 * Scoped under .pzt-orders so nothing here can leak into other admin pages.
 */

.pzt-orders-header {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.pzt-orders .pzt-orders-muted {
	color: #646970;
	font-size: 12px;
}

.pzt-orders-origin {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 3px;
	background: #f0f0f1;
	color: #646970;
	font-size: 11px;
	font-weight: 400;
}

/* Status pill -------------------------------------------------------------
   The colour arrives as a --pzt-badge custom property set inline per status,
   which keeps one rule serving every status without generating a class per
   status name. */

.pzt-order-badge {
	display: inline-block;
	padding: 2px 10px;
	border: 1px solid var( --pzt-badge, #8a8f98 );
	border-radius: 999px;
	background: color-mix( in srgb, var( --pzt-badge, #8a8f98 ) 12%, transparent );
	color: var( --pzt-badge, #8a8f98 );
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	vertical-align: middle;
	white-space: nowrap;
}

/* Older browsers without color-mix() still get a readable outlined pill. */
@supports not ( background: color-mix( in srgb, red 10%, transparent ) ) {

	.pzt-order-badge {
		background: transparent;
	}
}

/* Detail layout ---------------------------------------------------------- */

.pzt-order-detail {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	margin-top: 16px;
}

.pzt-order-detail__main {
	flex: 1 1 auto;
	min-width: 0;
}

.pzt-order-detail__side {
	flex: 0 0 320px;
	max-width: 320px;
}

@media ( max-width: 960px ) {

	.pzt-order-detail {
		flex-direction: column;
	}

	.pzt-order-detail__side {
		flex: 1 1 auto;
		max-width: none;
		width: 100%;
	}
}

/* Cards ------------------------------------------------------------------ */

.pzt-order-card {
	margin-bottom: 18px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	box-shadow: 0 1px 1px rgba( 0, 0, 0, 0.04 );
}

.pzt-order-card__title {
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #646970;
}

.pzt-order-card--note {
	border-left: 4px solid #ff6b35;
}

/* Private customer notes — visually distinct so nobody mistakes them for
   anything the customer can see. */
.pzt-order-card--private {
	border-left: 4px solid #2271b1;
	background: #f6f9fc;
}

.pzt-profile-orders {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pzt-profile-orders li {
	margin-bottom: 4px;
}

.pzt-profile-orders .description {
	margin-left: 8px;
}

.column-pzt_customer_notes {
	width: 18%;
}

/* Line items ------------------------------------------------------------- */

.pzt-order-item {
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f1;
}

.pzt-order-item:last-of-type {
	border-bottom: 0;
}

.pzt-order-item__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.pzt-order-item__name {
	font-size: 15px;
	font-weight: 600;
}

.pzt-order-item__size {
	margin-left: 6px;
	color: #646970;
	font-weight: 400;
}

.pzt-order-item__qty {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.pzt-order-item__note {
	margin: 8px 0 0;
	padding: 8px 10px;
	background: #fff8f4;
	border-radius: 4px;
	font-size: 13px;
}

.pzt-order-layers {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.pzt-order-layer {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 4px 0;
	border-bottom: 1px dashed #f0f0f1;
}

.pzt-order-layer:last-child {
	border-bottom: 0;
}

.pzt-order-layer__type {
	flex: 0 0 68px;
	color: #8a8f98;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.pzt-order-layer__name {
	flex: 1 1 auto;
	min-width: 0;
}

.pzt-order-layer__coverage {
	flex: 0 0 auto;
	padding: 1px 8px;
	border-radius: 999px;
	background: #f0f0f1;
	color: #50575e;
	font-size: 11px;
}

.pzt-order-layer__price {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
}

/* Totals ----------------------------------------------------------------- */

.pzt-order-totals {
	width: 100%;
	max-width: 320px;
	margin-left: auto;
	margin-top: 14px;
	border-collapse: collapse;
}

.pzt-order-totals th,
.pzt-order-totals td {
	padding: 5px 0;
	text-align: right;
	font-weight: 400;
}

.pzt-order-totals th {
	text-align: left;
	color: #646970;
}

.pzt-order-totals td {
	font-variant-numeric: tabular-nums;
}

.pzt-order-totals__grand th,
.pzt-order-totals__grand td {
	padding-top: 9px;
	border-top: 2px solid #dcdcde;
	font-size: 15px;
	font-weight: 700;
	color: #1d2327;
}

/* Facts list ------------------------------------------------------------- */

.pzt-order-facts {
	margin: 0;
}

.pzt-order-facts dt {
	margin-top: 8px;
	color: #646970;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.pzt-order-facts dd {
	margin: 2px 0 0;
	word-break: break-word;
}

.pzt-order-facts--small dd {
	font-size: 12px;
}

/* Notes and history ------------------------------------------------------ */

.pzt-order-notes,
.pzt-order-history {
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
}

.pzt-order-note,
.pzt-order-history__item {
	padding: 9px 0;
	border-bottom: 1px solid #f0f0f1;
}

.pzt-order-note:last-child,
.pzt-order-history__item:last-child {
	border-bottom: 0;
}

.pzt-order-note__body {
	margin: 0 0 3px;
}

.pzt-order-note__meta,
.pzt-order-history__meta {
	display: block;
	margin: 0;
	color: #8a8f98;
	font-size: 12px;
}

.pzt-order-history__change {
	display: block;
}

.pzt-order-history__note {
	display: block;
	margin-top: 3px;
	color: #50575e;
	font-size: 13px;
	font-style: italic;
}

/* Forms ------------------------------------------------------------------ */

.pzt-order-form textarea {
	margin-top: 8px;
}

.pzt-orders-check {
	display: inline-block;
	margin-bottom: 4px;
}

/* List table ------------------------------------------------------------- */

.pzt-orders .column-number {
	width: 14%;
}

.pzt-orders .column-status,
.pzt-orders .column-total {
	width: 11%;
}

.pzt-orders .column-date {
	width: 12%;
}
