.zt-live-search {
    position: relative;
}

.zt-live-search--header.is-open {
    z-index: 1210;
}

.zt-live-search-backdrop {
    position: fixed;
    z-index: 1200;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(20, 27, 34, .48);
    border: 0;
    cursor: default;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.zt-live-search-backdrop[hidden] {
    display: none !important;
}

html.zt-live-search-focus {
    overscroll-behavior: none;
}

.zt-live-search__panel {
    position: absolute;
    z-index: 1220;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    overflow: hidden;
    max-height: min(620px, calc(100vh - 150px));
    background: #fff;
    border: 1px solid #dfe4e9;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(12, 18, 25, .3);
}

.zt-live-search__panel[hidden] {
    display: none !important;
}

.zt-live-search__mode {
    min-height: 34px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5c6671;
    background: #f7f8f9;
    border-bottom: 1px solid #e7eaed;
    font-size: 11px;
    font-weight: 700;
}

.zt-live-search__mode-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    background: #ffb800;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 184, 0, .16);
}

.zt-live-search__status {
    padding: 18px 20px;
    color: #697480;
    font-size: 13px;
    line-height: 1.45;
}

.zt-live-search__status--loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zt-live-search__status--loading::before {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    content: "";
    border: 2px solid #e2e6ea;
    border-top-color: #e9ae00;
    border-radius: 50%;
    animation: zt-live-search-spin .65s linear infinite;
}

@keyframes zt-live-search-spin {
    to { transform: rotate(360deg); }
}

.zt-live-search__list {
    overflow-y: auto;
    max-height: min(510px, calc(100vh - 264px));
    overscroll-behavior: contain;
}

.zt-live-search__item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) minmax(118px, auto);
    gap: 13px;
    align-items: center;
    min-height: 84px;
    padding: 10px 14px;
    color: #202832;
    border-bottom: 1px solid #eef1f3;
    text-decoration: none;
    transition: background-color .14s ease;
}

.zt-live-search__item:hover,
.zt-live-search__item.is-active {
    background: #fff9df;
    color: #202832;
}

.zt-live-search__image {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f6f7f8;
    border: 1px solid #e6e9ec;
    border-radius: 9px;
}

.zt-live-search__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.zt-live-search__copy {
    min-width: 0;
}

.zt-live-search__name {
    display: block;
    overflow: hidden;
    color: #1e2730;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zt-live-search__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 6px;
    color: #78838e;
    font-size: 11px;
    line-height: 1.35;
}

.zt-live-search__meta strong {
    color: #3d4853;
    font-weight: 700;
}

.zt-live-search__commercial {
    min-width: 118px;
    text-align: right;
}

.zt-live-search__price {
    display: block;
    color: #1e2730;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}

.zt-live-search__stock {
    display: block;
    margin-top: 6px;
    color: #76818c;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.3;
    white-space: nowrap;
}

.zt-live-search__stock.is-available {
    color: #267a42;
}

.zt-live-search__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e6e9ec;
}

.zt-live-search__footer span {
    color: #76818c;
    font-size: 11px;
}

.zt-live-search__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e2730;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.zt-live-search__all::after {
    content: "→";
    color: #bd8700;
    font-size: 16px;
}

.zt-live-search__all:hover {
    color: #9b7000;
}

@media (max-width: 760px) {
    .zt-live-search__panel {
        position: fixed;
        z-index: 1220;
        top: 74px;
        right: 10px;
        left: 10px;
        max-height: calc(100vh - 92px);
        border-radius: 12px;
    }

    .zt-live-search__list {
        max-height: calc(100vh - 216px);
    }

    .zt-live-search__item {
        grid-template-columns: 54px minmax(0, 1fr);
        min-height: 74px;
        padding: 9px 11px;
    }

    .zt-live-search__image {
        width: 54px;
        height: 54px;
    }

    .zt-live-search__commercial {
        grid-column: 2;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: -4px;
        text-align: left;
    }

    .zt-live-search__price {
        font-size: 12px;
    }

    .zt-live-search__stock {
        margin-top: 0;
    }

    .zt-live-search__footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zt-live-search__status--loading::before {
        animation-duration: 1.4s;
    }
}
