/* Shared cart navigation; session-specific content is supplied by cart-link.js. */
.psg-cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 9px;
    border-radius: 8px;
    color: #28695b;
    background: transparent;
    text-decoration: none;
}

.psg-cart-link:hover {
    color: #194f43;
    background: #edf5f2;
}

.psg-cart-link:focus-visible {
    outline: 2px solid #28695b;
    outline-offset: 3px;
}

.psg-cart-link[hidden],
.psg-cart-link:not([data-psg-cart-ready]),
.psg-cart-link .psg-cart-count[hidden] {
    display: none !important;
}

.psg-cart-link svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.psg-cart-link .psg-cart-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.psg-cart-link .psg-cart-count {
    position: absolute;
    top: 0;
    right: -2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    border-radius: 10px;
    color: #fff;
    background: #28695b;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

header.wp-block-template-part .wp-block-group.psg-cart-wp-nav {
    column-gap: 12px;
}

/* The WordPress header is capped at 960px; reserve room for the cart. */
@media (min-width: 1024px) {
    .psg-cart-wp-nav > .wp-block-navigation,
    .psg-cart-wp-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-content,
    .psg-cart-wp-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
        flex-wrap: nowrap;
        column-gap: 12px;
    }

    .psg-cart-wp-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content {
        white-space: nowrap;
    }

    .psg-cart-wp-nav > .psg-cart-link {
        flex-basis: auto;
        width: auto;
        gap: 6px;
        font-size: 14px;
    }

    .psg-cart-wp-nav > .psg-cart-link .psg-cart-label {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
    }
}

/* Use the existing WordPress overlay before the full navigation gets cramped. */
@media (min-width: 600px) and (max-width: 1023px) {
    .psg-cart-wp-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: none;
    }

    .psg-cart-wp-nav .wp-block-navigation__responsive-container-open {
        display: flex;
    }
}

#site-header > nav.psg-cart-astro-nav > .psg-cart-link {
    margin-left: auto;
    margin-right: 8px;
}

@media (min-width: 768px) {
    #site-header > nav.psg-cart-astro-nav > div {
        margin-left: auto;
    }

    #site-header > nav.psg-cart-astro-nav > .psg-cart-link {
        margin-left: 16px;
        margin-right: 0;
    }
}

@media (max-width: 359px) {
    #site-header > nav.psg-cart-astro-nav {
        padding-left: 16px;
        padding-right: 16px;
    }

    #site-header > nav.psg-cart-astro-nav > a:first-child img {
        max-width: 164px;
        height: auto;
    }
}
