/* modern-selectors.css (2026-09-09, job-list item 11)
   ---------------------------------------------------------------------------------------------
   Every rule on this site that uses :has() or a nested :not(...) lives HERE and nowhere else.
   WHY: the six device stylesheets are concatenated and minified by ASP.NET Web Optimization
   (WebGrease), whose CSS parser predates :has(). One such selector in a bundled file makes the
   minifier give up and serve the WHOLE 330 KB bundle raw ("Minification failed. Returning
   unminified contents.") - which is what UAT and LIVE had been doing since the category-parent
   filter rules went in. This file is linked from the three layouts DIRECTLY AFTER the bundle,
   un-minified (a few hundred bytes), with a manual ?v= like chat-widget.css.
   RULES: never add this file to BundleConfig; never put :has() / :is() / :where() / nested
   :not() into style.css, style-desktop/tablet/tablet-port/mobile/print.css - put them here,
   inside the same @media wrapper they would have had. Same selectors, same specificity, loaded
   after the bundle, so the cascade is unchanged. Bump ?v= in the three layouts on every edit.
   --------------------------------------------------------------------------------------------- */

/* (2026-09-03, L11 - from style.css) MVC's ValidationSummary(true) still emits this box when the
   only errors are field-level ones (it holds a single hidden placeholder <li>), so a blank
   password on the sign-in pages showed an EMPTY red box. Hide the box unless it has a visible item. */
.validation-summary-errors:not(:has(li:not([style*="display:none"]))) {
    display: none;
}

/* (2026-09-14 Colin) the eight :has(.category-parent) rules RETIRED - the Search category option now carries a server-side
   .has-parent class and plain rules in style.css / style-mobile.css do the stacking in every browser (a wider / older phone that
   missed the :has() or the (hover:none) and (pointer:coarse) test showed the parent and category on one line). */

/* (2026-09-11 Colin) PHONE: the floating basket and the TOP button get out of the way of the grid's variant chooser
   (a .modal-overlay element - no body class to hook, hence :has()). The Bootstrap-modal and filter-drawer cases are the
   plain body.modal-open / body.mobile-filters-open rules in style-mobile.css next to the FORM ENTRY rule; the chat
   launcher has all three in chat-widget.css. */
@media only screen and (max-width: 767px) {
    body:has(.modal-overlay) .mobile-floating-basket,
    body:has(.modal-overlay) .floating-basket-summary,
    body:has(.modal-overlay) .back-to-top {
        display: none !important;
    }
}

/* (TOUCH 2026-09-11 Colin, "buttons need two taps on the iPhone") SAFETY NET, touch devices only: no hover may move a control
   or reflow a field. style-mobile.css already neutralises today's lift-on-hover buttons one by one inside its double-tap block;
   this catches the same set (and any button added later with a translate on :hover) without !important, because this file is
   served after the bundle. The mouse keeps every hover effect. Media features (hover / pointer) are fine for the bundle
   minifier too - this lives here only so it wins the cascade. */
@media (hover: none), (pointer: coarse) {
    .button:hover,
    .button.proceed:hover,
    .button.util:hover,
    .button.basket:hover,
    .button.proceedcontact:hover,
    .featprod .button.util.grid:hover,
    .buy_box .qty:hover,
    .buy_box:hover .qty-spinner,
    #basket-content .remove:hover,
    #basket-content .updateBasket:hover,
    #basket-content .qty:hover .qty-spinner,
    #basket-content .qty:hover .qtyBox,
    .basket-clear:hover,
    .basket-continue:hover,
    .collect-store-btn:hover,
    .buy-with-card-btn:hover,
    .continue-payment-btn:hover,
    .proceed-payment-btn:hover,
    .change-btn:hover,
    .back-to-top:hover,
    .floating-basket-link:hover,
    .social-icon:hover,
    .share-icon:hover,
    #search button:hover,
    .modal-overlay .button.basket:hover,
    .modal-overlay .button.util:hover,
    #filters .btn_header_clear:hover,
    .enhanced-filters .btn_header_clear:hover,
    .variant-group select:hover,
    .buy_box .dim:hover,
    select.dim:hover {
        transform: none;
    }
    input[type="text"]:hover, select:hover, textarea:hover {
        font-size: inherit;
    }
}
