/* VersaConnect live product search, UI v7. Scoped to enhanced search forms. */
.vc-live-search-form { position: relative; }
.sp-search.vc-live-search-form:focus-within { border-color: #555; box-shadow: 0 1px 0 #555; }
.sp-search.vc-live-search-form input[data-vc-search-input],
.sp-search.vc-live-search-form input[data-vc-search-input]:focus,
.sp-search.vc-live-search-form input[data-vc-search-input]:focus-visible { border: 0; box-shadow: none; outline: none; }
.sp-search.vc-live-search-form > button:focus-visible { outline: 2px solid #555; outline-offset: 2px; box-shadow: none; }
.vc-live-search[hidden] { display: none !important; }
.vc-live-search {
    position: absolute;
    top: calc(100% + .35rem);
    right: 0;
    z-index: 1080;
    width: min(31rem, calc(100vw - 2rem));
    max-height: min(72vh, 38rem);
    overflow: auto;
    overscroll-behavior: contain;
    color: #242424;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: .25rem;
    box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / 15%);
    text-align: left;
    font-size: .95rem;
    line-height: 1.4;
}
.vc-live-search__list { margin: 0; padding: 0; list-style: none; }
.vc-live-search__item + .vc-live-search__item { border-top: 1px solid #eee; }
.sp-search.vc-live-search-form .vc-live-search__product {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-height: 5.25rem;
    padding: .7rem 1rem;
    color: #242424;
    text-decoration: none;
    background: #fff;
}
.sp-search.vc-live-search-form .vc-live-search__product:hover,
.sp-search.vc-live-search-form .vc-live-search__product:focus,
.sp-search.vc-live-search-form .vc-live-search__product[aria-selected="true"] {
    color: #242424;
    background: #f2f2f2;
    outline: 2px solid #555;
    outline-offset: -2px;
    text-decoration: none;
}
.vc-live-search__image { flex: 0 0 64px; width: 64px; height: 64px; object-fit: contain; background: #fff; }
.vc-live-search__details { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: .25rem; }
.vc-live-search__name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.sp-search.vc-live-search-form .vc-live-search__category,
.sp-search.vc-live-search-form .vc-live-search__manufacturer { min-height: 2.75rem; }
.vc-live-search__item > .vc-live-search__status { display: block; padding: .5rem 1rem; font-weight: 600; background: #f5f5f5; }
.vc-live-search mark { color: inherit; background: #eee; }
.vc-live-search__price { display: block; font-size: .87rem; white-space: pre-line; }
.vc-live-search__status { padding: 1rem; }
.vc-live-search-form .vc-live-search__all {
    display: block;
    position: static;
    width: 100%;
    height: auto;
    min-height: 2.75rem;
    padding: .75rem 1rem;
    border: 0;
    border-top: 1px solid #ddd;
    border-radius: 0;
    color: #333;
    background: #f5f5f5;
    font: inherit;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}
.vc-live-search-form .vc-live-search__all:hover,
.vc-live-search-form .vc-live-search__all:focus-visible { background: #e7e7e7; color: #242424; outline: 2px solid #555; outline-offset: -2px; }
.vc-live-search__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 575.98px) {
    .vc-live-search { left: 0; right: 0; width: auto; max-height: 65vh; }
    .vc-live-search__product { gap: .6rem; padding: .65rem .75rem; }
}

/* Keep the mobile header and focused search within the available viewport.
   A 16px input also avoids iOS Safari's automatic focus magnification. */
@media (max-width: 1030px) {
    #jtl-nav-wrapper .sp-brand-row,
    #jtl-nav-wrapper .sp-nav-row { min-width: 0; max-width: 100%; }
    #jtl-nav-wrapper .sp-logo { min-width: 0; }
    #jtl-nav-wrapper .sp-logo img { max-width: 100%; height: auto; }
    #jtl-nav-wrapper .sp-search.vc-live-search-form { min-width: 0; }
    #jtl-nav-wrapper .sp-search input[data-vc-search-input] { min-width: 0; font-size: 16px; }
    #jtl-nav-wrapper .sp-search.vc-live-search-form > button:not(.vc-live-search__all) { flex-shrink: 0; }
}
@media (max-width: 575.98px) {
    .vc-live-search { max-width: 100%; max-height: min(65vh, 65dvh); }
    .vc-live-search__item, .vc-live-search__product { min-width: 0; }
    .vc-live-search__name { white-space: normal; }
}
