/* Keep search controls in the theme's existing desktop and mobile menu slots. */
.onestoput-header-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    max-width: 100%;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin: 0;
    color: #333;
}
.onestoput-header-search .onestoput-search-field {
    /* Expand over the navigation without changing the menu item's size. */
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    min-width: 0;
    width: min(220px, 65vw);
}
.onestoput-header-search input[type="search"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 8px;
    margin: 0;
    line-height: normal;
    border: 1px solid #999;
    background: #fff;
    color: #333;
    font: inherit;
}
.onestoput-header-search button {
    flex: 0 0 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 20px;
}
#mobileNav li.mega-menu-item .onestoput-header-search { width: 100%; }
#mobileNav li.mega-menu-item .onestoput-search-field {
    right: 44px;
    max-width: calc(100% - 44px);
}
.onestoput-header-search :focus-visible,
.onestoput-search-results :focus-visible {
    outline: 3px solid #bf5700;
    outline-offset: 3px;
}
.onestoput-header-search [hidden],
.onestoput-search-results [hidden] { display: none !important; }
#pageLayout #search { width: 100%; }
#search .onestoput-search-results {
    box-sizing: border-box;
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.onestoput-results-form > div { display: flex; gap: 0.5rem; }
.onestoput-results-form input { flex: 1; min-width: 0; padding: 0.5rem; }
.onestoput-results-form button { padding: 0.5rem 1rem; background: #bf5700; color: #fff; border: 0; cursor: pointer; }
#onestoput-google-search { min-width: 0; }
/* Keep this engine's overlay layout embedded in the site's results container. */
#onestoput-google-search .gsc-results-wrapper-overlay {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-width: 0 !important;
    left: auto !important;
    top: auto !important;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    overflow: visible;
    box-sizing: border-box;
}
#onestoput-google-search .gsc-modal-background-image,
#onestoput-google-search .gsc-results-close-btn { display: none !important; }
