/* Home overlay header over a dark hero: logo, top-level menu, cart and burger
   turn white. Body classes come from inc/home-header-contrast.php, which also
   appends this file to WP Rocket Used CSS. Breakpoints match .only-desktop /
   .only-mobile. The opened menu panel is light, so it resets the ink to black. */
@media (min-width: 768px) {
    body.home.ile-header-on-dark-desktop .home-overlay-header {
        --ile-overlay-ink: #fff;
    }
}

@media (max-width: 767px) {
    body.home.ile-header-on-dark-mobile .home-overlay-header {
        --ile-overlay-ink: #fff;
    }
}

body.home .home-overlay-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content,
body.home .home-overlay-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content .wp-block-navigation-item__label,
body.home .home-overlay-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-icon,
body.home .home-overlay-header .wc-block-mini-cart__button,
body.home .home-overlay-header .wc-block-mini-cart__button svg,
body.home .home-overlay-header .wc-block-mini-cart__amount,
body.home .home-overlay-header .wp-block-navigation__responsive-container-open {
    color: var(--ile-overlay-ink, #000) !important;
}

body.home .home-overlay-header .wc-block-mini-cart__button svg {
    fill: var(--ile-overlay-ink, #000) !important;
}

body.home .home-overlay-header .wc-block-mini-cart__badge {
    color: var(--ile-overlay-ink, #000) !important;
    border-color: var(--ile-overlay-ink, #000) !important;
}

body.home .home-overlay-header .wp-block-navigation__responsive-container-open::before {
    background: var(--ile-overlay-ink, #000);
    box-shadow: 0 6px 0 var(--ile-overlay-ink, #000), 0 12px 0 var(--ile-overlay-ink, #000);
}

@media (min-width: 768px) {
    body.home.ile-header-on-dark-desktop .home-overlay-header .home-logo-image img {
        filter: brightness(0) invert(1);
    }
}

@media (max-width: 767px) {
    body.home.ile-header-on-dark-mobile .home-overlay-header .home-logo-image img {
        filter: brightness(0) invert(1);
    }
}

body.home .home-overlay-header .wp-block-navigation__responsive-container.is-menu-open {
    --ile-overlay-ink: #000;
}

/* Cart count over a dark hero: the inverse of the regular header (dark disc,
   light "/1"), i.e. a white disc with just the black count and no ring
   (the "/" only separates the amount, which the overlay header hides). The button's
   60% resting opacity would turn the white disc pink on the photo. */
@media (min-width: 768px) {
    body.home.ile-header-on-dark-desktop .home-overlay-header .wc-block-mini-cart__button {
        opacity: 1;
    }

    body.home.ile-header-on-dark-desktop .home-overlay-header .wc-block-mini-cart__badge {
        background-color: #fff !important;
        color: #000 !important;
        border-color: #fff !important;
    }

    body.home.ile-header-on-dark-desktop .home-overlay-header .wc-block-mini-cart__badge::before {
        content: none;
    }

    /* Wide screens hide the cart icon and the overlay header has no amount,
       so a lone number would not read as the cart: show the icon beside it. */
    body.home.ile-header-on-dark-desktop .home-overlay-header .wc-block-mini-cart__icon {
        display: block;
    }

    body.home.ile-header-on-dark-desktop .home-overlay-header .wc-block-mini-cart__badge {
        margin-left: 4px !important;
        transform: none !important;
    }
}

@media (max-width: 767px) {
    body.home.ile-header-on-dark-mobile .home-overlay-header .wc-block-mini-cart__button {
        opacity: 1;
    }

    body.home.ile-header-on-dark-mobile .home-overlay-header .wc-block-mini-cart__badge {
        background-color: #fff !important;
        color: #000 !important;
        border-color: #fff !important;
    }

    body.home.ile-header-on-dark-mobile .home-overlay-header .wc-block-mini-cart__badge::before {
        content: none;
    }
}
