/* PW-115: rules that need selectors WebGrease 1.6 cannot parse (:has(), :is(), nesting, @container ...).

   One such rule in powerwerx-mod.css makes the whole storefront CSS bundle fail minification: it is then served
   unminified (685 KB instead of about 500 KB) to every visitor. So they live here, in a file that is NOT a bundle part:
   Themes/Nitro/Views/Shared/_Root.Head.cshtml and _RootPopup.cshtml link it right after the bundle, and the Hub's
   description preview lists it last (ContentProposalRules.PreviewStylesheets).

   - Loaded after the bundle, so a rule here wins over an equally specific rule in powerwerx-mod.css.
   - After an edit, raise the ?v= number on the two <link> tags (the file is cached at the edge and in browsers).
   - Tests/.../Bundles/BundleSourceMinifyTests fails the build when a bundled stylesheet or script stops minifying. */

/* Older descriptions write a heading as <p><strong>Features</strong></p> right before its list or table. Only there,
   because <p><strong>Voltage:</strong> 600 VAC</p> matches :only-child too (text nodes do not count). The size goes on
   the bold part, so a line that holds text after it (<strong>Title<br /></strong>Body) reads as a heading and a
   paragraph. A browser without :has() shows bold text, as before. */
.full-width-description .full-description-inside-wrap > p:has(> :is(strong, b):only-child):has(+ ul, + ol, + table) {
    margin: 36px 0 8px;
}

.full-width-description .full-description-inside-wrap > p:has(> :is(strong, b):only-child):has(+ ul, + ol, + table) > :is(strong, b) {
    color: #111;
    font-size: 22px;
    line-height: 30px;
}

.full-width-description .full-description-inside-wrap > p:first-child:has(> :is(strong, b):only-child) {
    margin-top: 0;
}

/* On a phone a dimension like 0.45 x 0.97 stays on one line: the row stays short, and a table too wide for the screen
   scrolls inside .wireSpecWrap. Only on grouped wire pages, the ones with a variant picker: other products use this table
   for sentences and pictures too (rf-coaxial-crimper-striping-tool), which must wrap, as must any .allBorders table. */
@media (max-width: 768px) {
    .product-details-page:has(.customVarDisplay) .product-essential .wireSpecTable:not(.allBorders) tbody tr td {
        padding-left: 6px;
        padding-right: 6px;
        white-space: nowrap;
    }
}

/* the add-to-cart block keeps its 20px bottom margin, except under the saved-list link: 10px is enough there */
.overview .add-to-cart:has(> .apt-atl-pdp) {
    margin-bottom: 10px;
}
