/*
 * modern-tokenlock.css — "V2 token lock": the final-override layer from designV2
 * Option J. Re-declares .scale-modern-shell, .material-icons, and the POS
 * nav/cart/product/subcategory/pay set (many with !important) so these win over
 * every earlier pass. GLOBAL and ORDER-CRITICAL — it MUST load after
 * modern-base.css (POS/shell base) and modern-builder.css, and before the later
 * partials. Do not reorder the <link> tags.
 *
 * Phase 6 split: peeled verbatim off modern-base.css (was lines 7192-7568).
 */

/* Modern UI V2 token lock: effective final overrides from designV2 Option J. */
.scale-modern-shell {
  font-family: var(--scale-font-sans) !important;
}

.scale-modern-shell .material-icons {
  font-size: var(--scale-fs-18);
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 100, 'GRAD' 0, 'opsz' 48;
}

.scale-modern-pos-nav button {
  font-weight: 600;
}

.scale-modern-pos-nav button span,
.scale-modern-pos-avatar,
.scale-modern-pos-location strong,
.scale-modern-pos-location span,
.scale-modern-pos-area-chip,
.scale-modern-pos-cart-swipe-tray,
.scale-modern-pos-search kbd {
  font-weight: 600;
}

.scale-modern-pos-cart-item {
  font-family: var(--scale-font-sans);
  width: 100%;
  display: block !important;
  min-height: 0 !important;
  margin: 0;
  padding: 7px 14px 7px 16px !important;
  border: 0;
  border-bottom: var(--scale-hairline) solid var(--scale-separator);
  border-radius: 0 !important;
  background: var(--scale-panel);
  box-shadow: none !important;
  text-align: left;
  appearance: none;
}

.scale-modern-pos-cart-badge {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: var(--scale-fs-9);
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.05em;
}

.scale-modern-pos-cart-item__name {
  font-size: var(--scale-fs-14);
  font-weight: 600;
  line-height: 1.3;
}

.scale-modern-pos-cart-item__name.is-combo-name {
  font-weight: 600;
}

.scale-modern-pos-cart-item__qty {
  color: var(--scale-text-mute);
  font-size: var(--scale-fs-12);
  font-weight: 400;
}

.scale-modern-pos-cart-item__price {
  font-size: var(--scale-fs-14);
  font-weight: 600 !important;
}

.scale-modern-pos-cart-combo-parts {
  margin-top: 4px;
  margin-left: 2px;
  padding-left: 9px;
  border-left: 1.5px solid var(--scale-border-strong);
}

.scale-modern-pos-cart-combo-part {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(64px, auto);
  align-items: baseline;
  gap: 8px;
  font-size: var(--scale-fs-12);
  font-weight: 400;
  line-height: 1.45;
}

.scale-modern-pos-cart-combo-part small {
  display: block;
  grid-column: 1 / -1;
  margin-top: 1px;
  color: var(--scale-text-mute);
  font-size: var(--scale-fs-11);
  font-weight: 400;
  line-height: 1.35;
}

.scale-modern-pos-cart-combo-part.is-child .scale-modern-pos-cart-combo-part__name {
  padding-left: 14px;
}

.scale-modern-pos-cart-combo-part__name {
  min-width: 0;
  color: var(--scale-text-mute);
  overflow-wrap: anywhere;
}

.scale-modern-pos-cart-combo-part__qty {
  min-width: 20px;
  color: var(--scale-text-mute);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.scale-modern-pos-cart-combo-part__amount {
  min-width: 64px;
  text-align: right;
  color: var(--scale-text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.scale-modern-pos-cart-note,
.scale-modern-pos-cart-mods {
  margin-left: 14px;
  padding-left: 8px;
  font-size: var(--scale-fs-11);
  font-weight: 400;
  line-height: 1.4;
}

.scale-modern-pos-cart-mods {
  display: block;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Two columns, name + amount: the modifier's count now rides on its name ("2x Extra Cheese"),
   so the middle qty column — and the `__qty` rule that styled it — are gone. The amount column
   is unchanged, so modifier amounts still line up with the item price above them. */
.scale-modern-pos-cart-mod-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(64px, auto);
  align-items: baseline;
  gap: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.scale-modern-pos-cart-mod-line__name {
  min-width: 0;
  color: var(--scale-text-mute);
  overflow-wrap: anywhere;
}

.scale-modern-pos-cart-mod-line__amount {
  min-width: 64px;
  text-align: right;
  color: var(--scale-text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.scale-modern-pos-cart-mod-line strong {
  flex-shrink: 0;
  color: var(--scale-text-mute);
  font-size: var(--scale-fs-11) !important;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.scale-modern-pos-cart-mod-note {
  margin-left: 10px;
  color: var(--scale-text-soft);
  font-size: var(--scale-fs-11);
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* No fill and no left bar: the comment is a note on the line above it, not a separate
   block, so the indent and the chat icon are all it needs to attach to that line. A tinted
   panel made every commented row look like a state change, and the accent bar drew a
   vertical rule through a cart that has none. Same for the combo variant below. */
.scale-modern-pos-cart-comment {
  margin: 4px 0 0 14px;
  padding: 5px 8px;
  background: transparent;
  color: var(--scale-text-mute);
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 5px;
  align-items: flex-start;
  font-size: var(--scale-fs-11);
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
}

.scale-modern-pos-cart-comment i,
.scale-modern-pos-cart-combo-comment i {
  color: color-mix(in srgb, var(--scale-primary) 70%, var(--scale-text-mute));
  font-size: var(--scale-fs-12);
  line-height: 1.35;
}

.scale-modern-pos-cart-comment span,
.scale-modern-pos-cart-combo-comment span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.scale-modern-pos-cart-combo-comment {
  margin-top: 2px;
  padding: 3px 6px;
  background: transparent;
  color: var(--scale-text-mute);
  display: grid !important;
  grid-template-columns: 13px minmax(0, 1fr);
  gap: 4px;
  align-items: flex-start;
  white-space: normal;
  overflow-wrap: anywhere;
}

.scale-modern-pos-chip {
  min-height: 28px;
  padding: 6px 12px !important;
  border-radius: 7px !important;
  font-size: var(--scale-fs-15) !important;
  font-weight: normal !important;
  line-height: 1.35;
}

.scale-modern-pos-category,
.scale-modern-pos-subcategory {
  font-size: var(--scale-fs-15) !important;
  font-weight: 600 !important;
  line-height: 1.35;
  text-transform: capitalize;
}

.scale-modern-pos-category {
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 17px !important;
  gap: 8px;
}

.scale-modern-pos-category span {
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: var(--scale-fs-11);
  font-weight: 600;
}

.scale-modern-pos-subcategory {
  padding: 6px 10px 6px 12px !important;
  border-radius: 8px !important;
  gap: 6px;
}

.scale-modern-pos-subcategory span {
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  font-size: var(--scale-fs-11);
  font-weight: 700;
}

.scale-modern-pos-cart-child strong {
  grid-column: 3;
}

.scale-modern-pos-pay {
  min-height: 46px;
  margin: 0;
  border-radius: var(--scale-radius-cta) !important;
  font-size: var(--scale-type-headline-size);
  font-weight: 700;
}

.scale-modern-pos-actions button {
  min-height: 34px;
  font-size: var(--scale-type-footnote-size);
  font-weight: 600;
}

.scale-modern-pos-product {
  min-height: 132px;
  padding: 14px !important;
  border-radius: 14px !important;
}

.scale-modern-pos-product__badge {
  font-weight: 700;
}

.scale-modern-pos-product__name {
  font-size: var(--scale-fs-14);
  font-weight: 600 !important;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.scale-modern-pos-product__meta strong {
  font-size: var(--scale-fs-17);
  font-weight: 600;
}

.scale-modern-pos-product__meta small {
  font-size: var(--scale-fs-10) !important;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.scale-modern-pos-product__meta strong small {
  font-size: var(--scale-fs-10) !important;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
}

.scale-modern-pos-product-grid--cols4 .scale-modern-pos-product {
  min-height: 102px;
  padding: 10px !important;
  border-radius: 12px !important;
  gap: 6px;
}

.scale-modern-pos-product-grid--cols4 .scale-modern-pos-product__name {
  font-size: var(--scale-fs-14) !important;
  font-weight: 600 !important;
}

.scale-modern-pos-product-grid--cols4 .scale-modern-pos-product__meta strong {
  font-size: var(--scale-fs-14);
}

.scale-modern-pos-product-grid--cols4 .scale-modern-pos-product__meta em {
  width: 24px;
  height: 24px;
}

.scale-modern-pos-product__meta small,
.scale-modern-pos-product__meta em {
  font-weight: 600;
}

.scale-modern-builder {
  font-family: var(--scale-font-sans);
}

.scale-modern-builder-titlebar strong {
  font-size: var(--scale-type-headline-size);
  font-weight: 600;
  letter-spacing: 0;
}

.scale-modern-builder-title-action,
.scale-modern-builder-titlebar button {
  font-size: var(--scale-type-body-size);
  font-weight: 400;
}
