/* Search overlay redesign — sidebar result list */

@font-face {
    font-family: "ELD Search Icons";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../fonts/eld-search-icons.woff2") format("woff2");
}

.eld-search-icon {
    display: inline-block;
    width: 1em;
    font-family: "ELD Search Icons";
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    line-height: 1;
    text-rendering: auto;
}

.eld-search-icon--all::before { content: "\f622"; }
.eld-search-icon--prostheses::before { content: "\f76f"; }
.eld-search-icon--resins::before { content: "\f30d"; }
.eld-search-icon--instruments::before { content: "\f5db"; }
.eld-search-icon--consumables::before { content: "\f1c7"; }
.eld-search-icon--equipment::before { content: "\f774"; }
.eld-search-icon--laboratory::before { content: "\f342"; }
.eld-search-icon--guides::before { content: "\f444"; }
.eld-search-icon--new::before { content: "\f588"; }
.eld-search-icon--help::before { content: "\f414"; }
.eld-search-icon--arrow-right::before { content: "\f138"; }
.eld-search-icon--available::before { content: "\f26a"; }
.eld-search-icon--unavailable::before { content: "\f332"; }

.eld-med-search .eld-search-suggestions {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 1300;
    width: min(912px, calc(100vw - 32px));
    max-height: min(620px, calc(100dvh - 128px));
    padding: 0;
    overflow: hidden;
    transform: translateX(-50%);
    border: 1px solid #e1e9ed;
    border-radius: 12px;
    background: #fefefe;
    color: #22384b;
    box-shadow: 0 18px 42px rgba(20, 48, 65, 0.18);
}

.eld-med-search .eld-search-suggestions[hidden] {
    display: none;
}

@media (min-width: 768px) {
    .eld-med-search .eld-search-suggestions {
        position: fixed;
        top: var(--eld-search-overlay-top, 118px);
        left: calc(50% + 30px);
    }
}

.eld-search-suggestions__shell.eld-search-list-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: 544px;
    max-height: inherit;
    overflow: auto;
}

.eld-search-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px 9px 12px;
    border-right: 1px solid #e7edf0;
    background: #fefefe;
}

.eld-search-sidebar__primary,
.eld-search-sidebar__secondary {
    display: grid;
    gap: 2px;
}

.eld-search-sidebar__item,
.eld-search-sidebar__static {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 38px;
    padding: 6px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #66788e;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.15;
    text-align: left;
}

.eld-search-sidebar__item {
    width: 100%;
    cursor: pointer;
}

.eld-search-sidebar__icon,
.eld-search-sidebar__static > .eld-search-icon {
    display: inline-grid;
    width: 20px;
    color: #7890a2;
    font-size: 15px;
    text-align: center;
}

.eld-search-sidebar__label,
.eld-search-sidebar__static > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eld-search-sidebar__count {
    padding-left: 8px;
    color: #8190a0;
    font-size: 12px;
    font-weight: 800;
}

.eld-search-sidebar__item:hover,
.eld-search-sidebar__item:focus-visible {
    background: #f2f8fa;
    color: #0d6f80;
    outline: none;
}

.eld-search-sidebar__item.is-selected {
    background: #eaf4f5;
    color: #0b7484;
    box-shadow: inset 3px 0 0 #e9d2c5;
}

.eld-search-sidebar__item.is-selected .eld-search-sidebar__icon,
.eld-search-sidebar__item.is-selected .eld-search-sidebar__count {
    color: #1397a6;
}

.eld-search-sidebar__item.is-empty {
    opacity: 0.44;
    cursor: default;
}

.eld-search-sidebar__separator {
    height: 1px;
    margin: 10px 5px;
    background: #e4ebef;
}

.eld-search-sidebar__static {
    grid-template-columns: 22px minmax(0, 1fr);
    color: #71849a;
}

.eld-search-sidebar__static.eld-search-sidebar__link {
    cursor: pointer;
    text-decoration: none;
}

.eld-search-sidebar__static.eld-search-sidebar__link:hover,
.eld-search-sidebar__static.eld-search-sidebar__link:focus-visible {
    background: #f2f8fa;
    color: #0d6f80;
    outline: none;
}

.eld-search-sidebar__static.eld-search-sidebar__link:hover > .eld-search-icon,
.eld-search-sidebar__static.eld-search-sidebar__link:focus-visible > .eld-search-icon {
    color: currentColor;
}

.eld-search-sidebar__help {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    min-height: 64px;
    margin: auto 0 0;
    padding: 9px 10px;
    border: 1px solid #cce5ea;
    border-radius: 8px;
    background: #f3fafc;
    color: #58728a;
    text-decoration: none;
}

.eld-search-sidebar__help:hover,
.eld-search-sidebar__help:focus-visible {
    border-color: #8dc9d4;
    background: #e9f6f8;
    color: #0a7082;
    outline: none;
}

.eld-search-sidebar__help-icon {
    display: grid;
    place-items: center;
    color: #5e7990;
    font-size: 26px;
}

.eld-search-sidebar__help strong,
.eld-search-sidebar__help small {
    display: block;
}

.eld-search-sidebar__help strong {
    margin-bottom: 3px;
    color: inherit;
    font-size: 12px;
    font-weight: 900;
}

.eld-search-sidebar__help small {
    color: inherit;
    font-size: 12px;
    font-weight: 700;
}

.eld-search-results {
    display: grid;
    align-content: start;
    min-width: 0;
    padding: 14px;
    background: #fefefe;
}

.eld-search-result {
    color: inherit;
    text-decoration: none;
}

.eld-search-result:hover,
.eld-search-result:focus-visible,
.eld-search-result.is-active {
    outline: none;
}

.eld-search-result--featured {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 112px;
    gap: 18px;
    align-items: center;
    min-height: 132px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid #cde7ed;
    border-radius: 8px;
    background: #f2f8fa;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.eld-search-result--featured:hover,
.eld-search-result--featured:focus-visible,
.eld-search-result--featured.is-active {
    border-color: #5db9c6;
    background: #eaf7f9;
    box-shadow: 0 8px 18px rgba(10, 107, 123, 0.12);
}

.eld-search-result__image {
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e0e9ed;
    border-radius: 7px;
    background: #ffffff;
}

.eld-search-result__image img,
.eld-search-result__fallback {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.eld-search-result--featured .eld-search-result__image {
    width: 90px;
    height: 84px;
}

.eld-search-result__fallback {
    background: #edf4f6;
}

.eld-search-result__details {
    display: grid;
    min-width: 0;
    align-content: center;
}

.eld-search-result__badge {
    width: max-content;
    max-width: 100%;
    margin-bottom: 7px;
    padding: 3px 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #d8f1f3;
    color: #127084;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.eld-search-result strong {
    display: -webkit-box;
    overflow: hidden;
    color: #0c687b;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.eld-search-result__category {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: #6f8398;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eld-search-result__description {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    color: #536c83;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.eld-search-result__price {
    display: grid;
    min-width: 0;
    justify-items: end;
    gap: 8px;
    align-content: center;
    text-align: right;
}

.eld-search-result__price b {
    color: #253e52;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
}

.eld-search-result__price small {
    color: #118093;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.eld-search-result__availability {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.eld-search-result__availability .eld-search-icon {
    font-size: 10px;
}

.eld-search-result__availability.is-available {
    color: #2e9b5c;
}

.eld-search-result__availability.is-unavailable {
    color: #c37a18;
}

.eld-search-results__rows {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.eld-search-result--row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 108px;
    gap: 12px;
    align-items: center;
    min-height: 61px;
    padding: 5px 10px;
    border: 1px solid #e1e9ed;
    border-radius: 7px;
    background: #ffffff;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.eld-search-result--row:hover,
.eld-search-result--row:focus-visible,
.eld-search-result--row.is-active {
    border-color: #83c9d3;
    background: #f4fbfc;
    box-shadow: 0 5px 12px rgba(11, 103, 118, 0.08);
}

.eld-search-result--row .eld-search-result__image {
    width: 60px;
    height: 50px;
}

.eld-search-result--row strong {
    -webkit-line-clamp: 1;
    color: #2b4056;
    font-size: 13px;
    line-height: 1.22;
}

.eld-search-result--row .eld-search-result__category {
    margin-top: 4px;
    font-size: 11px;
}

.eld-search-result--row .eld-search-result__price {
    gap: 4px;
}

.eld-search-result--row .eld-search-result__price b {
    font-size: 13px;
}

.eld-search-result--row .eld-search-result__price small {
    font-size: 10px;
}

.eld-search-results__all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 31px;
    margin-top: 10px;
    padding: 6px 14px;
    border: 1px solid #cde5ea;
    border-radius: 7px;
    background: #f1f8fa;
    color: #0d7082;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
}

.eld-search-results__all:hover,
.eld-search-results__all:focus-visible {
    border-color: #76c7d2;
    background: #e7f5f7;
    color: #075f70;
    outline: none;
}

.eld-search-results__all i {
    font-size: 13px;
}

.eld-search-results__empty {
    margin: 0;
    padding: 24px 10px;
    color: #6c8193;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

html[data-eld-theme="dark"] .eld-med-search .eld-search-suggestions {
    border-color: #293a46;
    background: #152028;
    color: #f3f7f8;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

html[data-eld-theme="dark"] .eld-search-suggestions__shell.eld-search-list-shell {
    background: #152028;
}

html[data-eld-theme="dark"] .eld-search-sidebar {
    border-color: #293a46;
    background: #141f29;
}

html[data-eld-theme="dark"] .eld-search-sidebar__item,
html[data-eld-theme="dark"] .eld-search-sidebar__static {
    color: #b9c9d2;
}

html[data-eld-theme="dark"] .eld-search-sidebar__icon,
html[data-eld-theme="dark"] .eld-search-sidebar__static > i,
html[data-eld-theme="dark"] .eld-search-sidebar__count {
    color: #91a8b7;
}

html[data-eld-theme="dark"] .eld-search-sidebar__item:hover,
html[data-eld-theme="dark"] .eld-search-sidebar__item:focus-visible {
    background: #192d38;
    color: #70d0da;
}

html[data-eld-theme="dark"] .eld-search-sidebar__item.is-selected {
    background: #173943;
    color: #71d0d8;
    box-shadow: inset 3px 0 0 #286877;
}

html[data-eld-theme="dark"] .eld-search-sidebar__item.is-selected .eld-search-sidebar__icon,
html[data-eld-theme="dark"] .eld-search-sidebar__item.is-selected .eld-search-sidebar__count {
    color: #65cbd6;
}

html[data-eld-theme="dark"] .eld-search-sidebar__separator {
    background: #2b3b47;
}

html[data-eld-theme="dark"] .eld-search-sidebar__help {
    border-color: #315260;
    background: #142d39;
    color: #b9d0db;
}

html[data-eld-theme="dark"] .eld-search-sidebar__help:hover,
html[data-eld-theme="dark"] .eld-search-sidebar__help:focus-visible {
    border-color: #4c8d99;
    background: #173945;
    color: #77d4dc;
}

html[data-eld-theme="dark"] .eld-search-sidebar__help-icon {
    color: #b8d2dd;
}

html[data-eld-theme="dark"] .eld-search-sidebar__static.eld-search-sidebar__link:hover,
html[data-eld-theme="dark"] .eld-search-sidebar__static.eld-search-sidebar__link:focus-visible {
    background: #1b3440;
    color: #77d4dc;
}

html[data-eld-theme="dark"] .eld-search-results {
    background: #152028;
}

html[data-eld-theme="dark"] .eld-search-result--featured {
    border-color: #315b68;
    background: #1e3643;
}

html[data-eld-theme="dark"] .eld-search-result--featured:hover,
html[data-eld-theme="dark"] .eld-search-result--featured:focus-visible,
html[data-eld-theme="dark"] .eld-search-result--featured.is-active {
    border-color: #5eb7c3;
    background: #21414d;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

html[data-eld-theme="dark"] .eld-search-result__image {
    border-color: #34505d;
    background: #fbfcfd;
}

html[data-eld-theme="dark"] .eld-search-result__fallback {
    background: #0d1c25;
}

html[data-eld-theme="dark"] .eld-search-result__badge {
    background: #225260;
    color: #86d8df;
}

html[data-eld-theme="dark"] .eld-search-result strong {
    color: #f3f7f8;
}

html[data-eld-theme="dark"] .eld-search-result__category {
    color: #afc1cc;
}

html[data-eld-theme="dark"] .eld-search-result__description {
    color: #c4d1d8;
}

html[data-eld-theme="dark"] .eld-search-result__price b {
    color: #f3f7f8;
}

html[data-eld-theme="dark"] .eld-search-result__price small {
    color: #74d1db;
}

html[data-eld-theme="dark"] .eld-search-result__price .eld-search-result__availability.is-available,
html[data-eld-theme="dark"] .eld-search-result__price .eld-search-result__availability.is-available .eld-search-icon {
    color: #8ddf91 !important;
}

html[data-eld-theme="dark"] .eld-search-result__price .eld-search-result__availability.is-unavailable,
html[data-eld-theme="dark"] .eld-search-result__price .eld-search-result__availability.is-unavailable .eld-search-icon {
    color: #f2b248 !important;
}

html[data-eld-theme="dark"] .eld-search-result--row {
    border-color: #293b47;
    background: #19242e;
}

html[data-eld-theme="dark"] .eld-search-result--row:hover,
html[data-eld-theme="dark"] .eld-search-result--row:focus-visible,
html[data-eld-theme="dark"] .eld-search-result--row.is-active {
    border-color: #4e97a3;
    background: #1d313c;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
}

html[data-eld-theme="dark"] .eld-search-result--row strong {
    color: #f3f7f8;
}

html[data-eld-theme="dark"] .eld-search-results__all {
    border-color: #2d6674;
    background: #183d49;
    color: #78d4dc;
}

html[data-eld-theme="dark"] .eld-search-results__all:hover,
html[data-eld-theme="dark"] .eld-search-results__all:focus-visible {
    border-color: #56aebb;
    background: #1e4b58;
    color: #b6f0f3;
}

html[data-eld-theme="dark"] .eld-search-results__empty {
    color: #afc1cc;
}

@media (max-width: 767px) {
    .eld-med-header__inner.eld-search-overlay-host {
        overflow: visible !important;
    }

    .eld-med-search.is-search-open {
        z-index: 1600;
    }

    .eld-med-search .eld-search-suggestions {
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        width: auto;
        max-height: calc(100dvh - 260px);
        transform: none;
        border-radius: 11px;
    }

    .eld-search-suggestions__shell.eld-search-list-shell {
        display: block;
        min-height: 0;
        max-height: none;
    }

    .eld-search-sidebar {
        display: block;
        padding: 8px;
        border-right: 0;
        border-bottom: 1px solid #e7edf0;
    }

    .eld-search-sidebar__primary {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .eld-search-sidebar__primary::-webkit-scrollbar {
        display: none;
    }

    .eld-search-sidebar__item {
        grid-template-columns: 18px minmax(0, 1fr) auto;
        flex: 0 0 auto;
        min-width: max-content;
        min-height: 32px;
        padding: 5px 8px;
        font-size: 12px;
    }

    .eld-search-sidebar__icon {
        width: 17px;
        font-size: 12px;
    }

    .eld-search-sidebar__count {
        padding-left: 6px;
        font-size: 11px;
    }

    .eld-search-sidebar__secondary {
        display: flex;
        gap: 6px;
        margin-top: 6px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .eld-search-sidebar__secondary::-webkit-scrollbar {
        display: none;
    }

    .eld-search-sidebar__static.eld-search-sidebar__link {
        grid-template-columns: 18px minmax(0, 1fr);
        flex: 0 0 auto;
        min-height: 32px;
        padding: 5px 8px;
        font-size: 12px;
    }

    .eld-search-sidebar__static.eld-search-sidebar__link > .eld-search-icon {
        width: 17px;
        font-size: 12px;
    }

    .eld-search-sidebar__separator,
    .eld-search-sidebar__help {
        display: none;
    }

    .eld-search-results {
        padding: 10px;
    }

    .eld-search-result--featured {
        grid-template-columns: 72px minmax(0, 1fr) 78px;
        gap: 10px;
        min-height: 106px;
        padding: 10px;
    }

    .eld-search-result--featured .eld-search-result__image {
        width: 70px;
        height: 70px;
    }

    .eld-search-result__badge {
        margin-bottom: 5px;
        font-size: 8px;
    }

    .eld-search-result strong {
        font-size: 13px;
    }

    .eld-search-result__category,
    .eld-search-result__description {
        font-size: 10px;
    }

    .eld-search-result__description {
        -webkit-line-clamp: 1;
    }

    .eld-search-result__price {
        gap: 5px;
    }

    .eld-search-result__price b {
        font-size: 11px;
    }

    .eld-search-result__price small {
        font-size: 9px;
    }

    .eld-search-results__rows {
        gap: 5px;
        margin-top: 9px;
    }

    .eld-search-result--row {
        grid-template-columns: 51px minmax(0, 1fr) 72px;
        gap: 8px;
        min-height: 58px;
        padding: 4px 6px;
    }

    .eld-search-result--row .eld-search-result__image {
        width: 50px;
        height: 46px;
    }

    .eld-search-result--row strong {
        font-size: 11px;
    }

    .eld-search-result--row .eld-search-result__category {
        font-size: 9px;
    }

    .eld-search-result--row .eld-search-result__price b {
        font-size: 10px;
    }

    .eld-search-result--row .eld-search-result__price small {
        font-size: 8px;
    }

    .eld-search-results__all {
        min-height: 30px;
        margin-top: 8px;
        font-size: 12px;
    }
}

@media (max-width: 390px) {
    .eld-search-result--featured {
        grid-template-columns: 60px minmax(0, 1fr) 64px;
        gap: 8px;
        min-height: 94px;
        padding: 8px;
    }

    .eld-search-result--featured .eld-search-result__image {
        width: 58px;
        height: 58px;
    }

    .eld-search-result__description {
        display: none;
    }
}
