.app-tooltip.is-preview-help { pointer-events: none; }
/* Shared desktop/mobile refinements. Loaded after the base wizard styles. */
.fragment-controller-summary .order-bom-scroll { padding-right: 0; }
.fragment-controller-summary .order-bom-table th:last-child,
.fragment-controller-summary .order-bom-table td:last-child { text-align: right; }
.shared-config-dialog, .public-bug-dialog { position: fixed; }
.shared-config-heading, .public-bug-heading { display: block; padding-right: 3rem; }
.shared-config-dialog .shared-config-heading h2,
.public-bug-dialog .public-bug-heading h2 { margin: 0; line-height: 1.4; }
.shared-config-dialog [data-share-help], .public-bug-dialog #bug-report-help {
  margin-top: .55rem; white-space: normal; line-height: 1.5;
}
.shared-config-dialog [data-share-close], .public-bug-dialog .public-bug-heading [data-bug-close] {
  position: absolute; right: .85rem; top: .75rem; width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center; padding: 0; line-height: 1;
  color: var(--vscode-foreground); background: var(--vscode-control-bg);
  border: 1px solid var(--vscode-border-strong); border-radius: .65rem; box-shadow: none;
}
.shared-config-dialog [data-share-close] svg, .public-bug-heading [data-bug-close] svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}
.shared-config-dialog [data-share-close]:focus, .public-bug-heading [data-bug-close]:focus { outline: none; box-shadow: none; }
.shared-config-dialog [data-share-close]:focus-visible, .public-bug-heading [data-bug-close]:focus-visible {
  outline: 2px solid var(--vscode-foreground); outline-offset: 2px;
}
.mobile-more { display: none; }
.mobile-more-menu {
  position: fixed; inset: auto; margin: 0; z-index: 1200; width: min(280px, calc(100vw - 16px));
  box-sizing: border-box; max-height: calc(100dvh - 16px); overflow: auto; padding: .5rem; border-radius: .85rem;
  border: 1px solid var(--vscode-border-strong); background: var(--vscode-menu-bg);
  color: var(--vscode-foreground-strong); box-shadow: 0 8px 24px var(--vscode-shadow);
}
.mobile-more-menu[hidden] { display: none; }
.mobile-more-menu button { width: 100%; min-height: 44px; border: 0; border-radius: .5rem; text-align: left; padding: .65rem .75rem; font: inherit; color: inherit; background: transparent; cursor: pointer; }
.mobile-more-menu button:hover, .mobile-more-menu button:focus-visible { background: var(--vscode-list-hover); }
.mobile-menu-theme-label { margin: .6rem .75rem .3rem; font-size: .8rem; color: var(--vscode-foreground); }
.mobile-menu-themes { display: flex; gap: .25rem; padding-bottom: .5rem; margin-bottom: .25rem; border-bottom: 1px solid var(--vscode-border); }
.mobile-menu-themes button { text-align: center; padding-inline: .25rem; }
.mobile-menu-themes [aria-checked="true"] { background: var(--vscode-button-bg, #007acc); color: white; }
@media (max-width: 620px) {
  .app-header-actions > :not(.mobile-more):not([data-cart-button]) { display: none; }
  .app-header-actions > .mobile-more { display: block; }
  .app-header .app-title h1 { font-size: 1rem; }
  .app-header .app-header-brand .brand-logo { width: 3rem; }
  .pump-catalog { grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; }
  .pump-catalog-group { min-width: 0; }
  .pump-catalog-row { grid-template-columns: minmax(0, 1fr); gap: .65rem; min-width: 0; }
  .pump-catalog-row .quantity-stepper-meta { grid-column: 1; overflow-wrap: break-word; }
  .pump-catalog-quantity-control { grid-column: 1; justify-self: start; --pump-quantity-control-height: 44px; grid-template-columns: 44px 3rem 44px; }
  .pump-catalog-row .quantity-stepper-label { font-size: .9rem; }
  .pump-catalog-row .quantity-stepper-helper { font-size: .85rem; }
  #frag-preview-svg, #frag-preview-svg * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .preview-svg-wrap { touch-action: pan-y; }
  .app-navigation { isolation: isolate; }
  .app-navigation::after {
    content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px;
    background: linear-gradient(to bottom, var(--vscode-workbench-bg), transparent); pointer-events: none;
  }
  html[data-theme] body .update-error { max-width: calc(100vw - 64px); }
}

/* Compact action palette: retain the familiar header icons and clear labels. */
.mobile-menu-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.mobile-more-menu .mobile-menu-actions button { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .5rem .2rem; text-align: center; font-size: .8rem; }
.mobile-menu-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--vscode-border-strong); border-radius: .65rem; background: var(--vscode-control-bg); }
.mobile-menu-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mobile-menu-icon .app-theme-sun { display: none; }
html[data-theme="light"] .mobile-menu-icon .app-theme-sun { display: block; }
html[data-theme="light"] .mobile-menu-icon .app-theme-moon { display: none; }
.mobile-more-menu [data-mobile-submenu] { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--vscode-border); }
.mobile-more-menu [data-mobile-submenu][hidden] { display: none; }
.cart-drawer [data-cart-drawer-close] { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; line-height: 1; border: 1px solid var(--vscode-border-strong); border-radius: .65rem; color: var(--vscode-foreground); background: var(--vscode-control-bg); box-shadow: none; }
.cart-drawer [data-cart-drawer-close] svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cart-drawer [data-cart-drawer-close]:focus-visible { outline: 2px solid var(--vscode-foreground); outline-offset: 2px; }
.public-quote-fields { row-gap: 1rem; }
.cart-quote-assignments { row-gap: 1.1rem; }
/* WebKit/Chrome autofill paints its own background; cover that fill in either theme. */
.cart-drawer input:is(:autofill, :-webkit-autofill),
.cart-drawer textarea:is(:autofill, :-webkit-autofill),
.public-bug-dialog input:is(:autofill, :-webkit-autofill),
.public-bug-dialog textarea:is(:autofill, :-webkit-autofill) {
  -webkit-box-shadow: 0 0 0 1000px var(--vscode-control-bg) inset;
  box-shadow: 0 0 0 1000px var(--vscode-control-bg) inset;
  -webkit-text-fill-color: var(--vscode-foreground-strong);
  caret-color: var(--vscode-foreground-strong);
}
@media (max-width: 620px) {
  body[data-mobile-tab="preview"] .page-shell { min-height: 0; }
  body[data-mobile-tab="preview"] .layout { padding-bottom: .25rem; }
  body[data-mobile-tab="preview"] .summary-column { margin-top: .25rem; padding-bottom: .25rem; }
  body[data-mobile-tab="preview"] .summary-column > .fragments { margin-bottom: 0; }
  body[data-mobile-tab="preview"] .mobile-preview-hint { margin-bottom: 0; }
  body[data-mobile-tab="preview"] .summary-column .preview-svg-wrap { height: clamp(180px, calc(100dvh - 370px), min(85vw, 28rem)); }
}

@media (max-width: 360px) {
  body[data-mobile-tab="preview"] .summary-column .preview-svg-wrap { height: clamp(150px, calc(100dvh - 420px), min(85vw, 28rem)); }
}

/* Keep each bug-report label close to its control, with room between fields. */
.public-bug-dialog .public-bug-fields { gap: 1rem; }
.public-bug-field { display: grid; gap: .35rem; min-width: 0; }
.public-bug-dialog .public-bug-field > label,
.public-bug-dialog .public-bug-field > input,
.public-bug-dialog .public-bug-field > textarea { margin: 0; }
.mobile-tab-heading { display: none; }
@media (max-width: 620px) {
  body[data-mobile-tab="preview"] .mobile-tab-heading[data-tab-heading="preview"],
  body[data-mobile-tab="summary"] .mobile-tab-heading[data-tab-heading="summary"] { display: flex; }
  body[data-mobile-tab="preview"] .summary-column .preview-svg-wrap { height: clamp(180px, calc(100dvh - 410px), min(85vw, 28rem)); }
}
@media (max-width: 360px) {
  body[data-mobile-tab="preview"] .summary-column .preview-svg-wrap { height: clamp(150px, calc(100dvh - 460px), min(85vw, 28rem)); }
}

/* Size the pump groups against their own panel, including desktop split panes. */
.pump-order-question { container: pump-options / inline-size; min-width: 0; }
.pump-catalog { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.pump-catalog-group { min-width: 0; }
@container pump-options (max-width: 24rem) {
  .pump-catalog-row { grid-template-columns: minmax(0, 1fr); gap: .65rem; min-width: 0; }
  .pump-catalog-row .quantity-stepper-meta { grid-column: 1; overflow-wrap: break-word; }
  .pump-catalog-quantity-control { grid-column: 1; justify-self: start; }
}

.w100-locked { opacity: .5; cursor: not-allowed; }
.w100-locked > button { pointer-events: none; }
