/* RUN Release A UI Polish R2 — layout-only overrides, 2026-10-30.
   Preserves AWB disabled state, OTP, delivery, data, quotation/PDF and admin.
   Loaded after run-ui-polish-r1.css; no JavaScript changes. */

/* Header: AWB scales with the visible desktop hero, never occupying a fixed
   240px region when the browser is narrowed. Keep Contact Sales untouched. */
@media (min-width:701px) {
  #home .run-next-hero-nav {
    box-sizing:border-box!important;
    top:clamp(5px,.75vw,11px)!important;
    right:14.5%!important;
    width:clamp(94px,13vw,172px)!important;
    max-width:calc(100% - 20px)!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:0!important;
  }
  #home .run-next-hero-nav > .run-next-nav-btn {
    box-sizing:border-box!important;
    flex:0 1 100%!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:clamp(31px,3vw,44px)!important;
    min-height:31px!important;
    padding:0 clamp(6px,.8vw,14px)!important;
    font:800 clamp(11px,1vw,14px)/1.1 Arial,sans-serif!important;
    white-space:nowrap!important;
    text-align:center!important;
    border-radius:9px!important;
  }
}

/* Mobile AWB remains in the mobile quick-access area; don't let its text
   or icon force the grid wider than the phone. */
@media (max-width:700px) {
  #home .run-next-mobile-nav,
  #home .run-next-mobile-nav > .run-next-nav-btn {min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
  #home .run-next-mobile-nav > .run-next-nav-btn {overflow-wrap:normal!important;}
}

/* Shared action typography — clear text and realistic touch targets. */
#productTableBody .price-brand-cell .run-price-stack .run-row-actions button {
  box-sizing:border-box!important;
  min-height:46px!important;
  padding:9px 12px!important;
  border-radius:10px!important;
  font:700 14px/1.2 Arial,sans-serif!important;
  text-align:center!important;
  white-space:nowrap!important;
  align-items:center!important;
  justify-content:center!important;
}
#productTableBody .run-row-actions [data-run-action="add"] .run-cta-full {display:inline!important;}
#productTableBody .run-row-actions [data-run-action="add"] .run-cta-compact {display:none!important;}

@media (max-width:700px) {
  /* The price + logo keep their own row, actions are in a separate row.
     Physical: two proportionate CTA widths; Digital: one centered CTA. */
  #productTableBody td:nth-child(5) .price-brand-cell .run-price-stack .run-row-actions:not(.run-row-actions-digital) {
    display:grid!important;
    grid-template-columns:minmax(0,0.8fr) minmax(0,1.3fr)!important;
    gap:8px!important;
    align-items:stretch!important;
    justify-content:stretch!important;
    width:100%!important;
  }
  #productTableBody td:nth-child(5) .price-brand-cell .run-price-stack .run-row-actions-digital {
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    width:100%!important;
    gap:0!important;
  }
  #productTableBody td:nth-child(5) .price-brand-cell .run-price-stack .run-row-actions button {
    min-height:46px!important;
    font-size:14px!important;
    font-weight:700!important;
    padding:8px 6px!important;
    min-width:0!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:visible!important;
  }
  #productTableBody td:nth-child(5) .price-brand-cell .run-price-stack .run-row-actions-digital button {
    width:min(170px,100%)!important;
    min-width:0!important;
    flex:0 1 170px!important;
  }
}
/* On truly narrow product-value columns, stack only physical CTAs so no
   button label can be truncated. Digital retains a single compact CTA. */
@media (max-width:380px) {
  #productTableBody td:nth-child(5) .price-brand-cell .run-price-stack .run-row-actions:not(.run-row-actions-digital) {
    grid-template-columns:minmax(0,1fr)!important;
    gap:7px!important;
  }
}

/* My Project: give Delivery Planning a distinct, gentle blue-gray surface
   without changing form components or financial summary styling. */
#runProjectModal #runRC3CPlanner {
  background:#eaf2fb!important;
  border:1px solid #b6cce5!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68);
}
/* Remove redundant success banner only. Errors remain visible. */
#runProjectModal #runRC3CAlert:not([data-error="true"]) {
  display:none!important;
}
@media print {
  #runProjectModal #runRC3CPlanner {display:none!important;}
}

/* Mobile catalog SKU density, based ONLY on existing Original Code metadata.
   A missing Original Code does not prove manufacturer origin. Hide the visual
   catalog-row SKU for those records, while retaining the unchanged SKU key in
   DOM, search, product detail, project, calculator, and quotation/PDF.
   Records with a documented source code stay visible pending product review. */
@media (max-width:700px) {
  #productTableBody tr.run-sku-source-unverified > td:first-child {
    display:none!important;
  }
}
