/* RUN Next Development RC2: opt-in isolated frontend additions. */
.run-next-hero-nav {position:absolute;top:1%;right:14.5%;z-index:7;display:flex;gap:clamp(4px,.55vw,12px);align-items:center;}
.run-next-nav-btn {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:30px;padding:5px clamp(7px,.7vw,15px);border:1px solid rgba(255,255,255,.5);border-radius:7px;background:rgba(255,255,255,.95);color:#0b2851;font:700 clamp(9px,.82vw,13px)/1.2 Arial,sans-serif;cursor:pointer;box-shadow:0 1px 6px rgba(0,0,0,.12);white-space:nowrap;}
.run-next-nav-btn:hover,.run-next-row-btn:hover {background:#edf5ff;border-color:#377ff3;}
.run-next-nav-btn:focus-visible,.run-next-row-btn:focus-visible,.run-next-modal button:focus-visible {outline:3px solid #377ff3;outline-offset:2px;}
.run-next-nav-btn em {font-style:normal;background:#0d64cc;color:#fff;border-radius:999px;padding:1px 5px;}
.run-next-mobile-nav {display:none;}
.run-row-actions {display:flex;gap:6px;flex-wrap:wrap;margin-top:7px;}
.run-next-row-btn,.run-row-actions button {font:700 11px/1.3 Arial,sans-serif;border:1px solid #ccd9ea;background:#fff;color:#133c68;padding:5px 9px;border-radius:8px;cursor:pointer;}
.run-row-actions [data-run-action="add"] {background:#eff6ff;border-color:#b9d6fb;}
.run-next-modal[hidden],#runNextStatus[hidden] {display:none !important;}
.run-next-modal {position:fixed;inset:0;background:rgba(4,18,41,.7);z-index:100500;display:flex;align-items:center;justify-content:center;padding:16px;}
.run-next-sheet {background:#fff;color:#15263b;border-radius:18px;width:min(760px,96vw);max-height:min(89dvh,930px);overflow:auto;padding:24px;box-shadow:0 24px 80px rgba(0,0,0,.28);font:14px/1.5 Arial,sans-serif;}
.run-next-sheet h2 {font:700 23px/1.3 Arial,sans-serif;margin:0;color:#092a53;}
.run-next-top {display:flex;gap:12px;justify-content:space-between;align-items:start;margin-bottom:16px;}
.run-next-close {font-size:24px;line-height:1;border:0;background:transparent;color:#283d5b;cursor:pointer;}
.run-next-sheet input,.run-next-sheet select {padding:9px;border:1px solid #bac9da;border-radius:8px;background:#fff;color:#15263b;min-width:0;}
.run-next-sheet button:not(.run-next-close) {border:1px solid #1a5cad;background:#145aa5;color:#fff;border-radius:8px;padding:9px 13px;cursor:pointer;}
.run-next-sheet button:disabled {opacity:.5;cursor:not-allowed;}
.run-next-input-row {display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.run-next-input-row input {flex:1;min-width:190px;}
.run-next-input-row select {min-width:130px;}
.run-next-muted {font-size:12px;color:#556477;margin:7px 0 12px;}
.run-next-result {margin:12px 0;word-break:break-word;}
.run-project-line {display:flex;gap:12px;align-items:center;justify-content:space-between;border-bottom:1px solid #e7edf4;padding:13px 0;}
.run-project-line .run-project-info {min-width:0;flex:1;}
.run-project-line .run-project-info strong,.run-project-line .run-project-info small {display:block;word-break:break-word;}
.run-project-line .run-project-info small {color:#627287;font-size:11px;}
.run-project-line label {display:grid;gap:3px;font-size:11px;}
.run-project-line input {width:85px;}
.run-project-line [data-run-remove] {background:#fff!important;color:#a0213d!important;border-color:#f1bdc8!important;padding:7px 10px!important;}
.run-project-summary {margin-top:20px;border-radius:12px;background:#f0f6fe;padding:16px;}
.run-project-summary strong {display:block;font-size:22px;color:#092c56;}
.run-next-modal-open {overflow:hidden;}
#runNextStatus {position:fixed;bottom:25px;right:25px;z-index:100600;background:#102b4d;color:#fff;padding:12px 17px;border-radius:10px;max-width:min(380px,90vw);box-shadow:0 6px 24px rgba(0,0,0,.2);font:13px Arial,sans-serif;}
.run-project-print-header {display:none;}
@media(max-width:700px) {
 .run-next-hero-nav {display:none;}
 .run-next-mobile-nav {display:flex;gap:8px;margin:10px 0 2px;align-items:center;}
 .run-next-mobile-nav .run-next-nav-btn {font-size:12px;min-height:36px;}
 .run-next-sheet {padding:18px;}
 .run-project-line {flex-wrap:wrap;}
 /* Buttons share the original fifth price cell; no extra catalog columns. */
 #productTableBody td:nth-child(5) .run-row-actions {grid-column:2;}
}

.run-print-qty {display:none;}
.run-project-line-total {display:block;margin-top:5px;font-size:12px;color:#243e5d;overflow-wrap:anywhere;}
.run-next-storage-error {border:1px solid #bd2541;background:#fff3f5;padding:12px;color:#831931;}
.run-next-storage-error[hidden] {display:none!important;}
.run-project-summary strong {overflow-wrap:anywhere;}
.run-row-actions button {min-height:36px;}
.run-row-actions button:focus-visible,.run-next-sheet input:focus-visible,.run-next-sheet select:focus-visible {outline:3px solid #377ff3;outline-offset:2px;}
.run-next-close {min-width:36px;min-height:36px;}
@media(max-width:700px) {
 .run-row-actions button,.run-next-sheet button,.run-next-sheet input,.run-next-sheet select {min-height:44px;}
 .run-next-mobile-nav .run-next-nav-btn {min-height:44px;}
 .run-next-close {min-width:44px;}
}
@media print {
 @page {size:A4;margin:14mm;}
 body.run-project-print {overflow:visible!important;background:#fff!important;}
 body.run-project-print > :not(#runProjectModal) {display:none!important;}
 body.run-project-print #runProjectModal {display:block!important;position:static!important;background:#fff!important;padding:0!important;}
 body.run-project-print #runProjectModal .run-next-sheet {overflow:visible!important;max-height:none!important;width:100%!important;padding:0!important;box-shadow:none!important;border-radius:0!important;}
 body.run-project-print #runProjectModal .run-next-close,
 body.run-project-print #runProjectPrint,
 body.run-project-print #runProjectModal [data-run-remove],
 body.run-project-print #runProjectModal input {display:none!important;}
 body.run-project-print .run-project-print-header {display:block!important;margin-bottom:18px;border-bottom:2px solid #123b67;}
 body.run-project-print .run-print-qty {display:block!important;overflow-wrap:anywhere;}
 body.run-project-print .run-project-line {break-inside:avoid;page-break-inside:avoid;flex-wrap:nowrap;align-items:flex-start;}
 body.run-project-print .run-project-line label {flex:0 0 42mm;}
 body.run-project-print .run-project-summary {break-inside:avoid;}
 body.run-project-print #runProjectPrintDate {font-size:11px;}
}


/* ================================================================
   RC2.1 — MOBILE BRAND FILTER VISIBILITY RESTORE (ONLY <= 700px)
   Source baseline V23 intentionally hides duplicate category chips.
   Re-expose the CONTAINER and the Brand Filter, not category chips.
   No catalog logic, desktop layout, pricing, or engine changes.
   ================================================================ */
@media (max-width: 700px) {
  #catalog .filter-bar.category-chip-filter .category-filter-chips {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #catalog .filter-bar.category-chip-filter .category-filter-chips::before {
    display: none !important;
  }
  #catalog .filter-bar.category-chip-filter .category-filter-chip {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  #catalog .filter-bar.category-chip-filter #brandFilterButton {
    display: inline-flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    flex: 0 1 auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
  }
  #catalog .filter-bar.category-chip-filter #selectedBrandChip:not([hidden]) {
    display: inline-flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* =====================================================================
   RC2.2 ADDITIVE UI: locked screenshot 2026-10-11.
   Existing styles.css, Brand Engine, Catalog, pricing and auth untouched.
   ===================================================================== */
:root { --run-cta-red: #d40000; --run-action-blue: #135d96; }
/* Desktop AWB + Project stay where RC2 put them; only update colors. */
@media(min-width:701px) {
  .run-next-hero-nav .run-next-nav-btn {background:var(--run-action-blue);border-color:var(--run-action-blue);color:#fff;}
  .run-next-hero-nav .run-next-nav-btn:hover {background:#0a497c;border-color:#0a497c;color:#fff;}
  .run-next-hero-nav .run-next-nav-btn em {background:#fff;color:#135d96;}
}
/* Catalog actions: preserve same price column, no extra table column. */
#productTableBody .run-row-actions button[data-run-action="delivery"] {
  background:var(--run-action-blue);border-color:var(--run-action-blue);color:#fff;
}
#productTableBody .run-row-actions button[data-run-action="add"] {
  background:var(--run-cta-red);border-color:var(--run-cta-red);color:#fff;
}
#productTableBody .run-row-actions button[data-run-action="delivery"]:hover {background:#0b4673;border-color:#0b4673;color:#fff;}
#productTableBody .run-row-actions button[data-run-action="add"]:hover {background:#b30000;border-color:#b30000;color:#fff;}
#productTableBody .run-row-actions button:disabled {opacity:.55;cursor:wait;}
#productTableBody .run-row-actions button {min-height:36px;}
/* Contextual catalog button appended after all existing category chips. */
#catalog #runProjectChip {
  order:999;align-items:center;justify-content:center;gap:4px;
  border:1px solid var(--run-cta-red);border-radius:8px;background:var(--run-cta-red);
  color:#fff;font:800 12px/1.25 Arial,sans-serif;padding:9px 13px;
  white-space:nowrap;cursor:pointer;min-height:36px;
}
#catalog #runProjectChip:not([hidden]) {display:inline-flex;}
#catalog #runProjectChip[hidden] {display:none!important;}
#catalog #runProjectChip:hover {background:#b30000;}
#catalog #runProjectChip:focus-visible {outline:3px solid #377ff3;outline-offset:2px;}
@media(max-width:700px) {
  /* Screenshot reference: red compact flat action bar directly AFTER Active SKU,
     BEFORE Product Categories; no overlay, no edits to existing proof cards. */
  .run-next-mobile-nav {
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:5px;margin:8px 0 0;padding:0;width:100%;min-width:0;
  }
  .run-next-mobile-nav .run-next-nav-btn {
    box-sizing:border-box;width:100%;min-width:0;min-height:44px;
    padding:5px 4px;display:flex;flex-direction:column;gap:2px;
    align-items:center;justify-content:center;border:1px solid #d40000;
    border-radius:3px;background:var(--run-cta-red);color:#fff;
    font:800 11px/1.05 Arial,sans-serif;box-shadow:none;white-space:normal;
  }
  .run-next-mobile-nav .run-next-nav-btn:hover {background:#b70000;border-color:#b70000;color:#fff;}
  .run-next-mobile-nav .run-next-nav-btn svg {height:16px;width:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round;stroke-linecap:round;}
  .run-next-mobile-nav .run-next-nav-btn span {white-space:nowrap;}
  .run-next-mobile-nav + .mobile-category-panel {margin-top:8px;}
  /* Mobile card footer. The legacy price row remains unchanged above it. */
  #productTableBody td:nth-child(5) .run-row-actions {
    grid-column:1 / -1 !important;display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));width:100%;min-width:0;
    align-items:stretch;gap:8px;margin-top:8px;
  }
  #productTableBody td:nth-child(5) .run-row-actions button {
    min-height:44px;width:100%;min-width:0;white-space:normal;
    padding:8px 5px;font-size:clamp(10px,2.9vw,12px);border-radius:8px;
  }
  /* If only Add to Project is appropriate (digital products), give it full width. */
  #productTableBody td:nth-child(5) .run-row-actions button:only-child {grid-column:1 / -1;}
  /* Project button sits beside Brand Filter; original category chips remain hidden. */
  #catalog .filter-bar.category-chip-filter #brandFilterButton {
    order:1;flex:1 1 0 !important;width:0;min-width:0 !important;
    justify-content:center;white-space:nowrap !important;
    padding-inline:clamp(5px,1.8vw,12px) !important;
    font-size:clamp(10px,2.8vw,12px) !important;
  }
  #catalog .filter-bar.category-chip-filter #runProjectChip:not([hidden]) {
    order:2;display:inline-flex !important;flex:1 1 0 !important;
    min-width:0 !important;white-space:nowrap;font-size:clamp(10px,2.8vw,12px);
    padding:8px 4px;min-height:44px;
  }
  #catalog .filter-bar.category-chip-filter #selectedBrandChip:not([hidden]) {order:3;}
}
@media(max-width:345px) {
  /* Preserve tap targets and full labels on small 320px devices. */
  #productTableBody td:nth-child(5) .run-row-actions {grid-template-columns:1fr;gap:6px;}
  #productTableBody td:nth-child(5) .run-row-actions button {grid-column:1/-1;}
}


/* RC2.3 — Focused UI polish. No catalog/pricing/backend changes. */
@media (min-width:701px) {
  /* Align utility CTA heights with existing Contact Sales image hotspot. */
  .run-next-hero-nav .run-next-nav-btn {
    min-height:40px; padding-block:8px; font-size:clamp(10px,.83vw,13px);
  }
}
/* Ensure Project close X is visible even when the item list scrolls. */
#runProjectModal .run-next-top {
  position:sticky; top:-12px; z-index:5; background:#fff;
  padding-top:12px; padding-bottom:10px; margin-top:-12px;
  border-bottom:1px solid #e4ebf4;
}
#runProjectModal .run-next-close {
  display:inline-flex!important; align-items:center; justify-content:center;
  flex:0 0 auto; width:40px; height:40px;
  font:700 26px/1 Arial,sans-serif; background:#f4f7fb;
  border:1px solid #d4dfec; border-radius:999px;
  color:#193b62; box-shadow:0 1px 3px rgba(8,30,55,.07);
}
#productTableBody td:nth-child(5) .run-row-actions-digital {
  display:flex; justify-content:center; width:100%;
}
@media (max-width:700px) {
  #runProjectModal .run-next-top {top:-8px;margin-top:-8px;padding-top:8px;}
  #runProjectModal .run-next-close {width:44px;height:44px;}
  #productTableBody td:nth-child(5) .run-row-actions-digital {display:grid;}
}

/* RC2.4: PO Tracking is distinct from budget workspace. No hero or catalog redesign. */
.run-po-label {display:block;font-weight:700;font-size:13px;margin-bottom:6px;color:#193856;}
.run-po-sheet {width:min(720px,96vw);}
.run-po-results {margin-top:14px;line-height:1.6;overflow-wrap:anywhere;}
.run-po-results p {margin:8px 0;}
.run-po-list {list-style:none;margin:10px 0 0;padding:0;max-height:40vh;overflow:auto;}
.run-po-list li {border-bottom:1px solid #e4ebf4;padding:10px 3px;}
@media(max-width:700px) {
  .run-po-sheet .run-next-input-row {display:grid;grid-template-columns:1fr;}
  .run-po-sheet #runPoReference {min-width:0;width:100%;}
  .run-po-sheet #runPoSearch {width:100%;}
}

/* RC2.5 desktop AWB/PO: consistent size and optical centering, no contact CTA override. */
@media (min-width:701px) {
 .run-next-hero-nav {align-items:center;gap:10px;}
 .run-next-hero-nav .run-next-nav-btn {box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 clamp(14px,1.2vw,21px);border-radius:9px;background:#135d96;border-color:#135d96;color:#fff;font:800 clamp(12px,.9vw,14px)/1.1 Arial,sans-serif;text-align:center;white-space:nowrap;}
 .run-next-hero-nav .run-next-nav-btn:hover {background:#0e4c80;color:#fff;border-color:#0e4c80;}
}
/* Destructive operation is intentionally only in My Project, with separate confirmation. */
#runProjectModal .run-project-management {margin:12px 0 5px;display:flex;flex-direction:column;align-items:flex-end;gap:8px;}
#runProjectModal .run-project-clear {background:#fff!important;color:#a71d2a!important;border:1px solid #e2a3aa!important;font-weight:700!important;}
#runProjectModal .run-project-clear:disabled {opacity:.45;}
#runProjectModal .run-project-clear-confirm {box-sizing:border-box;width:100%;border:1px solid #e6b5bd;border-radius:12px;padding:14px;background:#fff8f8;color:#6c1821;}
#runProjectModal .run-project-clear-confirm[hidden] {display:none!important;}
#runProjectModal .run-project-clear-confirm p {margin:0 0 12px;}
#runProjectModal .run-project-clear-actions {display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
#runProjectModal #runProjectKeep {background:#fff;color:#163e64;border-color:#a2bedc;}
#runProjectModal #runProjectClearConfirmButton {background:#b91c1c;border-color:#b91c1c;}
@media print {#runProjectModal .run-project-management {display:none!important;}}

/* RC2.5C — optical centering of desktop tracking controls in hero header.
   Contact Sales is part of the existing hero image and remains untouched. */
@media (min-width:701px) {
  .run-next-hero-nav { top:calc(1% + 2px); align-items:center; }
  .run-next-hero-nav .run-next-nav-btn {
    height:44px; min-height:44px; padding-top:0; padding-bottom:0;
    line-height:1; vertical-align:middle; text-align:center;
  }
}

/* RC3F: one aligned price + action block, logo stays in its own column. */
@media (min-width:701px) {
  #productTableBody td:nth-child(5) .run-row-actions {
    grid-column:1!important;display:flex;justify-content:center;align-items:center;
    gap:7px;flex-wrap:wrap;margin-top:7px;width:100%;
  }
  #productTableBody td:nth-child(5) .price-brand-cell {row-gap:0!important;}
}
@media (max-width:700px) {
  #productTableBody td:nth-child(5) .run-row-actions {
    grid-column:1!important;justify-content:center!important;width:100%!important;
    display:flex!important;gap:6px!important;margin-top:6px!important;
  }
}

/* RC3F price stack: price and buttons share one centerline; logo independent. */
#productTableBody .price-brand-cell .run-price-stack {
  display:flex!important; flex-direction:column; justify-content:center;align-items:center;
  grid-column:1; min-width:0;width:100%;gap:5px;
}
#productTableBody .price-brand-cell .run-price-stack .run-row-actions {
  display:flex!important;flex-wrap:wrap;justify-content:center!important;align-items:center;
  gap:7px;width:100%!important;margin:0!important;
}
#productTableBody .price-brand-cell .run-price-stack .price-badge {
  margin:0 auto!important;justify-self:center!important;
}
@media(max-width:700px){#productTableBody .price-brand-cell .run-price-stack .run-row-actions{gap:5px!important}}

/* RC3G: catalog Price > [Delivery] [Add to Project], visually centered. */
#productTableBody .run-price-stack{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0}
#productTableBody .run-price-stack .run-row-actions{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center;gap:8px;margin:0}
#productTableBody .run-price-stack .run-row-actions button{white-space:nowrap;min-height:40px}
@media(max-width:700px){#productTableBody .run-price-stack .run-row-actions{flex-wrap:wrap}}

@media(min-width:701px){
 #productTableBody .price-brand-cell .run-price-stack .run-row-actions{flex-wrap:nowrap!important}
}

/* RC3I measured CTA correction: keep two physical-product actions inside the
   same centered stack on desktop/tablet/mobile without overflowing the logo. */
#productTableBody .price-brand-cell .run-price-stack .run-row-actions{gap:6px!important;flex-wrap:nowrap!important}
#productTableBody .price-brand-cell .run-price-stack .run-row-actions button{padding-left:4px!important;padding-right:4px!important;font-size:11px!important;white-space:nowrap}


/* RC3J — Small mobile CTA / brand balancing (CSS only, <=359px).
   Preserve 390px, tablet and desktop layouts; never alter delivery calculations. */
#productTableBody .run-row-actions .run-cta-compact { display:none; }
@media (max-width:359px) {
  /* Existing mobile CSS allocates 112px + 72px + 12px for price/logo;
     at 320px the brand nearly touches the card edge. Make the logo column fluid-safe. */
  #productTableBody td:nth-child(5) .price-brand-cell {
    grid-template-columns:minmax(0,1fr) 46px !important;
    column-gap:6px !important;
    max-width:100% !important;
    box-sizing:border-box;
    padding-right:8px !important; /* prevent logo from touching the 320px viewport edge */
  }
  #productTableBody td:nth-child(5) .price-brand-cell > .brand-logo-mark,
  #productTableBody td:nth-child(5) .price-brand-cell > .brand-logo-mark.has-asset {
    box-sizing:border-box;
    width:46px !important;
    min-width:0 !important;
    max-width:46px !important;
    height:30px !important;
    padding-inline:2px !important;
    margin-inline:auto !important;
    overflow:hidden;
  }
  #productTableBody td:nth-child(5) .price-brand-cell > .brand-logo-mark:not(.has-asset) {
    font-size:9px !important;
    line-height:1.1 !important;
    text-align:center;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  #productTableBody td:nth-child(5) .price-brand-cell > .brand-logo-mark .brand-logo-img {
    width:100% !important;
    max-width:100% !important;
    height:30px !important;
    object-fit:contain !important;
  }
  #productTableBody td:nth-child(5) .price-brand-cell .run-price-stack {
    min-width:0 !important;
    max-width:100% !important;
  }
  #productTableBody td:nth-child(5) .price-brand-cell .run-price-stack .run-row-actions {
    gap:4px !important;
    width:100% !important;
    max-width:100% !important;
    flex-wrap:nowrap !important;
  }
  #productTableBody td:nth-child(5) .price-brand-cell .run-price-stack .run-row-actions button {
    flex:1 1 0 !important;
    min-width:0 !important;
    min-height:44px !important;
    padding-inline:2px !important;
    font-size:10px !important;
    line-height:1.2 !important;
    white-space:nowrap !important;
    box-sizing:border-box;
  }
  #productTableBody .run-row-actions [data-run-action="add"] .run-cta-full {display:none;}
  #productTableBody .run-row-actions [data-run-action="add"] .run-cta-compact {display:inline;}
}
