/* Keep the storefront header available while customers browse long catalog pages. */
#masthead,
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
}

body.admin-bar #masthead,
body.admin-bar .site-header {
    top: 32px;
}

.bjs-header-search-wrap {
    position: relative;
    display: none;
    align-items: center;
    flex: 0 0 auto;
    width: auto;
    margin: 0 4px;
    padding: 0;
}

.bjs-header-search-wrap.is-ready {
    display: flex;
}

.bjs-header-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--ast-global-color-0, #008060);
    cursor: pointer;
}

.bjs-header-search-toggle:hover,
.bjs-header-search-toggle:focus-visible,
.bjs-header-search-wrap.is-open .bjs-header-search-toggle {
    border-color: currentColor;
    background: rgba(0, 128, 96, 0.08);
}

.bjs-header-search-toggle:focus-visible {
    outline: 3px solid rgba(0, 91, 211, 0.35);
    outline-offset: 2px;
}

.bjs-header-search-toggle svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.bjs-header-search-form {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1001;
    display: none;
    width: min(320px, calc(100vw - 24px));
    padding: 12px;
    border: 1px solid #e1e3e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}

.bjs-header-search-wrap.is-open .bjs-header-search-form {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.bjs-header-search-label {
    display: block;
    flex: 1 1 auto;
}

.bjs-header-search-input {
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font-size: 14px;
    line-height: 1.35;
}

.bjs-header-search-input::placeholder {
    color: #6d7175;
    opacity: 1;
}

.bjs-header-search-input:focus {
    border-color: #005bd3;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 91, 211, 0.18);
}

.bjs-header-search-submit {
    display: grid;
    flex: 0 0 auto;
    min-height: 40px;
    min-width: 66px;
    padding: 8px 12px;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: #008060;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.bjs-header-search-submit:hover,
.bjs-header-search-submit:focus-visible {
    background: #006e52;
}

.bjs-header-search-submit:focus-visible {
    outline: 3px solid rgba(0, 91, 211, 0.35);
    outline-offset: 2px;
}

@media (max-width: 782px) {
    body.admin-bar #masthead,
    body.admin-bar .site-header {
        top: 46px;
    }

    .bjs-header-search-form {
        right: -8px;
        width: min(300px, calc(100vw - 24px));
    }
}
