/* biome-ignore-all lint/complexity/noImportantStyles: override native navigation breakpoint styles and baseline icon visibility, which also use !important */

/* Measure the complete desktop row synchronously, including theme effects and loaded fonts.
 * These styles are removed before the browser paints; the real navigation is never cloned. */
.nova-header-measuring > * {
    flex-shrink: 0;
}

.nova-header-measuring .wp-block-site-title {
    white-space: nowrap;
}

.nova-header-measuring .nova-header-nav .wp-block-navigation__responsive-container {
    display: block !important;
    position: static !important;
    width: max-content;
}

.nova-header-measuring .wp-block-navigation__responsive-container-open {
    display: none !important;
}

.nova-header-measuring .wp-block-navigation__submenu-container,
.nova-header-measuring .wc-block-mini-cart__badge {
    display: none !important;
}

.nova-header-measuring .wp-block-navigation__responsive-container-content,
.nova-header-measuring .wp-block-navigation__container {
    flex-wrap: nowrap !important;
    width: max-content;
}

.nova-header-measuring .nova-header-icons {
    display: flex !important;
}

.nova-header-measuring .nova-header-search,
.nova-header-measuring .nova-header-mobile-link {
    display: none !important;
}

/* Keep the native WordPress overlay, keyboard handling and focus restoration. Override its
 * viewport breakpoint only when this particular header cannot fit its desktop navigation. */
.nova-header-nav.is-nova-compact .wp-block-navigation__responsive-container-open {
    display: flex !important;
}

.nova-header-nav.is-nova-compact .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
}

.nova-header-nav.is-nova-compact .nova-header-icons {
    display: none !important;
}

.nova-header-nav.is-nova-compact .nova-header-search {
    display: block !important;
}

.nova-header-nav.is-nova-compact .nova-header-mobile-link {
    display: list-item !important;
}

.nova-header .wp-block-buttons {
    container-type: normal;
    flex-shrink: 0;
}

.nova-header .wp-block-button__link {
    white-space: nowrap;
    padding: 0.6em 1.2em;
    font-size: var(--wp--preset--font-size--small);
}

.nova-header .wp-block-button__link:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 599px) {
    .nova-header .wp-block-button__link {
        padding: 0.5em 1em;
        font-size: var(--wp--preset--font-size--small);
    }
}

.nova-header-nav .wp-block-navigation-item__content,
.nova-header-nav .wp-block-navigation-item__content:hover,
.nova-header .wp-block-site-title a,
.nova-header .wp-block-site-title a:hover {
    text-decoration: none;
}

.nova-header-nav .wp-block-navigation-item__content:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.nova-header-nav .has-child .wp-block-navigation__submenu-container {
    border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
    border-radius: 6px;
    box-shadow: none;
    background-color: var(--wp--preset--color--base, #fff);
}

.nova-header-logo {
    flex-shrink: 0;
    margin: 0;
}

.nova-header-logo img {
    display: block;
    width: var(--nova-logo-size, 48px);
    height: var(--nova-logo-size, 48px);
}

.nova-header-action {
    --nova-logo-size: 40px;
}

.nova-header:has(.is-nova-compact) {
    --nova-logo-size: 36px;
}

@media (max-width: 599px) {
    .nova-header {
        --nova-logo-size: 36px;
    }
}

.nova-header-rule {
    border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.nova-header-transparent:not(.is-nova-scrolled) .nova-header-rule {
    border-bottom-color: transparent;
}

.nova-header-action > .nova-header-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--wp--preset--spacing--30);
}

.nova-header-action > .nova-header-row > * {
    margin: 0;
}

.nova-header-action > .nova-header-row > :first-child {
    justify-self: start;
}

.nova-header-action > .nova-header-row > :nth-child(2) {
    justify-self: center;
}

.nova-header-action > .nova-header-row > :last-child {
    justify-self: end;
}

.nova-header-action > .nova-header-row:has(.is-nova-compact) {
    display: flex;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--20);
}

.nova-header-action > .nova-header-row:has(.is-nova-compact) > :first-child {
    margin-right: auto;
}

.nova-header-action > .nova-header-row:has(.is-nova-compact) > :has(.nova-header-nav) {
    order: 3;
}

.nova-header-masthead:has(.is-nova-compact) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--20);
}

.nova-header-masthead:has(.is-nova-compact) .wp-block-site-title {
    min-width: 0;
    margin: 0;
    text-align: left;
    font-size: clamp(0.875rem, 5vw, var(--wp--preset--font-size--large));
}

.nova-header-masthead:has(.is-nova-compact) > .nova-header-row {
    flex: none;
    margin: 0;
}

.nova-header-masthead:has(.is-nova-compact) > .nova-header-brand {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
}

@media (max-width: 599px) {
    .nova-header-masthead {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--wp--preset--spacing--20);
    }

    .nova-header-masthead .wp-block-site-title {
        min-width: 0;
        margin: 0;
        text-align: left;
        font-size: clamp(0.875rem, 5vw, var(--wp--preset--font-size--large));
    }

    .nova-header-masthead > .nova-header-row {
        flex: none;
        margin: 0;
    }

    .nova-header-masthead > .nova-header-brand {
        flex: 1;
        min-width: 0;
        justify-content: flex-start;
    }
}

:where(header)
    .nova-header-nav:where(
        .is-style-nova-underline,
        :not(
            .is-style-nova-fade,
            .is-style-nova-dot,
            .is-style-nova-dot-colorful,
            .is-style-nova-focus
        )
    ) {
    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content {
        position: relative;
    }

    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -2px;
        height: 1px;
        background: currentColor;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.2s ease;
    }

    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content:hover::after,
    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content:focus-visible::after {
        transform: scaleX(1);
    }

    @media (prefers-reduced-motion: reduce) {
        .wp-block-navigation__container
            > .wp-block-navigation-item
            > .wp-block-navigation-item__content::after {
            transition: none;
        }
    }
}

:where(header) .nova-header-nav:where(.is-style-nova-fade) {
    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content {
        color: color-mix(in srgb, currentColor 70%, transparent);
        transition: color 0.2s ease;
    }

    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content:hover,
    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content:focus-visible {
        color: currentColor;
    }

    @media (prefers-reduced-motion: reduce) {
        .wp-block-navigation__container
            > .wp-block-navigation-item
            > .wp-block-navigation-item__content {
            transition: none;
        }
    }
}

:where(header) .nova-header-nav:where(.is-style-nova-dot, .is-style-nova-dot-colorful) {
    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content {
        position: relative;
    }

    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -8px;
        width: 4px;
        height: 4px;
        margin-left: -2px;
        border-radius: 50%;
        background: currentColor;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content:hover::after,
    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content:focus-visible::after {
        opacity: 1;
    }

    @media (prefers-reduced-motion: reduce) {
        .wp-block-navigation__container
            > .wp-block-navigation-item
            > .wp-block-navigation-item__content::after {
            transition: none;
        }
    }
}

/* Each item blends toward currentColor rather than a fixed --contrast: accent-1/2/3 are only
 * guaranteed 4.5:1 against --contrast or each other (see DesignContext.ts's WCAG section), never
 * against --base, so an allowed pastel/light-lightness accent used raw would risk failing text
 * contrast — but --contrast is also only ever correct as the header's own foreground when nothing
 * else is setting it. transparent-until-scrolled-header overrides that foreground with a
 * hero-matched color while the header sits on a cover, so a hardcoded --contrast target fought
 * that effect and could go unreadable against the actual image. currentColor resolves against
 * whatever the header's own color already is — --contrast by default, or that effect's hero color
 * when it's also active — so this always blends toward the one color guaranteed to read there. */
:where(header)
    .nova-header-nav:where(.is-style-nova-underline-colorful, .is-style-nova-dot-colorful) {
    .wp-block-navigation__container
        > .wp-block-navigation-item:where(:nth-child(4n + 1))
        > .wp-block-navigation-item__content {
        color: color-mix(in oklch, var(--wp--preset--color--accent-1) 45%, currentColor 55%);
    }

    .wp-block-navigation__container
        > .wp-block-navigation-item:where(:nth-child(4n + 2))
        > .wp-block-navigation-item__content {
        color: color-mix(in oklch, var(--wp--preset--color--accent-2) 45%, currentColor 55%);
    }

    .wp-block-navigation__container
        > .wp-block-navigation-item:where(:nth-child(4n + 3))
        > .wp-block-navigation-item__content {
        color: color-mix(in oklch, var(--wp--preset--color--accent-3) 45%, currentColor 55%);
    }
}

:where(header) .nova-header-nav:where(.is-style-nova-focus) {
    .wp-block-navigation__container
        > .wp-block-navigation-item
        > .wp-block-navigation-item__content {
        transition: opacity 0.2s ease;
    }

    .wp-block-navigation__container:has(
            > .wp-block-navigation-item:hover,
            > .wp-block-navigation-item:has(:focus-visible)
        )
        > .wp-block-navigation-item:not(:hover, :has(:focus-visible))
        > .wp-block-navigation-item__content {
        opacity: 0.5;
    }

    @media (prefers-reduced-motion: reduce) {
        .wp-block-navigation__container
            > .wp-block-navigation-item
            > .wp-block-navigation-item__content {
            transition: none;
        }
    }
}
