/* @reviewed 2026-05-12 Eli & Claude */
.tc-sup-product-lower-price-no-vat .tc-table-column[data-field="product::price_list_price_no_vat"] .tc-table-cell::after,
.tc-sup-product-lower-price-no-vat .tc-table-column[data-field="price_list_price_no_vat"] .tc-table-cell::after,
.tc-sup-product-lower-price .tc-table-column[data-field="product::price_list_price_with_vat"] .tc-table-cell::after,
.tc-sup-product-lower-price .tc-table-column[data-field="price_list_price_with_vat"] .tc-table-cell::after
{ font-family: FontAwesome; font-weight: normal; content: "\f111"; color: #c0392b; margin-inline-start: 5px; font-size: 8px; }

.tc-sup-product-lower-price-no-vat .tc-table-column[data-field="product::price_list_price_no_vat"] .tc-control,
.tc-sup-product-lower-price-no-vat .tc-table-column[data-field="price_list_price_no_vat"] .tc-control,
.tc-sup-product-lower-price .tc-table-column[data-field="product::price_list_price_with_vat"] .tc-control,
.tc-sup-product-lower-price .tc-table-column[data-field="price_list_price_with_vat"] .tc-control
{ position: relative; }

.tc-sup-product-lower-price-no-vat .tc-table-column[data-field="product::price_list_price_no_vat"] .tc-control::after,
.tc-sup-product-lower-price-no-vat .tc-table-column[data-field="price_list_price_no_vat"] .tc-control::after,
.tc-sup-product-lower-price .tc-table-column[data-field="product::price_list_price_with_vat"] .tc-control::after,
.tc-sup-product-lower-price .tc-table-column[data-field="price_list_price_with_vat"] .tc-control::after
{ position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-family: FontAwesome; font-weight: normal; content: "\f111"; color: #c0392b; pointer-events: none; font-size: 8px; }

.tc-sup-product-higher-price-no-vat .tc-table-column[data-field="product::price_list_price_no_vat"] .tc-table-cell::after,
.tc-sup-product-higher-price-no-vat .tc-table-column[data-field="price_list_price_no_vat"] .tc-table-cell::after,
.tc-sup-product-higher-price .tc-table-column[data-field="product::price_list_price_with_vat"] .tc-table-cell::after,
.tc-sup-product-higher-price .tc-table-column[data-field="price_list_price_with_vat"] .tc-table-cell::after
{ font-family: FontAwesome; font-weight: normal; content: "\f111"; color: #27ae60; margin-inline-start: 5px; font-size: 8px; }

.tc-sup-product-higher-price-no-vat .tc-table-column[data-field="product::price_list_price_no_vat"] .tc-control,
.tc-sup-product-higher-price-no-vat .tc-table-column[data-field="price_list_price_no_vat"] .tc-control,
.tc-sup-product-higher-price .tc-table-column[data-field="product::price_list_price_with_vat"] .tc-control,
.tc-sup-product-higher-price .tc-table-column[data-field="price_list_price_with_vat"] .tc-control
{ position: relative; }

.tc-sup-product-higher-price-no-vat .tc-table-column[data-field="product::price_list_price_no_vat"] .tc-control::after,
.tc-sup-product-higher-price-no-vat .tc-table-column[data-field="price_list_price_no_vat"] .tc-control::after,
.tc-sup-product-higher-price .tc-table-column[data-field="product::price_list_price_with_vat"] .tc-control::after,
.tc-sup-product-higher-price .tc-table-column[data-field="price_list_price_with_vat"] .tc-control::after
{ position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-family: FontAwesome; font-weight: normal; content: "\f111"; color: #27ae60; pointer-events: none; font-size: 8px; }

.tc-sup-product-lower-supplier-price .tc-table-column[data-field="sup_price"] .tc-table-cell::after
{ font-family: FontAwesome; font-weight: normal; content: "\f0d7"; color: #27ae60; margin-inline-start: 5px; }

.tc-sup-product-lower-supplier-price .tc-table-column[data-field="sup_price"] .tc-control
{ position: relative; }

.tc-sup-product-lower-supplier-price .tc-table-column[data-field="sup_price"] .tc-control::after
{ position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-family: FontAwesome; font-weight: normal; content: "\f0d7"; color: #27ae60; pointer-events: none; }

.tc-sup-product-higher-supplier-price .tc-table-column[data-field="sup_price"] .tc-table-cell::after
{ font-family: FontAwesome; font-weight: normal; content: "\f0d8"; color: #c0392b; margin-inline-start: 5px; }

.tc-sup-product-higher-supplier-price .tc-table-column[data-field="sup_price"] .tc-control
{ position: relative; }

.tc-sup-product-higher-supplier-price .tc-table-column[data-field="sup_price"] .tc-control::after
{ position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-family: FontAwesome; font-weight: normal; content: "\f0d8"; color: #c0392b; pointer-events: none; }

/* Products archive (read-only price cells, right-aligned): reserve a fixed caret slot on EVERY price
   cell so the numbers share one right edge, and pin the caret into that slot instead of letting it flow
   inline after the value (which pushes the number left only on flagged rows, leaving the column ragged). */
.tc-table-row[data-item-type="cat_product"] .tc-table-column[data-field="price_list_price_with_vat"] .tc-table-cell,
.tc-table-row[data-item-type="cat_product"] .tc-table-column[data-field="price_list_price_no_vat"] .tc-table-cell
{ padding-inline-end: 18px; }

.tc-table-row[data-item-type="cat_product"] .tc-table-column[data-field="price_list_price_with_vat"] .tc-table-cell::after,
.tc-table-row[data-item-type="cat_product"] .tc-table-column[data-field="price_list_price_no_vat"] .tc-table-cell::after
{ position: absolute; inset-inline-end: 5px; top: 50%; transform: translateY(-50%); margin-inline-start: 0; }

.tc-sup-product-different-supplier-pcn .tc-table-column[data-field="sup_pcn"],
.tc-sup-product-different-supplier-name .tc-table-column[data-field="sup_name"],
.tc-sup-order-product-ai-update .tc-table-column[data-field="ai_detected_status"]
{ background: lightyellow; }

.tc-sup-product-different-supplier-price .tc-field[data-field="sup_price"] .tc-control-value,
.tc-sup-product-different-price-list-with-vat .tc-field[data-field="price_list_price_with_vat"] .tc-control-value,
.tc-sup-product-different-price-list-with-vat .tc-field[data-field="product::price_list_price_with_vat"] .tc-control-value,
.tc-sup-product-different-price-list-no-vat .tc-field[data-field="price_list_price_no_vat"] .tc-control-value,
.tc-sup-product-different-price-list-no-vat .tc-field[data-field="product::price_list_price_no_vat"] .tc-control-value
{ background: lightyellow; }

.tc-sup-order-product-ai-variant .tc-table-column[data-field="ai_detected_status"],
.tc-sup-product-open-order .tc-table-column[data-field="sup_name"]
{ background: #fce5cd; }

.tc-sup-order-product-different-quantity .tc-table-column[data-field="received_quantity"]
{ background: #F0B27A; }

.tc-sup-order-product-ai-new .tc-table-column[data-field="ai_detected_status"]
{ background: #e3fce3; }

.tc-table-row.tc-sup-order-product-ai-product .tc-field[data-field="product_name_search"] .tc-control-value,
.tc-field[data-field="product_name_search"].tc-sup-order-product-ai-product .tc-control-value {
	background: lightyellow;
}


.tc-field[data-item-type="sup_order"][data-field="products"] .tc-table-column[data-field="product"],
.tc-field[data-item-type="sup_order"][data-field="products"] .tc-table-column[data-field="product_name_search"] {
	width: 100%;
}

.tc-field[data-item-type="sup_order"][data-field="products"] .tc-table-column[data-field="sup_price"],
.tc-field[data-item-type="sup_order"][data-field="products"] .tc-table-column[data-field="quantity"] {
	min-width: 65px;
}

/* Price-list columns carry the recommended-price caret indicator and were truncating the value -
   widen them so the number and the caret both fit comfortably. */
.tc-field[data-item-type="sup_order"][data-field="products"] .tc-table-column[data-field="price_list_price_with_vat"],
.tc-field[data-item-type="sup_order"][data-field="products"] .tc-table-column[data-field="price_list_price_no_vat"] {
	min-width: 70px;
}


.tc-layout-single.sup-order-document-type-order .tc-main-title-inner {
	background-color: #E0DAF0;
}

.tc-layout-single.sup-order-document-type-packing-slip .tc-main-title-inner {
	background-color: #D6E4F2;
}

.tc-layout-single.sup-order-document-type-invoice .tc-main-title-inner {
	background-color: #FBF8EA;
}

.tc-field[data-field="supplier"].tc-sup-order-supplier-details-differ .tc-input,
.tc-field[data-field="supplier_name"].tc-sup-order-supplier-details-differ .tc-input,
.tc-field[data-field="supplier_business_number"].tc-sup-order-supplier-details-differ .tc-input,
.tc-field[data-field="supplier_phone"].tc-sup-order-supplier-details-differ .tc-input,
.tc-field[data-field="supplier_email"].tc-sup-order-supplier-details-differ .tc-input {
	background-color: var(--tc-warning-bg, #fff3cd) !important;
}

.tc-field[data-field="invoice_date"].tc-sup-order-date-old .tc-input {
	background-color: var(--tc-danger-bg, #f8d7da) !important;
}

/* --- Lightbox (single-line) pricing indicators. The up/down carets and green/red circles in the
   links table come from tc_table_row_classes, which only reaches table rows; the standalone
   sup_order_product lightbox carries the same comparison as a per-FIELD class
   (cy_sup_order_product_indicator_field_defs, sup-orders.php), stamped on .tc-field[data-field=...].
   Render the glyph after the field caption so it never overlaps the input and flows under RTL. --- */
.tc-field[data-field="sup_price"].tc-sup-product-higher-supplier-price .tc-caption::after,
.tc-field[data-field="sup_price"].tc-sup-product-lower-supplier-price .tc-caption::after,
.tc-field[data-field="price_list_price_with_vat"].tc-sup-product-higher-price .tc-caption::after,
.tc-field[data-field="price_list_price_with_vat"].tc-sup-product-lower-price .tc-caption::after,
.tc-field[data-field="price_list_price_no_vat"].tc-sup-product-higher-price-no-vat .tc-caption::after,
.tc-field[data-field="price_list_price_no_vat"].tc-sup-product-lower-price-no-vat .tc-caption::after {
	font-family: FontAwesome;
	font-weight: normal;
	margin-inline-start: 6px;
	vertical-align: middle;
}

/* Supplier line price vs the product's stored supplier price: caret up = higher = red, caret down = lower =
   green (matches the links-table sup_price carets above; a higher supplier price is worse for the buyer). */
.tc-field[data-field="sup_price"].tc-sup-product-higher-supplier-price .tc-caption::after { content: "\f0d8"; color: #c0392b; }
.tc-field[data-field="sup_price"].tc-sup-product-lower-supplier-price .tc-caption::after { content: "\f0d7"; color: #27ae60; }

/* Sell price vs recommended price: green circle (above) / red circle (below). */
.tc-field[data-field="price_list_price_with_vat"].tc-sup-product-higher-price .tc-caption::after,
.tc-field[data-field="price_list_price_no_vat"].tc-sup-product-higher-price-no-vat .tc-caption::after { content: "\f111"; color: #27ae60; font-size: 8px; }
.tc-field[data-field="price_list_price_with_vat"].tc-sup-product-lower-price .tc-caption::after,
.tc-field[data-field="price_list_price_no_vat"].tc-sup-product-lower-price-no-vat .tc-caption::after { content: "\f111"; color: #c0392b; font-size: 8px; }
