/* PDM NEXT R9 full R7 block-port compatibility layer.
   Old R7 CSS remains the visual contract. Only newer canonical rules override it. */

html body .topbar{
  position:sticky!important;
  top:0!important;
  width:100%!important;
  transition:transform .16s ease!important;
  will-change:transform!important;
}
html body .topbar:not(.pdm-next-topbar-hidden){
  visibility:visible!important;
  transform:none!important;
  -webkit-transform:none!important;
  pointer-events:auto!important;
}
html body .topbar.pdm-next-topbar-hidden{
  visibility:visible!important;
  transform:translateY(calc(-100% - 2px))!important;
  -webkit-transform:translateY(calc(-100% - 2px))!important;
  pointer-events:none!important;
}
.top-nav a.active,.top-nav button.active,
.top-nav a[aria-current="page"],.top-nav button[aria-current="page"]{
  background:#fff!important;
  color:#10265b!important;
  box-shadow:0 3px 12px rgba(15,23,42,.22)!important;
}
.chip.active,
[aria-selected="true"],
.status-btn.active,
.stat-card.active,
.pdm-v1764-filter.active,
.pdm-v1764-panel-button.active,
.admin-tabs [data-admin-action="tab"].active,
.order-filters .active,
.catalog-chip.active,
#view-shop .shop-menu-row .chip.active,
.bottom-nav a.active{
  background:#1d4ed8!important;
  color:#fff!important;
  border-color:#1d4ed8!important;
  box-shadow:0 0 0 2px #fff,0 0 0 4px #1d4ed8,0 4px 12px rgba(29,78,216,.28)!important;
}
button:active,.btn:active,.chip:active,a.btn:active{transform:scale(.97)}
#pdm-global-back-v138f{
  z-index:2147483000!important;
  cursor:grab!important;
  touch-action:none!important;
  user-select:none!important;
  -webkit-user-select:none!important;
}
#pdm-global-back-v138f.pdm-floating-back-dragging{
  cursor:grabbing!important;
  opacity:.92!important;
  transform:scale(1.04)!important;
}
html.pdm-v156-miniapp body{padding-top:0!important}

/* PDM NEXT 20260828: one canonical top-nav selection owner. */
html[data-pdm-nav-active] .top-nav [data-nav].active:not([aria-current="page"]){
  background:transparent!important;
  color:#dbeafe!important;
  box-shadow:none!important;
}
html[data-pdm-nav-active="shop"] .top-nav [data-nav="shop"],
html[data-pdm-nav-active="cart"] .top-nav [data-nav="cart"],
html[data-pdm-nav-active="favorites"] .top-nav [data-nav="favorites"],
html[data-pdm-nav-active="ads"] .top-nav [data-nav="ads"],
html[data-pdm-nav-active="profile"] .top-nav [data-nav="profile"],
html[data-pdm-nav-active="about"] .top-nav [data-nav="about"]{
  background:#fff!important;
  color:#10265b!important;
  box-shadow:0 3px 12px rgba(15,23,42,.22)!important;
}

/* PDM NEXT 20260829: stable cross-route nav and counters. */
/* Keep the desktop content width constant when a route gains/loses a scrollbar. */
@supports (scrollbar-gutter: stable) {
  html:not(.pdm-v156-miniapp){scrollbar-gutter:stable;}
}
@media (min-width:701px) {
  html:not(.pdm-v156-miniapp){overflow-y:scroll;}
}
/* Red counters are overlays, never flex children that resize/recenter a nav item. */
html body .top-nav [data-nav]{position:relative!important;}
html body .top-nav [data-nav="cart"] > em#cart-badge{
  position:absolute!important;
  top:2px!important;
  right:3px!important;
  margin:0!important;
  min-width:19px!important;
  width:auto!important;
  height:19px!important;
  padding:0 5px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  transform:none!important;
  -webkit-transform:none!important;
  transform-origin:center!important;
  z-index:2!important;
}
html body .top-nav [data-nav="cart"] > em#cart-badge[hidden]{display:none!important;}
/* === /PDM NEXT 20260829 stable cross-route nav and counters === */

/* PDM R324 canonical numeric attention counters. */
html body .pdm-r25-attention-badge,
html body .pdm-r324-attention-counter,
html body .pdm-v948-cabinet-badge.active,
html body [data-pdm-r25-attention-badge],
html body [data-pdm-r142-correction-badge]{
  box-sizing:border-box!important;
  width:16px!important;min-width:16px!important;max-width:16px!important;
  height:16px!important;min-height:16px!important;max-height:16px!important;
  padding:0!important;border:0!important;border-radius:50%!important;
  background:#ef3340!important;color:#fff!important;
  font-size:10px!important;font-weight:700!important;line-height:16px!important;
  text-align:center!important;box-shadow:none!important;overflow:hidden!important;
  transform:none!important;flex:0 0 16px!important;
}
html body .pdm-r324-attention-counter[hidden],
html body [data-pdm-r25-attention-badge][hidden],
html body [data-pdm-r142-correction-badge][hidden]{display:none!important;}
/* === /PDM R324 canonical numeric attention counters === */

/* R336 compact/readability + owner heading */
html body .muted,html body .meta,html body small{color:#58677d}
html body .section-card p,html body .section-card .meta,html body .section-card small{line-height:1.25}
html body .section-card{margin-bottom:10px}
html body .row{padding-top:8px;padding-bottom:8px}
html body .profile-tabs{gap:6px}
html body .pdm-v138-owner-panel{padding-top:10px!important;padding-bottom:10px!important}
html body .pdm-v138-owner-panel>h3{font-family:"Arial Narrow","Roboto Condensed","Aptos Narrow",Arial,sans-serif;font-stretch:condensed;white-space:nowrap;font-size:clamp(16px,4.3vw,20px);line-height:1.05;letter-spacing:-.2px}
html body .pdm-v138-info{gap:6px!important}
html body .pdm-v138-metric{padding-top:5px!important;padding-bottom:5px!important}
html body .pdm-r336-attention-letter{color:#d90429;font-weight:800;font-size:1em;margin-left:4px}
html body .pdm-cpay-legacy-note{display:block;color:#9f1239;margin-top:4px;line-height:1.2}

/* R343 Mini App top-nav action-frame parity. */
html.pdm-v156-miniapp body .top-nav > a.pdm-r25-attention-target,
html.pdm-v156-miniapp body .top-nav > button.pdm-r25-attention-target{
  outline:none!important;
  box-shadow:inset 0 0 0 2px #ef3340!important;
}
html.pdm-v156-miniapp[data-pdm-nav-active="shop"] body .top-nav [data-nav="shop"].pdm-r25-attention-target,
html.pdm-v156-miniapp[data-pdm-nav-active="cart"] body .top-nav [data-nav="cart"].pdm-r25-attention-target,
html.pdm-v156-miniapp[data-pdm-nav-active="favorites"] body .top-nav [data-nav="favorites"].pdm-r25-attention-target,
html.pdm-v156-miniapp[data-pdm-nav-active="ads"] body .top-nav [data-nav="ads"].pdm-r25-attention-target,
html.pdm-v156-miniapp[data-pdm-nav-active="profile"] body .top-nav [data-nav="profile"].pdm-r25-attention-target,
html.pdm-v156-miniapp[data-pdm-nav-active="about"] body .top-nav [data-nav="about"].pdm-r25-attention-target{
  box-shadow:inset 0 0 0 2px #ef3340,0 3px 12px rgba(15,23,42,.22)!important;
}

/* PDM R343 20261012: staff-panel active buttons use one compact frame only. */
html body .admin-tabs [data-admin-action="tab"].active,
html body .pdm-v83-dialog-scope .chip.active{
  box-shadow:none!important;
  outline:none!important;
  border:1px solid #1d4ed8!important;
}
