/**
 * Mirasvit header search – mockup style (input + blue magnifying glass button).
 * Loaded separately so it is not lost when tailwind rebuilds styles.css.
 */
#mpheader-stickybar #search-content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 640px;
    display: flex;
    align-items: center;
}

#mpheader-stickybar #search-content .search-content-wrapper {
    width: 100%;
}

#mpheader-stickybar #search-content .search-content-wrapper > div {
    padding: 0 !important;
    height: auto !important;
}

#mpheader-stickybar #search-content .search-content-wrapper > div > .relative {
    width: 100%;
    position: relative;
    /* block layout – flex here makes absolute dropdowns cover the input */
}

#mpheader-stickybar #search-content .form.minisearch {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    background: #fff;
    height: 41px;
    max-height: 41px;
    position: relative;
    z-index: 2;
}

/* Autocomplete panels must sit below the form, not over the input */
#mpheader-stickybar #search-content .relative > .absolute.card,
#mpheader-stickybar #search-content #mirasvitSearchResults {
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 4px !important;
    z-index: 50;
}

#mpheader-stickybar #search-content .form.minisearch:focus-within {
    border-color: #0077c8;
}

#mpheader-stickybar #search-content .form.minisearch #search {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 41px !important;
    min-height: 41px !important;
    max-height: 41px !important;
    margin: 0 !important;
    padding: 0 8px 0 16px !important;
    font-size: 15px !important;
    line-height: normal !important;
    color: #333 !important;
    background: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
}

/* Clear (×) button – only in DOM when input has text (Alpine x-if) */
#mpheader-stickybar #search-content .omni-mst-search-clear {
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    height: 41px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#mpheader-stickybar #search-content .omni-mst-search-clear:hover {
    color: #333 !important;
}

#mpheader-stickybar #search-content .omni-mst-search-clear svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

#mpheader-stickybar #search-content .form.minisearch #search::placeholder {
    color: #999;
}

#mpheader-stickybar #search-content .form.minisearch #search::-webkit-search-cancel-button,
#mpheader-stickybar #search-content .form.minisearch #search::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

/* Keep typed text visible (Mirasvit template sets transparent selection for typeahead) */
#mpheader-stickybar #search-content #search::selection {
    background-color: #cce5f5;
    color: #333;
}

/* Real submit button (template override) */
#mpheader-stickybar #search-content .omni-mst-search-submit {
    flex: 0 0 41px !important;
    width: 41px !important;
    min-width: 41px !important;
    height: 41px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #0077c8 !important;
    border: none !important;
    border-radius: 0 !important;
    color: #fff !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#mpheader-stickybar #search-content .omni-mst-search-submit svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    color: #fff;
}

#mpheader-stickybar #search-content .omni-mst-search-submit:hover {
    background: #005e9e !important;
}

/* Fallback when vendor template is still served (no button in DOM) */
#mpheader-stickybar #search-content .form.minisearch:not(:has(.omni-mst-search-submit))::after {
    content: "";
    flex: 0 0 41px;
    width: 41px;
    min-width: 41px;
    height: 41px;
    background: #0077c8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") center / 18px no-repeat;
    display: block;
    cursor: pointer;
    pointer-events: none;
}

/* Override Mirasvit admin custom CSS: #search-content * { height: auto !important } */
#mpheader-stickybar #search-content,
#mpheader-stickybar #search-content .search-content-wrapper,
#mpheader-stickybar #search-content .search-content-wrapper > div,
#mpheader-stickybar #search-content .search-content-wrapper > div > .relative {
    overflow: visible !important;
}

#mpheader-stickybar #search-content .form.minisearch,
#mpheader-stickybar #search-content .form.minisearch #search,
#mpheader-stickybar #search-content .omni-mst-search-submit {
    height: 41px !important;
    min-height: 41px !important;
    max-height: 41px !important;
}

#mpheader-stickybar #search-content .omni-mst-search-clear {
    height: 41px;
    min-height: 41px;
    max-height: 41px;
}
