/* The Amazon loader has no product data after its script was removed. */
.wp-amazon-shop-auto-link-shortcode-wrapper:has(.wp-amazon-shop-products > img[src$="dummy_product.png"]) {
  display: none;
}

/* The restored cookie settings control has no dialog to open. */
body:has(#cookies-wrapper:empty) .cc__change_settings,
.menu-item:has(> a > .fa-search) {
  display: none;
}

/* This player's source was removed; its 640px wrapper also overflowed phones. */
.wp-video:has(> video:not([src])):not(:has(source[src])) {
  display: none;
}

.site-header .site-fix-menu-close { display: none; }
.site-nav-trigger:focus-visible,
.site-fix-menu-close:focus-visible,
.site-navbar a:focus-visible { outline: 2px solid #0275d8; outline-offset: 3px; }

@media (min-width: 1040px) {
  /* The children category is plain text and lacks the other items' anchor padding. */
  .site-navbar > ul > .menu-item-has-children:not(:has(> a)) {
    padding: 1.25rem 2.25rem 1.25rem 1.25rem;
  }
  .site-navbar .menu-item-has-children:after { top: 50%; }
  .site-navbar .menu-item-has-children:focus-within > .sub-menu { display: block; }
}

@media (max-width: 1039px) {
  /* The original floating panel depended on a removed click handler. Its size
     keeps navigation above the existing trigger and within the phone screen. */
  .site-navbar {
    display: none;
    transform: none;
    right: 1rem;
    bottom: 9rem;
    width: min(22rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 11rem);
    overflow-y: auto;
    box-shadow: 0 4px 18px #0004;
    background: #fff;
  }
  .site-navbar:target { display: block; }
  .site-navbar:target ul.sub-menu { display: block; }
  .site-navbar .menu-item-has-children:before,
  .site-navbar .menu-item-has-children:after { display: none; }
  .site-navbar > ul > .menu-item-has-children:not(:has(> a)) { padding-top: .75rem; }
  .site-navbar .sub-menu a { padding: .65rem .75rem; line-height: 1.35; }
  .site-header:has(.site-navbar:target) .site-nav-trigger { display: none; }
  .site-header:has(.site-navbar:target) .site-fix-menu-close {
    display: block;
    text-align: center;
    font: 32px/28px sans-serif;
  }
}
